>>Add 'Report Picture' field and type GetBMPFile() in 'Picture from file' dialog. GetBMPFile() is your function which will return path+file name of appropriate bitmap:
>>
>>function getbmpfile()
>>if id>3
>> return "d:\vfp5\fox.bmp"
>>else
>> return "c:\cuerun\bmi_cue.bmp"
>>endif
>>endfunc
>>
>
>Sorry to bother you Ed. Where do you put the function in a report? I usually put code in the init method of the dataenvironment, but when I put a function in there I get an error "Methods and Events can contain nested procedures or class definitions".
The function should be somewhere in the program which calls the report (good ole FP) or in a separate .prg, unless you find a way to add new method to a report (no way that I know of).
Easier solution: if your patient's record contains the picture's filename in some field, use that field name instead of this function, just put parentheses around it or just make sure there are no quotes around it. Use expression builder instead of file selector.