How to Print Logo Dynamically in reports

chandrurec
Member Posts: 560
Hi all,
I want to print logo in sales Order report dynamically. The logo is available in a certain location. For doing this I am giving the coding as follows.
TempCompInfo.Picture.IMPORT('C:\'+"Sales Line"."No."+'.jpg');
TempCompInfo.CALCFIELDS(Picture);
then I am giving the source expression with TempCompInfo.Picture. When I Print the report, I am not getting a logo getting printed instead some symbol is getting printed.
If anyone knows how to rectify this problem, Kindly let me know.
Thanks in advance.
Regards,
chandru.
I want to print logo in sales Order report dynamically. The logo is available in a certain location. For doing this I am giving the coding as follows.
TempCompInfo.Picture.IMPORT('C:\'+"Sales Line"."No."+'.jpg');
TempCompInfo.CALCFIELDS(Picture);
then I am giving the source expression with TempCompInfo.Picture. When I Print the report, I am not getting a logo getting printed instead some symbol is getting printed.
If anyone knows how to rectify this problem, Kindly let me know.
Thanks in advance.
Regards,
chandru.
0
Comments
-
-
Hi Mohana,
I tried it but it was not working.
Regards,
chandru.0 -
your pic is a jpg correct?
Nav only shows BMP's so you need to either convert on the fly as shown in the link or open pic in paint and save a bmp.0 -
Hi Savatage,
Yes My picture is JPG. But I am converting the JPG to BMP using the converter which I found in Mibuso and then Only importing into Navision but still I cannot able to import on the fly.
Thanks & Regards,
chandru.0 -
Hi Savatage,
I used the coding as shown below.
IF EXISTS ('E:\jpg\'+"Sales Line"."No."+'.jpg')
THEN BEGIN
ConvertPic:= SHELL('E:\jpg2bmp.exe -outfile E:\temp.bmp -color 256 -bmp -scale 1/1 E:\'+
"Sales Line"."No."+'.jpg');
//Picture.IMPORT('c:\temp.bmp',FALSE);
CompanyInfo.GET;
CompanyInfo.Picture.IMPORT('c:\temp.bmp',FALSE);
CompanyInfo.CALCFIELDS(Picture);
END
ELSE BEGIN
//CLEAR(Picture);
CLEAR(CompanyInfo.Picture);
END;
If you find ant mistake, kindly let me know.
Thanks in advance.
Regards,
chandru.0 -
Another option you can use is to create the logos as pdf files and then use bullzip to superimpose the logos.
Bullzip is a very NAV friendly pdf writer with several useful options and ara3n first introduced us to it a few years ago (how to print to pdf).
When you create the pdf file using bullzip, you specify with one of the parameters which pdf file to superimpose.
The downside is every one printing needs bullzip installed and there is a small amount of coding needed. On the plus side, you can automatically with a small amount of code, attach the document you printed to the associated record as a permanent record if you need it.
Once you have it working it is extremely reliable.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
in you code your output file is e:\temp.bmp but you are importing c:\temp.bmp0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions