HOWTO: Enable Zetadocs printing from NAV Role Tailored Client
This Zetadocs technical note applies to:
This document explains what needs to be done to enable printing from the role tailored client (RTC) to Zetadocs.
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.
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
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.
Figure 2 - Zetadocs Report Selections for non modified reports.
Setup “Zetadocs PDF” as the printer for these reports in the Printer Selections table.
Figure 3 - Printer Selections
Setup the reports to run in the Report Selections table for Sales and Purchase as appropriate also.
Figure 4 - Sales Report Selections
Set the Zetadocs Report Settings for the report.
Figure 5 - Zetadocs Report Settings
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.
Figure 6 - Adding the Embedded Command TextBox
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)
& First(Fields!tbZdCustComms.Value)," \\" ," \" )," ^^" ,-1,1), Chr(13) & Chr(10))
Now view the “Report Properties” (Right-click on the grey area beside the layout and click Properties)
- Name: tbZdAllEmbComms
- CanGrow: True
- CanShrink: True
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.
- 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).
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.
Last updated: 12 March 2010 (BM/MW)