Document (Purchase Order) with trailing pages

Rob_HansenRob_Hansen Member Posts: 296
edited 2014-08-07 in NAV Three Tier
We have a client that would like to append two terms and conditions (T&C) pages to the end of every purchase order. We considered using automation to print a PDF after each PO, but that really only works well for hardcopies. If they print to PDF, it complicates matters...especially when they would like a single PDF result containing the PO and the terms and conditions.

We would like to modify the purchase order document in NAV (RTC layout) to add two full pages of text at the end of the document so it all comes out as a single PDF, or so it prints a proper sequence of hardcopy pages when printing multiple POs (so if you print 10 POs from the list in NAV, it prints each PO followed by the two T&C pages collated after each one and not as a dump after the report). The challenge I have is that I'm not sure if this can be pulled off given the existing header/body/footer structure of the NAV 2009 purchase order document. Would it be possible to implement this without drastically restructuring the purchase order document? At a high level, what approach would need to be taken...add the text boxes to the Body section of the report and conditionally show them, then find a way to suppress the footer on the last two pages (T&C pages)? Is that possible?

Comments

  • Rob_HansenRob_Hansen Member Posts: 296
    Has anyone done something along these lines in the RTC? (Append pages to the end of a document report, directly in the RDLC definition?
  • Rob_HansenRob_Hansen Member Posts: 296
    Bueler? Bueler?
  • clauslclausl Member Posts: 455
    This is not possible with SSRS reports as I see it, both RDLC And RDLC reports. I'm thinking Sub Reports for RDL Reports, but don't think that will work either, and the NAV does not support RDL Reports and there is not support for Sub Reports in RDLC reports yet.
    So I would explore the possibility to print the report as PDF and then merge this report PDF with an existing terms and condition PDF stored on the server.
    So not something that works out of the box, but interesting scenario. Hopefully the new NAV Reporting Program Manager at Microsoft is listening, because I don't recall putting this scenario in the Product Backlog when I was the NAV Reporting Program Manager.

    /Claus Lundstrøm
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • Rob_HansenRob_Hansen Member Posts: 296
    Thanks Claus.
  • clauslclausl Member Posts: 455
    You are welcome, please let me know if you get this working.

    /Claus Lundstrøm
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • clauslclausl Member Posts: 455
    Thought about this a little longer, and you can actually accomplish this today.
    I have created a demo report with the first pages from the "Xbox LIVE Terms of Use" in the end of the report.
    Please find the demo report here: http://sdrv.ms/ODxD2S
    I have included the reports as PDF, TXT and FOB. I did this report in NAV 2013 so if you don't have NAV 2013 installed yet I have included the Report.RDLC and Dataset.XML. With these 2 files you can have a look what I did, using the Offline Report trick I explained here at my blog:http://mibuso.com/blogs/clausl/2012/06/24/offline-preview-and-debug-reports-in-microsoft-dynamics-nav-2013/

    The trick to get the last pages to not have anything else than the Terms and Conditions, is actually not to use any Header or Footer on the report. They will just take up space on the last 2 pages as they don't expand or collapse dynamically.
    So what I did was to add List control to Body. Grouped the List on "Customer No" and resized the List to the size of the page. I could have just set Page Breaks on Group Properties, but getting late here in Denmark, so I just made the List the size of the page. Then on the Rectangle I check marked "Add a page break after". Then after the List I just created a normal Textbox. In this Textbox I just copied the first pages from the XBOX Live Terms found here:http://www.xbox.com/en-US/Legal/livetou
    Then saved and compiled report. Ran the report and the report now runs through all customers with one customer on each page. When there are no more customers the XBOX Live Terms will be shown. Not really hard to do.

    When you think of it, all the Document reports in NAV would be dramatically simplified, if they were not using headers and footers, but I guess that is a complete other story, but really tempted to rewrite 206 because the way it's designed today it is just too damn hard to customize. Not saying I’m an expert in RDLC reports, but if I think it is hard, we will have partners crying when they are requested to customized 206 and other document reports in RDLC in NAV.

    I hope you can use my demo report to solve your customers request.

    /Claus Lundstrøm

    BTW, I will be doing a presentation at Directions 2012 on Tips and tricks for upgrading Classic Reports to NAV 2013 Reports. May I will see you there?
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • deV.chdeV.ch Member Posts: 543
    I totaly agree with you on document reports being implemented in a wrong way. I still can't understand why they were released that way in NAV2009, The huge Header is almost unusable for customers, ever heard of paper saving?... ](*,)

    On the topic of removing the headers, what i do is not completly remove them but i drasticly minimize them to not eat up that much space, which gives you the side-effect of not beeing forced to use setdata/getdata for most of your header fields.
    See my blogpost (http://devch.wordpress.com/2011/12/05/how-to-save-space-in-rdlc-documents-dynamic-header-height-workaround/) for this.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    clausl wrote:
    but if I think it is hard, we will have partners crying when they are requested to customized 206 and other document reports in RDLC in NAV.

    Small correction: not when trying to customize, but when trying to retain customizations they had in Classic for years. (*,) New projects are easier, people like to pay for customizations, they don't like to pay for the privilege of not losing customizations.

    Claus, is there a trick that once I for example got the layout of the Order Confirmation right, somehow reuse the same layout as a basis for say Invoice?

    I will try this, like, copy-paste all controls (in XML designer - Visual Studio bugs out), or in exporting the file as text, and then just changing captions and expression and not having to pull my hair out with the visual placement and spacing again? Is that a good idea? Or any better idea?

    Would... would it be a good idea to make a generic document (per customer), where you just send down text variables like HeaderLeftRow3Caption, HeaderLeftRow3Data, LinesColumn1Data etc. etc. and then just "save as" it for every actual document and fill it out differently, from different dataitems? Should I try this?
  • TonyDuarteTonyDuarte Member Posts: 92
    It's a bit tricky but can be done.
    If you add to your report a dataset for that information, that will show acording to some conditions you can do it.

    Using a list and an Integer for counting porpuse you can check if the value of the page is the page you aim to print and force a break in the layout to guarantee you print in a separate page.

    You could also switch the visible options so that it will only show when you want.

    It's a matter to choose how to "deal with it" :)
Sign In or Register to comment.