Installation guide
Zetadocs for NAV Installation Guide
This edition 5
th
December 2012 © Copyright Equisys plc 2012 All trademarks acknowledged All rights
reserved
Page 126
Figure 53 - Order Confirmation Report with Zetadocs Modifications
This is not always the case for all reports and so you must determine the record you want to link to and the
dataitem that is constitutes the main print output loop of your report before adding the Zetadocs Integer
dataitem and associated code. Often a report which is based on line records filtered by another record type
will have different records to link to and as the main output loop. A good example of this is the ZD-
Remittance Advice – Journal report shipped in the sample reports .fob with Zetadocs for NAV.
Report modification best practices
Only call AddRecord with records that will print output.
o This is why the Zetadocs dataitem comes at the end of the report loop. That way if there is
any reason to skip a record or there is no report output for that record, AddRecord will not
get called.
Only call AddRecord with actual Record RECORDIDs.
o Do not get the RECORDID of a temporary table and call AddRecord passing that value as
this can lead to errors.
Report modification steps NAV 6
The following instructions need to be followed to modify an existing report to work with Zetadocs, simply
repeat these steps for each report you wish to configure.
Open the report designer for the report that you want to modify.
Scroll to the empty row at the bottom and create a new Integer data item called Zetadocs.
Indent this data item once.
Change the DataItemTableView property to SORTING(Number).
Change the MaxIteration property to 1.
Now add the following global variables:
Name
Data Type
Sub Type
ZdSend
CodeUnit
Zetadocs-Send
ZdRecRef
RecordRef
Add the following code to the OnPostDataItem trigger for the Zetadocs data item:
ZdRecRef.GETTABLE(<Main Data Item>);
ZdSend.AddRecord(ZdRecRef.RECORDID);