If you mean that you want to display an image on a report then take a look
at the standard NAV Sales Invoice. You'll find a PictureBox control in the
header, with the CompanyInfo.Picture as the SourceExpr of the control. The
Picture field in the Company Info table is a BLOB type field. The trick in
displaying the picture is that you have to do a CALCFIELD before NAV knows
how to actually show the picture. Take a look at the code in the
OnPreReport, you will find a statement CompanyInfo.CALCFIELD(Picture).
If you mean you want to export the image to an external file, take a look at
form 1 (Company Information) in a standard database. There's a button called
"Picture", and it has an Export selection. Open the code there and see how
it's done.
--
Daniel Rimmelzwaan
MVP Dynamics NAV
www.risplus.com
"gahlot" <er.g...@gmail.com> wrote in message
news:30ff9870-a8e4-403f...@n19g2000prg.googlegroups.com...
Now you want to export them all or some (using filter) in one shot.
This is what I would do.
Dataitem = ITEM
Create a Variable CurRec Type Integer.
OnPreDataItem()
CurRec :=0;
OnPostDataitem()
Message('Number of Pictures Exported: %1',CurRec);
OnAfterGetRecord()
Item.CALCFIELDS.Picture;
If Item.Picture.HASVALUE then
Item.Picture.EXPORT('c:temp\'+Item."No."+'BMP',FALSE);
If Item.Picture.HASVALUE then
CurRec := CurRec +1;
If Item.Picture.HASVALUE
THEN BEGIN
Item.Picture.EXPORT('c:temp\'+Item."No."+'BMP',FALSE);
CurRec := CurRec +1;
End;