Extended Functionality in Report Printing - OnReportPost
Introduction
The enhanced functionality of the revamped OnReportPost function offers increased flexibility while handling report printouts. The new feature allows users to archive reports to another data record. This article provides an overview of the new functionality and its application.
The Overloaded OnReportPost Function
Description of the Code
The procedure 'OnReportPostDataItem' takes several parameters, including 'ParamRRecordRef' and 'ParamSaveToRecordRef'. The code first checks whether the shadow or PDF print functions are deactivated. If activated, it copies the relevant data from the source data record reference to the target data record reference. The 'SaveRelation' function is called to establish the relationship between the data sets and return the result.
Application Example
This function is particularly useful if a report is to be created from a source table and archived in another table. For example, a report based on table A can be moved using the OnReportPost function so that it is linked to table B.
Advantages
Increased flexibility: Users can upload reports to different data sets, resulting in more flexible data management. Improved user experience: The feature was developed in response to user feedback to improve the overall user experience. Efficiency: The ability to attach reports specifically to different datasets increases the efficiency and accuracy of data management.