Printing Batch Reports from Archived XML Files in SIMATIC BATCH
Printing batch reports from completed batches that have already been auto-archived as XML files and automatically deleted from the SIMATIC BATCH Control Center (BCC) requires restoring the archived batch record into the active database or configuring automated PDF report generation prior to deletion. Once a batch is deleted from the active runtime database, it cannot be rendered directly from an unparsed XML file using standard BCC report commands. To generate reports for past batches, engineers must utilize the "Restore Archived Batch" function in Batch Control Center to temporarily reload the .xml / .sbx batch record, or configure Batch Project Settings to automatically print or export a signed PDF report at the exact moment of batch archiving.
Table of Contents
- SIMATIC BATCH Archiving and Database Lifecycle
- Why Deleted XML Batches Cannot Be Printed Directly
- Method 1: Restoring Archived XML Batches in Batch Control Center
- Method 2: Configuring Automated PDF Generation on Archiving
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
SIMATIC BATCH Archiving and Database Lifecycle
In regulated process industries (pharmaceutical, chemical, food and beverage), SIMATIC BATCH generates comprehensive electronic batch records detailing recipe execution, setpoint changes, operator interventions, alarms, and historical process trends.
To maintain SQL Server database performance and prevent database bloat over years of production, SIMATIC BATCH provides an automated lifecycle management feature in Batch Control Center (BCC) -> Project Settings -> Archiving:
1. Auto-Archive Batches: Once a batch reaches the 'Closed' state, the system automatically packages the batch data into a standardized file format (such as .xml or compressed .sbx) and transfers it to a centralized network share.
2. Auto-Delete Archived Batches: To free space in the active runtime database, BCC deletes the batch from the active project tree immediately following successful archiving.
While this preserves system responsiveness, plant operators frequently discover that they can no longer right-click the completed batch to print or view the formal batch production report.
Why Deleted XML Batches Cannot Be Printed Directly
A common misconception is that the generated .xml file is an independent, printable document:
.xml / Shared Archive Folder.sbx / Backup Archive Directory.pdf / Designate Export Directorysbdata)The .xml archive contains raw tagged process data (elements, steps, timestamps, parameters), but does not contain the graphical layout, headers, signatures, or page styling defined in the SIMATIC BATCH Report Template (.rbf / Crystal Reports / Advanced Report). Therefore, double-clicking the XML file only opens raw text data in a web browser.
Method 1: Restoring Archived XML Batches in Batch Control Center
To print a batch report for an archived batch that was deleted from the active database:
- Open SIMATIC BATCH Control Center with administrative or supervisory permissions.
- Navigate to the menu: Batch -> Restore... (or right-click the 'Batches' root folder and select Restore Archived Batch...).
- In the file browser dialog, navigate to the shared archive folder containing the exported
.xmlfiles. - Select the target batch file (e.g.,
Batch_20180821_001.xml) and click Open. - SIMATIC BATCH parses the XML schema, validates the electronic checksum, and temporarily inserts the batch back into the active database under the Archived / Restored Batches category in a read-only state.
- Right-click the restored batch -> select Print -> Batch Report (or Print Preview).
- Select the desired Report Template and output the document to the physical printer or PDF printer.
- Once printing is complete, the restored batch can be safely deleted or re-archived to maintain database hygiene.
Method 2: Configuring Automated PDF Generation on Archiving
To eliminate the need for manual batch restoration, configure SIMATIC BATCH to automatically generate and save a permanent PDF report at the exact moment of archiving:
- Open SIMATIC BATCH Control Center.
- Select System -> Project Settings.
- Navigate to the Archiving tab.
- Check the option: Print report automatically during archiving.
- Select the default Report Template (e.g., Standard Batch Report) and configure the destination printer to a virtual PDF printer (such as
Adobe PDForMicrosoft Print to PDF) configured for automated silent file output. - Designate an automated archive directory for PDFs (e.g.,
\\Server\Batch_Reports_PDF\). - Critical Caution: If the report template is ever modified or re-selected in Project Settings, verify that this checkbox remains enabled, as template changes frequently reset printing preferences.
Verification
To verify batch report restoration and archiving workflows:
1. In Batch Control Center, select an archived batch XML file and execute Batch -> Restore...; verify that the batch appears in the project tree with all recipe phases, parameters, and alarms intact.
2. Generate a Print Preview; confirm that all step durations, operator comments, and process values render correctly across all report pages.
3. Complete a test batch in production; verify that upon batch closure, both the .xml raw data archive and the rendered .pdf report file are generated simultaneously in the target network shares.
Limitations and Operational Precautions
Never manually modify or alter the contents of an archived .xml batch file. SIMATIC BATCH embeds cryptographic hash checks within archive records to satisfy 21 CFR Part 11 and GMP data integrity compliance; any manual edit or whitespace modification will invalidate the checksum, causing BCC to reject the file as corrupted during restore operations.
Engineer FAQ
Can I view an archived batch report without restoring it to Batch Control Center?
If SIMATIC Process Historian and Information Server are deployed in the plant, archived batches stored in the long-term Process Historian database can be viewed, queried, and printed directly via the web-based Information Server without restoring them to BCC.
What happens if I change the report template after enabling auto-print on archive?
In SIMATIC BATCH, changing the assigned report template often unchecks the 'Print report automatically during archiving' option. Always re-verify the Archiving tab in Project Settings whenever templates are adjusted.
Can an XML archived batch be restored into a newer version of SIMATIC BATCH?
Yes. SIMATIC BATCH includes backward-compatibility migration utilities that allow archived XML batches from older releases (e.g., V8.0/V8.1) to be restored into newer versions (e.g., V8.2/V9.0).
Technical References
- SIMATIC BATCH Control Center Manual (A5E33814046)
- SIMATIC BATCH Getting Started Manual (A5E33814049)
- SIMATIC Process Historian & Information Server Manual (A5E33814065)
Related Articles
- Inspecting and Decompressing SIMATIC BATCH SBX Master Recipe Files
- Interpreting Exclamation Mark Warnings in SIMATIC BATCH Control Center
- Safely Initializing Redundant SIMATIC BATCH Standby Servers During Active Production
Related Tags
- SIMATIC BATCH
- Batch Archiving
- XML Batch Report
- Batch Control Center
- 21 CFR Part 11