Values into FilterFields if a report is being printed

dstiegele
Member Posts: 10
Hi,
I need to fill out some requested filter fields so that they contain values if the user is opening/starting the report. This works if the report is being defined as a local variable and is started with RUNMODAL.
But I need to fill in these values if the report is being printed from the form 282, "Report Selections". Is there any point/trigger from where I can modify the requested filter fields so that they are filled in when the user opens this report?
Thanks in advance!
Dirk Stiegele
I need to fill out some requested filter fields so that they contain values if the user is opening/starting the report. This works if the report is being defined as a local variable and is started with RUNMODAL.
But I need to fill in these values if the report is being printed from the form 282, "Report Selections". Is there any point/trigger from where I can modify the requested filter fields so that they are filled in when the user opens this report?
Thanks in advance!
Dirk Stiegele
0
Comments
-
Hi,
I don'k know which values do you want to put on the report, but i leave here some ideas that might work:
To show the last non printed record of a table, create a boolean field in that table witch you modify each time you run the report;
To show some information related to the user, you can create a field on the table 91 containing the next/last information to show on the report.
Regards
Afonso0 -
Hi,
thanks for your help. But what I am asking for is how to fill some of the requested filter fields with values, so that they contain this value when the user opens this report to print it from within the form 282, "Report Selections".
Thanks!
Dirk Stiegele0 -
I understood what you want, but if you can record the information that you want to apply on the filters on thoose tables, you can get the information available on the tables and apply on the report as soon as you open it...
Regards...
Afonso0 -
Alastair Farrugia0
-
This solution suggest exactlly what he doesn't want to do. Still it can be used. Change button Print:OnPush on F282:
CurrForm.SETSELECTIONFILTER(TempReportList); ReportSelectionPrint.Start(TempReportList);
toIF "Report ID" = REPORT::"My Report" THEN BEGIN MyRec.SETRANGE(MyField1,Filter1); MyRec.SETRANGE(MyField2,Filter2); MyReport.SETTABLEVIEW(MyRec); MyReport.RUNMODAL; END ELSE BEGIN CurrForm.SETSELECTIONFILTER(TempReportList); ReportSelectionPrint.Start(TempReportList); END;
For more reports use CASE statement®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
Hi,
that's what I am looking for.
Do I need to declare a local variable for MyRec and MyReport or what was your intention?
Thanks!
Dirk0 -
As you wrote in your question, you know how to set some required filters if the report is declared as local var.
My intention was that you use "this way of setting filters", but on proper trigger. MyRec and MyReport should be defined as locals (or globals), but defined for report ID you want to run ...®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
Thank you. It now works!
Regards,
Dirk0
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