Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Preview the Report based on selection of option on request page in business central

Posted on by 20
Hi All,

I have an option field labeled "Report" on the request page. If "Sample1" is selected, I would like to display the Sample1 layout during the report preview. Conversely, if "Sample2" is selected, I would like the Sample2 layout to be shown. Is there a way to implement this functionality?



Thank you.
Categories:
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 2,138 on at
    Preview the Report based on selection of option on request page in business central
  • gdrenteria Profile Picture
    gdrenteria 10,067 Most Valuable Professional on at
    Preview the Report based on selection of option on request page in business central
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 2,138 on at
    Preview the Report based on selection of option on request page in business central

    Why are you creating a separate request field for this? Since the Report Layout section on the request page is distinct from your custom fields, it is not possible to programmatically change the layout using AL code directly.

    In Business Central, the layout selection on the report request page cannot dynamically control the layout used for rendering the report based on a custom option field.

    However, you can work around this limitation by either using multiple reports or guiding the user to select the layout manually from the Report Layout Selection page before running the report.



    select 3 dots. change layout and run report.





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.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,572 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,706 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans