Beginner Question: How to work with Reports

Heiko_D
Member Posts: 11
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.
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.
secon EDV-Consulting GmbH
Software | Schulung | IT-Beratung
Software | Schulung | IT-Beratung
0
Comments
-
For maintainability it is better to create 1 report in which you put a picture to which you can import (or not import) a blob (like Picture of table Company Info) to show or not show the picture.
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:recCompanyInformation.GET(); IF blnShowLogo THEN recCompanyInformation.CALCFIELDS(Picture);
The picture on your report must have as sourceexpression "recCompanyInformation.Picture".Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Big thanks for your help.
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 advancesecon EDV-Consulting GmbH
Software | Schulung | IT-Beratung0 -
Just noticed this:
[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.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Very Very Much Thank you
You have made a navision beginner very happy.secon EDV-Consulting GmbH
Software | Schulung | IT-Beratung0
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