Equisys technical notes

Technical guidance, explanations and fixes for our products

PRB: Printing several multiple page reports from GP to Zetadocs PDF causes batch documents to be split incorrectly



ID: ZTN4164

This Zetadocs technical note applies to:

  • Zetadocs for GP v2.5 and earlier.


With Zetadocs for GP installed and Dynamics GP running on the system, after printing several multiple page reports to the Zetadocs PDF printer, the documents loaded into the client have not been split correctly according to their record number.


This is due to an overlapping issue occurring in the VBA code of the GP report that uses the wrong record number.
This has been acknowledged by Microsoft as an issue with Dexterity and a workaround has been provided from Microsoft.


To resolve this issue, proceed to the following:

  1. Open Microsoft Dynamics GP.
  2. Browse to Microsoft Dynamics GP > Tools > Customise > Report Writer.
  3. Select Microsoft Dynamics GP on the next window.
  4. Click on Reports and open the report that needs correction.
  5. Click on the Layout button and browse to Tools > Visual Basic Editor (Alt + F11).
  6. In the Left hand Project panel of Visual Basic, browse to Microsoft_Dynamics_GP > Microsoft Dynamics GP Objects and double click on the desired report. The associated code will be displayed in the main window.
  7. Browse to the top of the VBA code and add the following line:

           Option Explicit
          Dim sSOPNumber As String

  8. Replace every occurrence of the variable  SOPNumber  with  sSOPNumber in the report code.
  9. Finally, locate the function named  Report_BeforeRH  and add the following line at the top of this function:

           sSOPNumber = SOPNumber

  10. Save the report and close Visual Basic.
  11. In Microsoft Dynamics GP, go to File > Microsoft Dynamics GP to exit the Report Writer and go back to the main window.
  12. Print a record from Microsoft Dynamics GP using the corrected report and confirm the problem is resolved.


This has been identified by Equisys as a problem with the software versions given above.

Last updated: 6th January 2012 (SD/MW)

Equisys Logo, Document Management and Expense Management for Business Central

Replaced by script