Technical Notes, Zetadocs

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.

  1. Mark up the chosen report following the instructions in the Zetadocs for Microsoft Dynamics Installation Guide. Section 10.
  2. 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.

  3. 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:

    • tbZdEmbComms
    • tbZdMultiRecComms
    • tbZdCustComms

    Figure 1 - Changing the textbox names

  4. Compile and Save the Classic version of the Report.
  5. 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.
  6. Ensure they are not selected in the Administration-> Zetadocs-> Advanced-> Zetadocs Report Selections. Note you may not have any selected in this dialog.

  7. Figure 2 - Zetadocs Report Selections for non modified reports.

  8. Setup “Zetadocs PDF” as the printer for these reports  in the Printer Selections table.

  9. Figure 3 - Printer Selections

  10. Setup the reports to run in the Report Selections table for Sales and Purchase as appropriate also.

  11. Figure 4 - Sales Report Selections

  12. Set the Zetadocs Report Settings for the report.

  13. Figure 5 - Zetadocs Report Settings

  14. 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.
  15. 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).
  16. View the layout by clicking the layout menu item (View-> Layout).
  17. 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.

  18. Figure 6 - Adding the Embedded Command TextBox

  19. 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)

     

    =Join(Split(Replace(First(Fields!tbZdEmbComms.Value)

    & First(Fields!tbZdMultiRecComms.Value)

    & First(Fields!tbZdCustComms.Value)," \\" ," \" )," ^^" ,-1,1), Chr(13) & Chr(10))

    • Name: tbZdAllEmbComms
    • CanGrow: True
    • CanShrink: True
  20. 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).
  21. Now save and close the Report Layout Editor.
  22. Click YES when prompted by NAV to save modifications to the report rdlc layout.
  23. Compile and Save the Report in NAV.
  24. 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.

    • Figure 7 - Cover Page including Embedded Commands

    • Pages 2 or more – Your Report Pages.

    Figure 8 - Pages of Report

  25. 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).
  26. 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)