Problem writing a handler for a report with a request-page

UserUser777
Member Posts: 1
Hi!
I'm testing MS Dynamics Nav (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-testing-application). I have a problem writing a handler for a report with a request-page that is run before the report starts to execute. On the request page need to specify a parameter for the report, after which the report is printed. A request page has a predefined set of buttons: OK and Cancel, there are no others.
I would like to save the report to a file.
1. If I use the request page handler, I cannot use the method Report.SaveAsPdf, an error occurs: The TestPage is not open (it makes sense, because after selecting the settings on the request page, it was closed).
2. If you use the method Report.Save As in the request page handler (having previously intercepted the generated xml), an error occurs indicating that the parameters selected on the request page were not applied or most likely reset.
3. If the request page handler does not attempt to save the report in any way, an error occurs: User interface without processing: ReportData
The documentation (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-requestpagehandler-attribute) states: If you create a ReportHandler method, then that method replaces all code for running the report, including the request page, and a RequestPageHandler is not called. Only create a RequestPageHandler method if you are not using a ReportHandler one.
Can you tell me how to work with the request pages in the report handler to select the necessary parameters?
I'm testing MS Dynamics Nav (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-testing-application). I have a problem writing a handler for a report with a request-page that is run before the report starts to execute. On the request page need to specify a parameter for the report, after which the report is printed. A request page has a predefined set of buttons: OK and Cancel, there are no others.
I would like to save the report to a file.
1. If I use the request page handler, I cannot use the method Report.SaveAsPdf, an error occurs: The TestPage is not open (it makes sense, because after selecting the settings on the request page, it was closed).
2. If you use the method Report.Save As in the request page handler (having previously intercepted the generated xml), an error occurs indicating that the parameters selected on the request page were not applied or most likely reset.
3. If the request page handler does not attempt to save the report in any way, an error occurs: User interface without processing: ReportData
The documentation (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-requestpagehandler-attribute) states: If you create a ReportHandler method, then that method replaces all code for running the report, including the request page, and a RequestPageHandler is not called. Only create a RequestPageHandler method if you are not using a ReportHandler one.
Can you tell me how to work with the request pages in the report handler to select the necessary parameters?
0
Answers
-
[Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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