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?
0
Comments
http://www.epimatic.com
http://www.epimatic.com
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
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 :-)
http://www.epimatic.com
/Claus Lundstrøm
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 :-)
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?
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 :-)
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.
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?
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"