Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Custom Report layouts chosen based on Field

Posted on by 10

Is it possible to choose what custom report layout Nav 2017 uses for things like sales invoices based off of some field on the sales invoice?

For example, could I have a checkbox on a form that, when unchecked, the printed invoice is generated using CustomLayout1. Then, if that checkbox is checked, the printed invoice is generated using CustomLayout2?

If not, is there any way to determine what shows up on the custom report based on some field value?

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 73,565 Super User 2024 Season 2 on at
    RE: Custom Report layouts chosen based on Field

    Hi, You said both methods would work.

    For method 1, a simple example, when a field is True, run a 50100 report, and when a field is False, run a 50101 report. Their layout is different.

    For method 2, you can use IIF functions in RDLC file.

    More details: https://docs.microsoft.com/en-us/sql/reporting-services/report-design/expression-examples-report-builder-and-ssrs?view=sql-server-ver15#DecisionFunctions

    pastedimage1648422606314v1.png

    Hope this will help.

    Thanks.

    ZHU

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Custom Report layouts chosen based on Field

    Hi Paul,

    yes it’s possible but you have to create two reports and on a button you have to put the conditions like that so it prints the report according to your choice and for all those things you have to customise the solution.

    thanks

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Custom Report layouts chosen based on Field

    Fully possible through customization but i think the standard functionality comes a bit short here.

    Would be easier in the later versions because there you can substitute reports in code.  

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans