HOWTO: Enable Zetadocs printing from NAV Role Tailored Client
ZTN4081
ID: ZTN4081
This Zetadocs technical note applies to:
- Zetadocs for NAV v3.0
Summary
This document explains what needs to be done to enable printing from the role tailored client (RTC) to Zetadocs.
More information
Currently, enabling reports to print for the RTC using SRS requires using the Zetadocs NAV SDK Printing method. This involves marking up your report to include Zetadocs code and output Zetadocs Embedded commands on the report printout. For instructions on how to do this please refer to “Section 10 - Modifying NAV Reports to work with Zetadocs”of the Zetadocs for Microsoft Dynamics Installation Guide. The following instructions assume that this work has already been completed and tested in the NAV 6.0 Classic Client.
- Mark up the chosen report following the instructions in the Zetadocs for Microsoft Dynamics Installation Guide. Section 10.
- Verify that the textboxes added to the NAV classic report have the following names and if not modify them. This is important since it is these names that will be used in the SRS report layout to display the embedded command in the SRS report.
- tbZdEmbComms
- tbZdMultiRecComms
- tbZdCustComms
- Compile and Save the Classic version of the Report.
- Ensure that the report is working correctly from the NAV 6.0 Classic Client with the Zetadocs modifications made and reports being sent correctly using the Zetadocs PDF Client. Note, you will need to change the report configuration settings for reports done using this method.
- Ensure they are not selected in the Administration-> Zetadocs-> Advanced-> Zetadocs Report Selections. Note you may not have any selected in this dialog.
- Setup “Zetadocs PDF” as the printer for these reports in the Printer Selections table.
- Setup the reports to run in the Report Selections table for Sales and Purchase as appropriate also.
- Set the Zetadocs Report Settings for the report.
- Once you are happy that the report is working when printing from the classic client you can begin to enable it for printing from the RTC.
- In the NAV Classic Client, return to the design of the report from the Object Designer (Shift + F12) by selecting the report object and clicking the “Design” button (Shift + F4).
- View the layout by clicking the layout menu item (View-> Layout).
- In the “Body” section, create a very small, thin Textbox and place it as close to the top left of the body section as possible.
- Modify the properties of the Textbox as follows:
- Font: Normal, Arial, 1pt, Normal (or a similar font at 1pt)
- Value: (Must be exact as below, note the use of the textbox names we setup earlier)
- Name: tbZdAllEmbComms
- CanGrow: True
- CanShrink: True
- Now view the “Report Properties” (Right-click on the grey area beside the layout and click Properties)
- On the Layout tab change the Page Height to 29.7cm exactly (This is crucial to operation of A4 paper size reports. Failing to do so results in the printed report being output as a grainy image rather than report text and therefore the Zetadocs Embedded Commands cannot be read from the report. If you are working with Letter you should copy the exact page dimensions from the NAV Classic Report Section in cm).
- Now save and close the Report Layout Editor.
- Click YES when prompted by NAV to save modifications to the report rdlc layout.
- Compile and Save the Report in NAV.
- Test printing from NAV RTC by printing a single report and selecting preview. You should be prompted by a Zetadocs dialog to confirm the send details (unless you have modified report settings). Click OK and you should see a preview similar to the one below.
- Page 1 – A blank page apart from a tiny bit of text which contains the embedded commands.
- Pages 2 or more – Your Report Pages.
Figure 7 - Cover Page including Embedded Commands
Figure 8 - Pages of Report
- Next test by printing to the Zetadocs PDF Printer and ensuring that the client is reading values from the embedded commands (Email address is set etc).
- Finally it is a good idea to test with reports that run on to a second page (third page with embedded commands) and to try printing a batch.
To do this, open the report designer by clicking on the report in the Object Designer and pressing Alt + D. Next view the textboxes you put in during step 1. (View-> Sections). Select each of the 3 textboxes in turn from the top down and view their properties (Shift +F4), changing their names to the following, in order:
Figure 1 - Changing the textbox names
Figure 2 - Zetadocs Report Selections for non modified reports.
Figure 3 - Printer Selections
Figure 4 - Sales Report Selections
Figure 5 - Zetadocs Report Settings
Figure 6 - Adding the Embedded Command TextBox
=Join(Split(Replace(First(Fields!tbZdEmbComms.Value)
& First(Fields!tbZdMultiRecComms.Value)
& First(Fields!tbZdCustComms.Value)," \\" ," \" )," ^^" ,-1,1), Chr(13) & Chr(10))
Last updated: 12 March 2010 (BM/MW)