Hello! Is there any way to load a picture into a report (PictureBox) directly from a file on disk (like c:\picture.bmp) or do i have to have an extra table with a BLOB field in which picture is saved and than loaded into PictureBox? lp john
Go to the property BitmapList and press F1. The help explains this better than I could do it at the moment. Alex
Well, Why don’t you use an image in place of a picture box ? You can enter c:\picture.bmp in the bitmap property. I think you are limited to very small bitmaps (32k). Vanina
thnx
Hi Prosen, To omit the 32K limit, you can choose to use the functionality to store a logo/picture in BLOB field in a Navision Table, like is done on the Company Information Card. Then you use this record as the source expression for your picture box. Don’t forget to do a calcfields on the record that you used as the source-expression. Good luck. /Sven
Sorry Prosen, I read your question wrong, you already knew this. /Sven
quote:
Originally posted by lordslayer
Hello! Is there any way to load a picture into a report (PictureBox) directly from a file on disk (like c:\picture.bmp) or do i have to have an extra table with a BLOB field in which picture is saved and than loaded into PictureBox?
Just create a temporary variable type record subtype company information. When you get the picture name (.bmp file with full path), use the “company name”.picture.import(filename) function and show the picture on your report using previously calcfields on the picture for showing the picture… as you’re using a temporary variable, the value will not be really put into the table, and you don’t need creating any new table for that. Regards,
i thank all of you for all the help!
You could even import and print jpg files in Navision 3.00 and higher. Check out form 6220 and table 6215 to see how it’s done!
hi all
i have got picture in my report i need to provide optine to my user . that he will get picture in his report if he check the show check button in request form. if he dont select picture will not be displayed in report…
Two options:
Either you have two versions of a section (one with picture and one without). In the “OnPreSection” trigger you can use the following code to show hide the corresponding section:
This works for image and picturebox controls:
CurrReport.SHOWOUTPUT := PrintPicture; // This code will show section when PrintPicture is ticked in the request form
CurrReport.SHOWOUTPUT := NOT PrintPicture; // This code will hide the section when PrintPicture is ticked in the request form
The other option is to only do the CALCFIELDS when the PrintPicture checkmark is ticked in the request form:
IF PrintPicture THEN
CompaniInfo.CALCFIELDS(Picture)
ELSE
CLEAR(CompanyInfo.Picture);
Ths only works for pictures stored in a blob rather than assigned to the control directly (as in Image control).
thanks Thomas
can you explain me about the below code using CALCFIELDS
I also have question regarding picture in report.
I need to get Item Picture in report from Table Picture.
How to get it in report?
I think it has already been explained here, you need to use Item. CALCFIELDS(Item.Picture) and give the sourceexpression for picture box as Item.Picture.
Item Picture is stored in item Table itself, not in the Picture table.