Dynamic picture based on a condition in report

hvdstroet
Member Posts: 3
Hello,
I am trying to design a report which shows a picture based on an if statement.
I understand that it is possible to do this with pictures which are stored into a table as BLOB.
Can anyone me explain step by step how this works?
First I'd like to know how pictures are imported to a table and second, what code do I need to display one of the imported pictures?
I read already some threads on the forum, but especially the import of the pictures into a table is not clear to me.
Thanks in advance,
Henk
I am trying to design a report which shows a picture based on an if statement.
I understand that it is possible to do this with pictures which are stored into a table as BLOB.
Can anyone me explain step by step how this works?
First I'd like to know how pictures are imported to a table and second, what code do I need to display one of the imported pictures?
I read already some threads on the forum, but especially the import of the pictures into a table is not clear to me.
Thanks in advance,
Henk
0
Comments
-
Take a look at company information form. Click on Picture Menu Button and look at the code. This will show you how to import a picture into a blob.
BTW you can view only bitmaps in navision, but you can import any file.
To see how it is printed on a report. Find a report that prints the bitmap. Take a look at the code. It's pretty simple.0 -
To import:
recMyRecord."BLOB-field".IMPORT(...); (see Form 346 menubutton picture=>Import).
To show:
Put a picturebox on the report and give it a sourceexpression that is a BLOB-field of a record (e.g. "BLOB Field1".
And put this code in the OnAfterGetRecord.CASE intBlobToShow 1: recMyRecord.CALCFIELDS("BLOB Field1"); 2: BEGIN recMyRecord.CALCFIELDS("BLOB Field2"); recMyRecord."BLOB Field1" := recMyRecord."BLOB Field2"; END; 3: BEGIN recMyRecord.CALCFIELDS("BLOB Field3"); recMyRecord."BLOB Field1" := "BLOB Field3"; END; END;
BTW : DON'T SAVE the record, because this would overwrite "BLOB Field1" with field 2 or 3.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks, that works!0
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