Import image in Nav

How can I import a new image in Navision?

I created a BLOB in Company Information

I Insert a Pictute Box in My Report

But I don’t know how to import my image into Comoany Information Table :frowning:

Have a look at Form 1. You have an Import (and Export) menu items. Have a look at the code behind.

There, i can only import one image, for Company Logo, but in my case I wan Import another Image, to print on a report. How can I import more than one image?

Thanks

For another picture you have to add one more field with datatype as BLOB and then use it in report.

I have already done that, but I must import my new image to company Information new field, how can I do That?

So you have to use this standard Import menu item as an example to program yourself a similar menu item to import to your new field. DIY!

Are you using classic or RTC?

As suggested by Luc, you have one example and you have to simply change Picture field to New field…

what problem are you facing in that?

Define PictureExists asBoolean

PictureExists := Picture.HASVALUE;

IF Picture.IMPORT(’*.BMP’,TRUE) = ‘’ THEN

EXIT;

IF PictureExists THEN

IF NOT CONFIRM(Text001,FALSE) THEN

EXIT;

CurrForm.SAVERECORD;

Ok, I will do That.

Thanks

Replace Picture with your defined Field.

I created the new field Logo

I create a new Menu Item

PictureExists := Logo.HASVALUE;
IF Logo.IMPORT(’*.BMP’,TRUE) = ‘’ THEN
EXIT;
IF PictureExists THEN
IF NOT CONFIRM(Text001,FALSE) THEN
EXIT;
CurrForm.SAVERECORD;

I insert the new field in report as a picture Box

I Importe image to Information table

But when I print my report the iamge does not appear

Thanks

Define Compinfo as record variable for table Company Information or Whichever table you have defined in Report.

CompInfo.GET;

CompInfo.CALCFIELDS(CompInfo.Picture);

I have already done That?

:frowning:

Sometghing is missing and I do not know what…

What is your picture file extension ??? Is it .BMP or something else.

You should Picture with new field …

CompInfo.CALCFIELDS(CompInfo.Picture);

make sure you dont have CompInfo.GET; statement after the above code…

I have this:

Report - OnInitReport()

CompanyInfo.GET;
CompanyInfo.CALCFIELDS(Logo);

and my image is Logo.bmp whith 8 KB

Are you sure the Logo is imported in table?

Can you run table and see * in Logo field?

Yes ia am Sure. I even deletet and import again and after run table I can See the * in logo Field.

Do I have to copy my image to a spcific drive?

Thanks every one

It’s OK now. I importe again my image and tur off nav and turn on again, and My image is there.

Regards