how to set an image per itemid on a report

kalliet
Member Posts: 10
Hello,
I want to create an Axapta 3.0 report with an itemid and a corresponding image.
All my images are stored on an external disk (S:\...)
How can I put an image in the column next to the itemid (and do nothing if the image is not existing) ? The code after // doesn't exist, i am looking for a way to achieve this.
f.i.
display bitmap ItemImage
{
image myImage;
bitmap myBitmap;
;
myImage = new Image();
// if S:\image1.bmp exists
// {
// myImage.loadFile("\S:image1.bmp);
// myBitmap = myImage.converttoBitmap();
// }
// else myBitmap = null;
return myBitmap;
}
any suggestions?
thx;
I want to create an Axapta 3.0 report with an itemid and a corresponding image.
All my images are stored on an external disk (S:\...)
How can I put an image in the column next to the itemid (and do nothing if the image is not existing) ? The code after // doesn't exist, i am looking for a way to achieve this.
f.i.
display bitmap ItemImage
{
image myImage;
bitmap myBitmap;
;
myImage = new Image();
// if S:\image1.bmp exists
// {
// myImage.loadFile("\S:image1.bmp);
// myBitmap = myImage.converttoBitmap();
// }
// else myBitmap = null;
return myBitmap;
}
any suggestions?
thx;
0
Comments
-
Hi there,
U can do that by creating a field in Item master, where u can store image of each item. Use that image to show on any report u want to. For that, create a new field of container type, extended by BitMap.
For reference , HR>Periodic>Administration>Applicants. On that form , we can put picture of each applicant(Button Resume > Picture).
Like this, u can put image of each item on Item master in a newly created field. Use that field to show picture on any report.
I hope, it will help you out...
Bye. 8)In search of real life...0 -
hello,
I got the image on the report by putting an empty image per line (empty.bmp) and then replacing it (if an itemimage exists) by the image located on a server. Like this :str imageEmptyFile=imageLocation + "empty.bmp"; str imageFile = imageLocation +smmQuotationLine.ItemId+".bmp"; if (winapi::fileExists(imageFile)) { ItemRef.imageName(imageFile); ItemRef.bottomMargin(5,Units::mm); } else { ItemRef.imageName(imageEmptyFile); ItemRef.bottomMargin(0,Units::mm); }
where ItemRef is a bitmap on a report with width 25 mm and alignment set to left.
I looks fine on screen, BUT when I print it to a printer or pdf writer, the bottom of each image is not on the paper. Why? And how can I fix that?
thx in advance for any replies0
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