This string function determines the location of the special"My Pictures" folder. This depends on the running operating system and the logged on user.
function MyPicturesDir: string;
The location is determined from the operating system API using the ShellFolder function.
begin image1.picture.SaveToFile(MyPicturesDir+'\test.bmp'); showMessage('Filed under: '+MyPicturesDir+'\test.bmp'); end;
Rules to understand the script can be found here.
In this example, it is assumed that an element image1, i.e. a non-database-bound image, was positioned on one of the tapes in the design of the report and to which a BMP image was assigned. The content of this image element is then created as a BMP file with the name TEST.BMP in the special folder "My Documents" of the PC. A corresponding screen message is also displayed.
ShowMessage shows: Filed under: C:\Dokumente und Einstellungen\Klaus\Eigene Dateien\Eigene Bilder\test.bmp