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

UserUser777UserUser777 Member Posts: 1
edited 2024-09-25 in NAV Three Tier
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?

Answers

  • krikikriki Member, Moderator Posts: 9,110
    [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!


Sign In or Register to comment.