Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

REPORT / FORMS LAYOUT

Posted on by Microsoft Employee

Good day!

Does anyone knows how to change the current layout for the forms?

I tried editing the Purchase Order in MS Word using the XML Mapping Pane and I had no error on it.

In Custom Report Layout, I was able to make a copy of the layout and imported my customized PO.

However, when I go back to Print my PO, still, the built in layout is in use.

I also tried doing it in Report Layout Selection, but still, I cannot see my customized PO as my default layout.

I hope you could help.

Thank you.

  • Suggested answer
    Karldjaw Profile Picture
    Karldjaw 150 on at
    RE: REPORT / FORMS LAYOUT

    I am actually using Dynamics NAV 2016 but I hope what I did in NAV 2016 will work with Dynamics Financial.

    1. Go to Report Layout Selection
    2. Purchase-Order would be the Report ID 405 under Report Name: Order
    3. Click on Order and click Custom Layouts on the top Ribbon
    4. Choose your desired layout by simply click on the line
    5. Go to Actions Pane on the top Ribbon and click on Update Layout located on the ribbon

    Those steps will set your customized PO as the default layout..

    I hope it helps!

    Have a good day!

  • AJAnsari Profile Picture
    AJAnsari 5,754 on at
    RE: REPORT / FORMS LAYOUT

    Thanks for the heads up about Report Builder 2016.

    Sadly, I remember those GetData / SetData days on NAV well, and was adept at working with them. I agree that for the end-user, it is NOT AT ALL a friendly environment to work it.

  • RTIBobV Profile Picture
    RTIBobV 125 on at
    RE: REPORT / FORMS LAYOUT

    @AJ Ansari Report Builder 2016 does not work with Dynamics Financials (DF).  I discovered this the hard way and have confirmed this with Microsoft.  Microsoft® SQL Server® 2014 SP2 Report Builder is the most current release that can be used successfully with DF, as posted on their NAV system requirements page System Requirements for Microsoft Dynamics NAV 2017.

    Also if you look at the export rdl file created from this report, you will see that the structure is inscrutable, with fields defined by expressions like 

    =Code.GetHeaderData(9, code.GetGroupPageNumber(code.IsNewPage(ReportItems!GroupOnFields.Value,Globals!PageNumber),
    Globals!PageNumber))

    which actually references embedded code in the form (view rdl report in xml viewer) which combines the fields into a long string, and then parses individual elements back out of it.

    If I were to guess, this form is a throwback to an older release and has not been brought up to date (If it aint broke don't fix it!).  Sadly the intended user of DF will not have any luck massaging this report to their needs.

  • Suggested answer
    AJAnsari Profile Picture
    AJAnsari 5,754 on at
    RE: REPORT / FORMS LAYOUT

    Hi RTIBobV,

    With regards to 10122, the deal is that Microsoft has only created a built-in RDLC layout for it, and no built-in Word Layout. That means when we want to create a custom report layout in Word, we have to build from scratch, and that is more work for us for to. While it's an area that Microsoft can improve on (and we'd all benefit from it), it's not necessarily an issue or bug.

    As an FYI, if you are familiar with Visual Studio Report Designer, or have worked with SSRS reports in the past, I suggest trying to create a new Custom RDLC Layout instead of a Word layout. When you do this for Report 10122, it will copy the built-in RDLC layout as a starting point for your custom report layout.

    You can export this file and edit/design the report with the free SQL Report Builder tool (https://www.microsoft.com/en-us/download/details.aspx?id=53613), or for more functionality, use Visual Studio Professional (or Community edition, if your organization meets the licensing requirements for free use).

    As an FYI, the RDLC tools allow you to create more complex layouts, expressions, conditional properties, etc. than the Word tool allows for.

    To address the other part of the question: The Company information fields are not printing. Having tested the scenario you've described, I can confirm that this is definitely looking like a bug. The issue here does not have to do with either the RDLC or Word Layout. In Dynamics NAV, when you try to print Report 10122, you see a option on the Request page called "Print Company Address" (see screenshot below). When you enable this option, only THEN will the Company Address fields print. By default, the option is not enabled. 

    In Dynamics 365 for Financials, however, this option is not showing on the report request page, so we have no way of enabling it, and therefore we are stuck with no way to show those fields in our report printout.

    I will open a separate thread to report this bug.

    PO004.JPG

    PO004.JPG

    I hope this helps. Please verify by clicking Yes if my response has answered your question.

  • RTIBobV Profile Picture
    RTIBobV 125 on at
    RE: REPORT / FORMS LAYOUT

    I am having the same issue with some reports.  For example Purchase Order, Report ID 10122.  After performing steps 2 through 5, the exported file default.docx is a blank word doc.  If I navigate to the XML Mapping pane, and select reports/Purchase_Order/10122 from the drop down, I can see the fields, but there is no layout provided.  So I created a simple report with just No_PurchaseHeader, CompanyAddress1, CompanyAddress2.  I imported the word doc and printed a test report.  Of the three fields, only the No_PurchaseHeader was populated.

    I agree that a template could be created this way, but this is a tremendous amount of work when all I really need is to print our company information on the purchase order.  And, apparently the query results does not include the company information.  Other wise it would have been displayed.

    @AJAnsari Please check this report on your Dynamics Financials instance and let me know if your experience is different.

  • Suggested answer
    AJAnsari Profile Picture
    AJAnsari 5,754 on at
    RE: REPORT / FORMS LAYOUT

    Hi Hazel,

    Just to be sure, can you verify that this is what you're doing (see the list below)?

    If you follow these steps, your custom report layout should display. As I typed up these steps us, I also validated it in Dynamics 365 for Financials and can confirm that it works as expected. I'm thinking you probably missed a step or two here.

    1. Navigate to Report Layout Selection page and identify the report for which you need a custom layout
    2. Highlight / select that Report in the list, then click on Custom Layouts in the ribbon
    3. In the Custom Report Layouts page that opens up, click on New in the ribbon, and select Insert Word Layout, Click OK.
    4. Back on the page, type in a Description for your new Custom Layout, and also define it is specific to a Company (if left blank, it applies to all Companies)
    5. Click Export Layout in the ribbon to save the Word file (and then you edit / make changes to the layout using the XML mapping pane as you've noted, and save the file)
    6. Click Import Layout in the ribbon to get the layout into Dynamics 365
    7. Click Run Report in the ribbon to test that the layout works as desired
    8. Close the Custom Report Layouts page to return to the Report Layout Selection page
    9. Here, click on the Select Layout column (for your highlighted report) to see the dropdown menu of choices. Choose 'Custom Layout', and a window will pop-up. Here select the new Custom Layout you've created and click OK.
    10. Now close this window, and go to Search (or whichever screen you run the Report from), find the report, and run it. 

    Another reason could be that there are two reports in Dynamics 365 for Financials with very similar names, and you're possibly modifying one and running the other.

    I hope this helps. If my response has answered your question, please verify by clicking Yes on "Did this answer your question?"

  • RTIBobV Profile Picture
    RTIBobV 125 on at
    RE: REPORT / FORMS LAYOUT

    The Purchase Order report does not have a built in word layout.  You can export the RDLC, but do NOT use the 2016 version of Report Builder.  You can use the 2014 version to modify the layout.  The Purchase Order appears to be an older report, and uses an arcane method of populating the fields via embedded code in the report.  Also, some of the data, like company information, does not appear to be in the query results dataset, so we have resorted to hardcoding some values into the report.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: REPORT / FORMS LAYOUT

    I tried exporting the built in word layout but when I opened it.. the document is empty.

  • Suggested answer
    Theresa Nistler Profile Picture
    Theresa Nistler 551 on at
    RE: REPORT / FORMS LAYOUT

    In the Report Selection Purchases, select the Order and make sure that the report ID associated with this report is the one you customized in Custom Report Layouts.  This tells the system which report to use when running a purchase order. I would also recommend that you start your edited form with the report object that includes the built in word layout. such as 1322 - purchase order.

  • Chris Bulson Profile Picture
    Chris Bulson on at
    RE: REPORT / FORMS LAYOUT

    You should be able to navigate to the 'Report Layout Selection' window.

    Select the Purchase -Order report

    Click on Custom Layouts, Create a new layout, then export and make your changes.

    Save those changes locally and then choose to Import - Import that file to your new report.

    Back on the Report Layout Selection window, change the Selected layout for the Purchase - Order report to 'Custom Layout' and select the correct Custom Layout Description.

    You can 'Run Report' directly from this screen to see which one it is using.

    You should not be attempting to replace the Built-in report.

    Thanks,

    Chris

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

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,353 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,251 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans