Equisys technical notes

Technical guidance, explanations and fixes for our products

PRB: Print preview dialog opens in the background when choosing print preview on a NAV RTC page

Print

ZTN4334

ID: ZTN4334

This Zetadocs technical note applies to:

  • Zetadocs for NAV 5.x and 6.0 using NAV 2013 and NAV 2013 R2

Symptom

On choosing print preview on a NAV report or page from an RTC page, if the Zetadocs Factbox is enabled on the page, the print preview will open behind the page rather than in the foreground.

Cause

This is due to a refresh function used by the Zetadocs addin that is activated when a NAV page changes (for instance, when you navigate from one record to another using the navigation buttons, or when print preview is selected). This also occurs when focus is given to the NAV page.

Resolution

For the affected pages, the Zetadocs code on the pages should be modified as follows:

  • Add a C/AL Global named PrevRecID of type RecordID
  • In the OnAfterRecord() function, modify the code to read as below (changes highlighted in red):

BEGIN ZdRecRef.GETTABLE(Rec); IF ZdRecRef.GET(ZdRecRef.RECORDID) AND (ZdRecRef.RECORDID < > PrevRecID)

THEN BEGIN PrevRecID := ZdRecRef.RECORDID;
CurrPage.Zetadocs.PAGE.SetRecordID(ZdRecRef.RECORDID);
CurrPage.Zetadocs.PAGE.ACTIVATE(TRUE); END; END;

Note that a newline is required before the first THEN statement, whereas existing code block is on one single line.

  • Save and compile the modified page.

Note that the changes are required for any page that has been modified to use Zetadocs functionality.

Status

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

Last updated: 1st April 2014 (NT) 

Keywords: print preview opens in background

Equisys Logo, Document Management and Expense Management for Business Central
 

Recent news

Action Fraud, the UK’s national reporting centre for fraud and cyber-crime, claims that nearly one in five businesses have been defrauded by an employee at some point. Claiming false travel and ...

We’ve written about the impact of COVID-19 on the way we work multiple times, and arguably one of the largest impacts has been on the way we collaborate. In data published by Statista , the ...