| # Technical details This section contains an overview of the components of the LN Report Archive solution, and describes their function in the report archiving and reprinting processes. Refer to the following sections for details: Tables Sessions DLLs Log file Data flow during first print Data flow during reprint Report splitting Authorization for archive directories Tables The solution contains the following tables: Report Archiving Parameters (ttaad340) This table contains general settings, such as the base path for the archive, and is maintained through the Report Archiving Parameters (ttaad3140s000) session. This table must be created in company 000 only. Report Archive Groups (ttaad341) This table contains the settings, such as extension path and keywords, for the various report groups and is maintained through the Report Archive Groups (ttaad3541m000) session. This table must be created in company 000 only. Report Archiving Rules (ttaad342) This table contains the rules that determine which reports must be archived and is maintained through the Report Archiving Rules (ttaad3542m000) session. This table must be created in company 000 only. Archived Reports (ttaad345) This table contains details, such as the location of the print file and the report code, on the reports that are already archived. To view these details and reprint archived reports, use the Archived Reports (ttaad3545m000) and Print Archived Reports (ttaad3445m000) sessions respectively. You must create this table in all companies where reports must be archived. Sessions The solution contains the following sessions: Report Archiving Parameters (ttaad3140s000) Report Archive Groups (ttaad3541m000) overview + editable details session Print Report Archive Groups (ttaad3441m000) Report Archiving Rules (ttaad3542m000) overview + editable details session Check Report Archiving Rules (ttaad3442m100) Print Report Archiving Rules (ttaad3442m000) Archived Reports (ttaad3545m000) overview + editable details session Print Archived Reports (ttaad3445m000) Move/Delete Archived Reports (ttaad3445m100) Export Archiving Settings (ttaad3241m000) Import Archiving Settings (ttaad3242m000) DLLs The solution uses the following DLLs: ttdllreparch: A new DLL that is used to check whether a report must be archived and to reprint archived reports. ttstprepdll: This DLL already existed in Tools and was modified to support report archiving. This DLL splits a print job, depending on the report archiving rule, into various separate files. For details on report splitting, refer to: Report splitting and to the online Help of the Report Archiving Rules (ttaad3542m000) session. Log file If errors occur during the archiving of a report, these errors are logged in the ${BSE}/log/log.reprint log file. Reading the content of this log file is useful if, due to a new report archiving rule, a report is archived for the first time. Data flow during first print When a user issues a print command, the ttdllreparch DLL checks whether the Report Archiving Rules (ttaad342) table contains a rule that indicates that the report must be archived. If the report must be split, the ttstprepdll splits the print job, depending on the split expression specified in the rule. The split reports are saved as printer-independent files on the location that is specified in the Report Archiving Parameters (ttaad3140s000) session and the Report Archive Groups (ttaad3541m000) session. That location is: Base path for Archive/ Extension path for Archive. The extension path can contain variables and is evaluated at the moment the files are written. For details on report splitting, refer to: Report splitting and to the online Help of the Report Archiving Rules (ttaad3542m000) session. Data flow during reprint If a user issues a reprint command through the Print Archived Reports (ttaad3445m000) session, the user must select a device on which the report will be reprinted. Subsequently, the ttdllreparch DLL searches in the Archived Reports (ttaad345) table for the location of the print files. If the file is found, the report is reprinted on the selected device. Report splitting When you print an LN report, a temporary print file is always generated. This file contains the report layout and the data of the records to be printed. If you print a report that is selected to be archived, the report's temporary print file is usually split into several smaller print files, which are stored in the report archive folder The splitting is based on the Split Expression that is defined in the report archiving rule. Example The Report Archiving Rules (ttaad342) table contains a rule that indicates that the invoice report must be archived. In this rule, the invoice number is selected as the Split Expression. You run the Print Invoices session and print a range of 200 invoices. This results in a single temporary print file that contains the layout and the data for 200 invoices. The content of this temporary file is printed. Because the report must be archived, the temporary file is split into 200 separate files, one for each invoice, which are stored in the report archive folder. Later on, for example, after nine years, you can reprint any of these 200 invoices individually. Authorization for archive directories Archived reports are stored in several subdirectories under the base path that is specified in the Report Archiving Parameters (ttaad3140s000) session. Usually each archive group has its own subdirectories. See also Extension path for Archive and the online Help of the Report Archive Groups (ttaad3541m000) session. A user can only archive a report, if the user has write authorization for the directory (base path/extension path) in which the report will be stored. To avoid authorization problems, verify that all users have write authorization for all subdirectories under the base path. |