Hello, i am a total beginner in Navision. So i hope somebody can help me.
My problem is, i want to insert a menu button with two options:
1. to print with the firm logo
2. to print without the firm logo
My first try was to create 2 reports. One with logo and the other without logo.
Would it be well, to say :
option 1 "run object" "report with logo"
option 2 "run object" "report without logo" ?
i don't know, because all forms i looked at doesn't use "run object".
There is just
DocPrint.PrintSalesOrder(Rec,Usage::"Order Confirmation");
and i don't know how to use such a code
I hope you could understand my problem.
Comments
In this case you can put in the requestform of the report a toggle ("Show the Logo") that let's the user decide to use the logo or not.
In the OnPreReport-trigger, you can check the boolean an if it is true, have the blob calculated to show it on the report.
Lets say the picture of the logo is in the picture-field of table Company Information.
Define a global of type record and subtype "Company Information".
Then this would be the code:
The picture on your report must have as sourceexpression "recCompanyInformation.Picture".
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
but now i have a new question.
I build the button "With Logo" on my form. "on Push" i insert your code.
As Global Variable for the Form i insert "CompanyInfomation" as "record" an subtype "company information".
But now a message says : Unknow Variable "blnShowLogo"
I know it's a silly question but i can't keep this in mind 8-[
big thanks in advance
Software | Schulung | IT-Beratung
[Topic moved from Navision DOS forum to Navision forum]
BTW I assume you DON'T work with the DOS-version of Navision any more
You also need to define the variable blnSHowLogo as boolean in the globals.
In the "On Push" of that control (Not a button, you should use a checkbox), you don't need to put any code.
The code you should put in the "OnPreReport"-trigger.
BTW: the name of the "Company Information"-record is recCompanyInformation. I forgot to mention this before.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
You have made a navision beginner very happy.
Software | Schulung | IT-Beratung