1. Problem Statement: "Failed to Print Empty Document" in WinCC 7.0 SP3 Alarm Logging
When configuring automatic alarm logging on WinCC 7.0 SP3 (part of the SIMATIC WinCC V7 product line), engineers frequently encounter the runtime error "Failed to print empty document" immediately after activating WinCC Runtime, even before any process alarm has occurred. A secondary symptom is that the Printer column in the print job list is blank, while a downstream alarm event triggers no printout at all. The same fault is reproduced when the operator tries to print a single alarm acknowledgement slip on demand.
The error is independent of the HMI station. It appears whether the operator has configured the printer on the local LPT1 port, a shared Windows network printer, or a generic text-only driver. The error is generated by the WinCC Alarm Logging editor, not by the operating system print spooler, which is why printer self-tests from Microsoft Word or Excel succeed while WinCC reports an empty document.
This article documents the root cause, the four configuration layers that must all be correct, and a verified step-by-step procedure to make automatic alarm printing work on WinCC 7.0 SP3 with Report Designer.
2. WinCC V7 Alarm Logging Print Architecture
WinCC Alarm Logging decouples the alarm event pipeline from the physical printer through two distinct objects:
- Print job: a logical entry inside Alarm Logging that defines when to print (trigger), where to print (printer / file / LPT port), and which layout to use.
- Report Designer layout: an XML/RDL file stored in the project that defines what to print (columns, header, footer, page setup, sort order).
WinCC 7.0 SP3 ships with a set of pre-defined print jobs created automatically when a project is generated:
| Default Print Job | Trigger | Typical Use |
|---|---|---|
| @Report Alarm Logging RT Message Sequence | Incoming alarm event (real-time) | Automatic per-event alarm printing |
| @Report Alarm Logging RT Message List | Operator-triggered / on demand | Snapshot of currently visible alarms |
| @Report Alarm Logging Sequence | Archive shift | Shift-end sequence printout |
| @Report Alarm Logging Message List | Archive shift | Shift-end list printout |
| @Report Alarm Logging Archive | Long-term archive trigger | Historical alarm dump |
| @Report Alarm Logging Statistics | Schedule / on demand | Statistical evaluation |
The data flow at runtime is:
Process Tag / Bit Message
│
▼
Alarm Logging Engine ──► Triggers Print Job ──► Loads Layout from disk
│
▼
Report Designer Runtime
│
▼
Print Spooler (LPT1 / Network)
│
▼
Physical Printer
If any link in this chain is broken, the print job either silently does nothing or surfaces the "Failed to print empty document" pop-up at runtime activation. The root cause is therefore always in one or more of the following four configuration layers:
- The print job trigger (section 5).
- The printer destination column inside the print job (section 7).
- The Report Designer layout assigned to the print job (section 6).
- The Windows-level printer / LPT1 mapping (section 7).
3. Root Cause Analysis
Siemens documented the most common causes of the "Failed to print empty document" error in the SIOS FAQ How do you configure a print job for the automatic printing of messages in WinCC Alarm Logging? The mapping of symptom to root cause observed in field deployments is summarised below.
| Symptom | Most Likely Root Cause | Layer |
|---|---|---|
| Error appears once at RT start, no alarms print | Print job triggers on "Runtime Start" with empty result set, OR layout has no data source | Print job / Layout |
| Printer column in print job is blank | No printer selected for the print job; layout is valid but has no destination | Print job |
| Error appears, alarm comes, nothing prints | Layout file corrupted / modified in external editor; Report Designer runtime cannot render rows | Layout |
| Error appears, log file shows spool error 0x00000005 | LPT1 port not mapped in Windows session; user has no rights on network printer | OS / Spooler |
| NET USE LPT1 works in cmd, but WinCC cannot find printer | NET USE executed in user session, WinCC service runs in different session (LocalSystem / interactive) | Session / Service |
| Printer prints test page, WinCC still fails | Print job uses "Printer Name" with invalid Windows path | Print job |
4. Prerequisites
Before touching the project configuration, validate the following prerequisites on the engineering station and on the runtime station (the two are usually identical for single-station projects):
- WinCC 7.0 SP3 installed, including the Report Designer sub-component. Verify in Control Panel → Programs: the entry "SIMATIC WinCC Report Designer" must be present.
- Microsoft Excel is not required, but a default Windows printer must be installed and able to print a Windows test page successfully.
- For LPT1 attachment: a USB-to-parallel adapter with proper Windows driver (e.g. MosChip MCS7715) and a generic/text-only driver assigned to LPT1.
-
For network printing: the Windows user that runs WinCC Runtime must have
Printrights on the network share. WinCC Runtime launched from the start menu runs in the interactive user session; WinCC Runtime launched as a service runs asLocalSystemand cannot print to user-mapped network shares. -
Project file backup: copy the project folder (typically
C:\Siemens\WinCC\<ProjectName>) before any modification.
5. Step-by-Step: Configure the Print Job in Alarm Logging
This section walks through the Alarm Logging configuration that turns the pre-defined print job into a working automatic printer.
5.1 Open Alarm Logging
- Launch WinCC Explorer on the engineering station.
- In the navigation tree, right-click Alarm Logging and select Open. The Alarm Logging editor opens in its own window.
- In the Alarm Logging tree, expand Print Jobs. You will see the pre-defined print jobs listed in section 2.
5.2 Select the Correct Print Job
For automatic per-event alarm printing, the print job that must be edited is:
@Report Alarm Logging RT Message Sequence
Right-click this print job and choose Properties. The print job dialog opens with three configuration tabs: General, Trigger, Layout.
5.3 Configure the General Tab
| Field | Required Value | Notes |
|---|---|---|
| Name | @Report Alarm Logging RT Message Sequence | Do not rename; layout binding is by name. |
| Printer | Select a Windows printer, or type LPT1, or type a UNC path |
This is the field reported blank in the original incident. It must not be empty. |
| Number of copies | 1 (or as required) | Some LPT1 generic drivers ignore copies. |
| Print range | All pages | Used only for multi-page layouts. |
| File name | Blank for printer output; set only when printing to file | Mutually exclusive with Printer field on most drivers. |
5.4 Configure the Trigger Tab
The trigger defines when the print job fires. For "print alarms as they come", enable the following events:
| Trigger Event | Recommended State | Effect |
|---|---|---|
| Runtime start | Disabled on production systems | Prevents the "empty document" pop-up at RT start when no alarms exist yet. |
| Runtime stop | Optional | Prints a footer / shift summary on RT stop. |
| New message arrives | Enabled | Core trigger for automatic alarm printing. |
| Message acknowledged | Optional | Prints an acknowledgement slip. |
| Message status changes | Optional | Prints on Went / Came / Acknowledged transitions. |
| Archive closed | Optional | Used for shift archives. |
5.5 Configure the Layout Tab
On the Layout tab, point the print job to its corresponding RDL file:
@Report Alarm Logging RT Message Sequence.rpl
This file lives under the project directory at:
<Project>\PRT\<Language>\ALG\RtSeq.rpl
If the field is empty or shows red, the binding is broken and section 6 must be performed.
6. Step-by-Step: Validate the Report Designer Layout
Even with the print job configured correctly, a corrupted or modified layout will produce the "Failed to print empty document" error. Validate the layout as follows:
6.1 Open the Layout in Report Designer
- Close the Alarm Logging editor if open.
- In WinCC Explorer, right-click Report Designer → Open.
- Navigate to File → Open and browse to
<Project>\PRT\<Language>\ALG\RtSeq.rpl.
6.2 Verify the Data Connection
The default layout uses a table connected to the alarm logging archive via the internal ODBC data source. Check the connection:
- In Report Designer, click the table object inside the layout.
- Open the table's properties (right-click → Properties).
- Under Connection, confirm the data source is the alarm logging connection defined in the project (typically
CC_ALG_<ProjectName>_<Lang>_RT).
6.3 Verify the Column Set
The table must reference at least the columns listed in the table below; otherwise the rendering engine will produce an empty document even when alarms exist.
| Column | Source Field | Mandatory |
|---|---|---|
| Date / Time | MS_DATE / MS_TIME | Yes |
| Status | STATE | Yes |
| Number | MSG_NR | Yes |
| Class | CLASS_ID | Yes |
| Text | TEXT | Yes |
| Point of error | AGNR / AG_TEXT | Recommended |
| Priority | PRIORITY | Optional |
6.4 Save and Re-Test
- Save the layout (File → Save) and close Report Designer.
- Confirm the file timestamp updated under
<Project>\PRT\<Language>\ALG\. - Re-open the Alarm Logging print job and confirm the layout binding is still valid (Layout tab).
PRT\<Lang>\ALG\ with the extension .bak, copy it back over RtSeq.rpl and re-test.
7. Step-by-Step: LPT1 and Network Printer Mapping
The most common reason the Printer column is blank in the print job dialog is that the WinCC engineer typed the literal text "LPT1" into the field but never configured the LPT1 port at the Windows level, or used NET USE LPT1 inside a different Windows session. Both must be correct for the LPT1 destination to work.
7.1 Configure the LPT1 Port at Windows Level
- Open Control Panel → Devices and Printers.
- Click Add a printer → The printer that I want isn't listed.
- Choose Add a local printer or network printer with manual settings.
- Select Use an existing port and pick
LPT1 (Printer Port). - Select the driver Generic / Text Only (recommended for alarm logging).
- Name the printer
WinCC_Alarm_LPT1. - Print a Windows test page and confirm physical output. If the test page prints, the OS layer is correct.
7.2 Map a Network Printer to LPT1 with NET USE
If the physical printer is on the network and the application requires an LPT1 address, redirect the share to LPT1:
NET USE LPT1 \\SERVERNAME\PRINTERSHARE /PERSISTENT:YES
Critical points:
- Execute the command in the same Windows session in which WinCC Runtime will run.
- If WinCC Runtime starts as a service (via WinCC RT Start configured as "Auto start" with the WinCC service mode), the
NET USEmust be performed in the service account session, not the interactive user session. For service mode, prefer the direct UNC path (\\SERVERNAME\PRINTERSHARE) in the print job Printer field. - To make
NET USEpersistent across reboots, store the credentials once withcmdkey /add:SERVERNAME /user:DOMAIN\USER /pass:****before theNET USE.
7.3 Verify the LPT1 Mapping
From the same Windows session that will launch WinCC Runtime, type:
DIR LPT1
If the device is mapped, Windows displays the spool queue contents. If not mapped, Windows returns "The system cannot find the path specified".
7.4 Type the Printer Destination in the Print Job
In the print job General tab, set Printer to exactly:
-
LPT1— when the printer is configured under Windows on the LPT1 port. -
WinCC_Alarm_LPT1— when the printer name (as registered in Windows) is used. -
\\SERVERNAME\PRINTERSHARE— direct UNC path, recommended for service mode. -
FILE— print to PDF/text file. Useful for verifying the layout without physical printer hardware.
8. Runtime Verification
After completing sections 5–7, validate the configuration end-to-end:
- In WinCC Explorer, click Activate on the toolbar.
- Confirm no "Failed to print empty document" pop-up appears at runtime start. If it still appears, return to section 5 and disable the Runtime start trigger, or to section 6 to repair the layout.
- Trigger a test alarm. Use the WinCC internal tag simulation tool or force the underlying PLC bit for one second. The alarm should appear in the Alarm Logging runtime window and be printed on the configured destination within 1–2 seconds.
- Acknowledge the alarm. If the print job is configured to print on acknowledgement, a second printout should appear.
- Open the spool queue on the target printer and confirm the WinCC job is present and released.
8.1 Capturing Diagnostic Output
WinCC Alarm Logging writes print-job diagnostic information into the project log directory:
<Project>\Diagnostics\AlarmLogging\<Timestamp>_AlarmLogDoc.prt
If printing still fails, open the most recent .prt file to inspect the actual layout output that Report Designer attempted to render. An empty file confirms the layout is firing before any data is available.
9. Extended Troubleshooting Matrix
The following matrix maps additional error messages observed on WinCC 7.0 SP3 alarm logging deployments to their likely cause and remediation. Apply the rows in order; each row supersedes the previous one if the symptom matches.
| Observed Symptom / Error | Likely Cause | Remediation |
|---|---|---|
| Failed to print empty document | Print job fires with no data; or layout has no data connection | Disable Runtime-start trigger; repair layout in Report Designer |
| Spool error 0x00000005 (Access denied) | User has no rights on the network printer | Grant Print rights on the share; use direct UNC path |
| Spool error 0x0000007C (Invalid printer name) | Printer column in print job does not match any Windows printer exactly | Match case and spelling; verify with wmic printer get name
|
| Printer column is blank | Print job configuration was never saved or imported from another project | Re-enter the printer destination; save; re-activate RT |
| Printout shows only header, no rows | Layout filter excludes all events; or wrong archive data source | Inspect layout table filter; ensure correct archive ODBC source |
| Print job appears as red icon | Referenced layout file missing | Restore from project backup; re-bind |
| Duplicate printout for every alarm | Both RT-Message-Sequence and RT-Message-List are active with overlapping triggers | Disable one of the two print jobs |
| Printouts are delayed by 30+ seconds | Spool queue backlogged by driver issue | Switch printer driver to "Generic / Text Only" |
| Unicode / special characters garbled in printout | Generic Text Only driver on legacy LPT1 in OEM codepage | Use a driver matching the runtime language codepage |
| Print job works in WinCC Explorer, fails in WinCC Client on another station | Client package not regenerated after print job change | Regenerate client package and re-deploy |
10. Print Job Parameter Reference
For future maintenance, the canonical mapping between Alarm Logging dialog fields, internal WinCC parameters, and runtime file outputs is shown below.
| Dialog Field | Internal Parameter | Storage Location |
|---|---|---|
| Printer | PRJ\PRT\<Lang>\ALG\<PJ>.pjp → <PJ>.PRT_DEVICE | Project tree under PRT/ALG |
| Layout | PRJ\PRT\<Lang>\ALG\<PJ>.rpl binding | Project tree under PRT/ALG |
| Trigger bitmask | PRJ\PRT\<Lang>\ALG\<PJ>.pjp → <PJ>.PRT_TRIGGERS | Project tree under PRT/ALG |
| Number of copies | PRT_COPIES | Project tree under PRT/ALG |
| Output file (when destination=FILE) | PRT_FILE_NAME | Project tree under PRT/ALG |
11. Best Practices for Production Deployments
- Disable the "Runtime start" trigger on every print job that uses an event-driven layout. This single setting eliminates the majority of "Failed to print empty document" pop-ups at RT activation.
-
Use the direct UNC path (
\\SERVER\SHARE) instead ofNET USE LPT1for WinCC servers running as a Windows service. NET USE mappings live in the user session that created them and disappear when the user logs off. - Always use the Generic / Text Only driver for alarm printing. Vendor-specific drivers (HP, Brother, etc.) inject page setup, headers and footers that corrupt the alarm layout.
-
Test with file output first. Set the print job destination to
FILEwith a fixed path, activate runtime, trigger alarms, and inspect the file. This isolates layout problems from spooler problems. -
Version-control the RPL files. Treat
RtSeq.rpl,RtList.rpl, and the other ALG RPL files as project source; check them into the same SCM (Subversion / Git / TFS) as the rest of the WinCC project. A layout regression after a project import is the second most common cause of empty-document errors. - Document the print job configuration inside the project documentation. Print job configuration is not exported by the WinCC Document Station by default and is lost if the project is rebuilt from a project backup.
- Regenerate client packages after every change to a print job or layout. WinCC Clients do not pull print job changes from the server automatically; they need a fresh package.
- Avoid mixing LPT1 and TCP/IP-attached printers on the same WinCC station. LPT1 is single-threaded; long print jobs will block alarm event handling and create alarm floods.
12. Frequently Asked Questions
Why does "Failed to print empty document" appear the moment I start WinCC Runtime, before any alarm is generated?
The default @Report Alarm Logging RT Message Sequence print job has the "Runtime start" trigger enabled. At startup the alarm database is empty, so Report Designer renders zero rows and Alarm Logging surfaces the error. Open the print job properties, go to the Trigger tab, and disable the Runtime start event. The "New message arrives" trigger will still handle every real alarm.
The Printer column in my print job is blank. The printer works from Word and Excel. What is wrong?
WinCC Alarm Logging uses its own print job configuration, separate from the Windows default printer. Open the print job properties → General tab and type the destination exactly as it appears in Windows (e.g. LPT1, Generic / Text Only, or the UNC path). Save the project, deactivate runtime, and reactivate. Empty Printer fields are saved as NULL and discarded by the print spooler at runtime.
NET USE LPT1 works from the command prompt but WinCC cannot find the printer. How do I make LPT1 persistent?
NET USE mappings are session-bound. If WinCC Runtime runs as a service (LocalSystem), the mapping created in your interactive session is not visible to the service. Either (a) switch to a direct UNC path in the print job Printer field, or (b) store the credentials with cmdkey /add and add the NET USE command to a startup script executed in the service session. For long-term reliability the UNC path is preferred.
Can I print alarms to a PDF or text file instead of a physical printer for testing?
Yes. In the print job General tab set the Printer field to FILE and enter a file name (e.g. C:\WinCC\Alarms.txt). WinCC writes one record per line. This is the recommended first step to isolate layout problems from spooler problems.
Does the "Failed to print empty document" fix apply to TIA Portal WinCC Professional or WinCC Unified?
No. WinCC Professional and WinCC Unified use a different alarm pipeline and a different print mechanism. The TIA Portal equivalent procedure is documented at Printing Alarms in Runtime (RT Professional). The classic WinCC V7 procedure in this article applies only to WinCC 7.0 SP3 and other WinCC V7 releases.