I have one option field on the request page of the report, and I want to preview the report based on the layout option selected on the request page in the business central.
let me know, Please let me know if there is any way to do this.
How to select the layout of the report on the request page of report in business central
Hi,
Its a bit tricky but do able.
You have to save your requestpage option in a Single Instance Code unit or use Isolated Storage to store the option value. Use one of the Report Triggers to save the option value.
In the Code unit ReportManagement (ID: 44) there is a procedure- OnFetchReportLayoutByCode().
You can retrieve your option from the Single instance codeunit in this procedure and modify the layout code to the layout you need to use
.
Alternatively,
Make two reports in one RDLC inside two tables and only show the table that the Report Option Selected.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.