Blob & Reports

I have never used a blob (picture) in a report. How do I get the picture to print out on the report? Thanks…

Hello, you have to calculate the ‘blob’ like calcfields(blob_field); Best regards Walter

Walter is correct, calcfields is not only used for updating flowfieds but also to calculate bitmaps who are stored in BLOB fields. On a Form you don’t have to use Calcfields, Navision will automatically calculate the BLOB for you (ie : Company Information card) However for reports it’s different, on the PreSection() of your report you will have to do something like this : Item.CALCFIELDS(Picture) tarek_demiati@ureach.com

That is what I have done, I am doing this off the item table and have the calcfields in the OnPreSection. All I get on the report is an astrik. Any ideas. I have the following line (I am using the Item Table): item.calcfields(picture); Thanks

Strange. Getting a picture printed shouldn’t be that difficult. You do have set “picture” as source expression for your picturebox, didn’t you? Just for testing: - create a new blank report - set Item table as dataitem - call up section designer, add a Picturebox - call up the properties and set Picture as source expression for the picturebox - Go to the code for the dataitem - In the OnAfterGetRecord trigger you type: calcfields(picture); if not Picture.HASVALUE then currreport.skip; the first line converts the blob, the second line makes sure you only print those records where there is a picture. Save your report and run it. In the standard Cronus database there are about 8 or 9 items with a picture. John

Thanks guys, I got it working. Thanks again for the help…

Maybe a dumb question, but how do I get a specific picture stored into a BLOB field in the first place? Ron

From memory: Picture.IMPORT(filename); ------- With best regards from Switzerland Marcus Fabian