Printing one record from a navision form

Koen_Roggeman
Member Posts: 17
Hello,
How can I print one record from a form. When I print I get all the records that are present in my table.
I think it has to do something with a filter but I am not sure.
thx for the help !!
How can I print one record from a form. When I print I get all the records that are present in my table.
I think it has to do something with a filter but I am not sure.
thx for the help !!
0
Comments
-
Topic moved from Navision Tips & Tricks to Navision Attain. Please don't ask questions in the Navision Tips & Tricks forum.0
-
Place a button on the form, and add the following code to the OnPush trigger of this button.
MyRecord := Rec;
MyRecord.SETRECFILTER;
REPORT.RUNMODAL(REPORT::"ReportName", true, false, MyRecord);
where...
MyRecord is a record var of the same subtype as Rec
ReportName is the name of the report that is to be used for printing.Kind regards,
Jan Hoek
Product Developer
Mprise Products B.V.0 -
Why is it that it is nessary to declare another variable and pass rec to it before using report.runmodal.
Why does this not work:
Rec.SETRECFILTER;
REPORT.RUNMODAL(REPORT::"ReportName", true, false, Rec);
?
---jhoek wrote:Place a button on the form, and add the following code to the OnPush trigger of this button.
MyRecord := Rec;
MyRecord.SETRECFILTER;
REPORT.RUNMODAL(REPORT::"ReportName", true, false, MyRecord);
where...
MyRecord is a record var of the same subtype as Rec
ReportName is the name of the report that is to be used for printing.0 -
I usually do that to ensure that running the report doesn't affect Rec in any way, and to allow me to set additional filters on "MyRecord" - again without affecting Rec. Makes sense?Kind regards,
Jan Hoek
Product Developer
Mprise Products B.V.0 -
-
Yes it makes sense! Thank you.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