Hi all,
I'm trying to add the Picture stored in CompanyInfo table in a report's picture box control.
I have defined a global variable in the report called CompanyInfo of Datatype record and subtype "Company Information"
Then in the reports OnInitReport() I have the following code:
CompanyInfo.GET;
CompanyInfo.CALCFIELDS(Picture);
Then in the picture box control SourceExpr I have set CompanyInfo.Picture
But when I print the report, the image does not show up. Any ideas of what can I be missing? In the Sales Shipping report, the image shows correctly. :roll:
Comments
I have asked a couple of questions but it is difficult to answer without knowing the NAV version details and the report customizations, can you provide a little more detail?
CompanyInfo.GET;
And in the Body - OnPreSection() write this
CurrReport.SHOWOUTPUT(FALSE);
I really don't know what's going on here. There is no other CompanyInfo.GET, as the global variable CompanyInfo was created by me.
Version is MBS Navision 4.0 SP3. I've also tried to copy the picture box from the sales shipment report, visible is set to yes and I've tried to put the code in "OnPreReport"
I haven't tried to play with the "data items", coz I'd rather do it the standard way. I'm just trying to copy the same way that's in all other standard reports like 208 - sales shipment.
The report I'm trying to put this in is the Report 1401 Check. Don't know if this report has something special that i can't
add the picture to it.
](*,) ](*,) ](*,)
I noticed a record variable called "CompanyInfo" is already defined as global by standard (GET is performed in GenJnlLine - OnPreDataItem trigger): didn't you get any error adding your own variable with the same name? :?:
I finally decided to test the "Data Item" approach, and the picture is showing up!, so at least I have a solution. The thing is that now I have a new filter in the report that I need to remove:
Is the CurrReport.SHOWOUTPUT(FALSE); code to hide this? I put this code as suggested in the body of the section, but no luck.
I would like to know at least how to remove this, but actually what I need is to put the picture in the PrintCheck Section. I'm really sorry for insisting with this topic, but I just can't figure it out.
Thanks for helping guys!