Navision 4.Dynamic picture in report

delaghetto
Member Posts: 89
Hi
I don't know if I can achieve this in Navision 4 sp3.
I've got a report that shows a picture that is stored in a BLOB type field of a table.
The thing is that this company prints 2 type of checks, and both are the same. The only thing that changes is the background image.
So in the sourceexpr for the picture control field I've got my BLOB type field: BankAcc2.Picture
I've create BannkAcc2.Picture2
I see I can't define a BLOB type Global Variable. I need to dynamically change the SourceExpr of the control. something like If CheckType = 1 then SourceExpr = BannkAcc2.Picture2 else BannkAcc2.Picture
Any ideas?
I don't know if I can achieve this in Navision 4 sp3.
I've got a report that shows a picture that is stored in a BLOB type field of a table.
The thing is that this company prints 2 type of checks, and both are the same. The only thing that changes is the background image.
So in the sourceexpr for the picture control field I've got my BLOB type field: BankAcc2.Picture
I've create BannkAcc2.Picture2
I see I can't define a BLOB type Global Variable. I need to dynamically change the SourceExpr of the control. something like If CheckType = 1 then SourceExpr = BannkAcc2.Picture2 else BannkAcc2.Picture
Any ideas?
0
Comments
-
You can define two sections with the same controls (but different images) and manage their visibility through CurrReport.SHOWOUTPUT statement.* Daniele Rebussi * | * Rebu NAV Diary *0
-
Thanks for the answer.
I tried this approach of having two sections.
The thing is that the section is the report footer. So now I have two footers. The property PrintOneverypage is set to No, and PlaceInbottom is Yes.
The problem is that now even when I don't print one of the footers, it's like if the space occupied by it is "consumed" by the hidden footer, so there is a big white gap in the report.
How can I avoid this??0 -
Is the CurrReport.SHOWOUTPUT placed in OnPreSection trigger? Doing in this way you should be able to avoid the problem.* Daniele Rebussi * | * Rebu NAV Diary *0
-
Yes, it's in the OnPreSection before all the other calculations.0
-
delaghetto wrote:I see I can't define a BLOB type Global Variable.
CompanyInfo.GET; IF SomeCondition THEN BEGIN CompanyInfo.CALCFIELDS(Picture) TempBlob.Blob := CompanyInfo.Picture; END ELSE BEGIN CompanyInfo.CALCFIELDS("Picture 2"); TempBlob.Blob := CompanyInfo."Picture 2"; END; // use TempBlob.Blob as SourceExpression of your Picture Box
0 -
vaprog wrote:Define a Record variable instead
Thanks for posting. Actually I thought of that solution after posting. But the problem is that now I need to take 2 section approach, because apart from the Picture, also other fields are going to be different in each footer section.
I think anyway the problem is with NAV 4 SP2. It seems like sp2 version "reserves" space for all footers, even when not displayed. I'm going to try and migrate to SP3 at least.
Or otherways I will create 2 different reports and get it done #-o
Thanks for helping guys!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