how to load multiple pictures from file while generating simple list

edited 11:51AM in FastReport 4.0
Hi there,

I am trying to load pictures from a specific folder, the path of each one is stored in my database, the problem that not all records include a picture's path so I tried the following code in the onBeforePrint of the picture object event
...
if <frxDBDataset1."picturePath"> <> '' then
TfrxPictureView(sender).FileLink:= <frxDBDataset1."picturePath">;
...

this seems to work for the records having a valid path but the report keeps loading the last picture for all the records that don't have a valid picture's path.

can you help me to sort it out please

of course I am using delphi language

Regards,
Raul

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:51AM
    finish your statement with the else part.
    to reset the filelink to nil if condition is not met on next iteration,
  • edited 11:51AM
    gordk wrote: »
    finish your statement with the else part.
    to reset the filelink to nil if condition is not met on next iteration,

    thank you so much, working like a charm with filelink set to nil not empty string in the else statement.


    Regards,
    Raul

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.