Troubleshooting
Why a WinCC flexible batch report prints blank or wrong values
Short answer
Print the report from a one-shot completion tag only after the PLC has copied the finished batch into snapshot tags. Blank or wrong values come from three separate paths — tag data, print trigger and printer delivery — and each has its own diagnostic and fix.

On this page
A batch report that comes out blank, repeated, or filled with the next batch's numbers is rarely a printer problem. In WinCC flexible the page is rendered from HMI tag values at the moment the print event fires, so the reliable sequence is: the PLC finishes the batch, copies the results into snapshot tags, and only then changes a print-trigger tag whose event prints the report. When the page is wrong, one of three paths has failed — the tag data, the trigger event, or the panel-to-printer delivery — and each has its own check. Work the paths in that order; most faults are in the first two.
Which path is failing #
The symptom tells you where to start. Read down this list before you touch the report layout.
- No page at batch completion. The completion value never reaches the HMI, or the tag event does not respond to it. Monitor the trigger tag online and confirm the transition occurs once.
- The same page prints repeatedly. The trigger stays active, oscillates, or is being evaluated as a level rather than a one-shot. Trend or monitor the trigger through the whole end-of-batch sequence.
- Values from the previous or next batch, or a mixture. The report is reading live process tags before the PLC has finished copying the batch result. Compare the page with the frozen PLC record field by field.
- Correct in preview but nothing on paper. Rendering works; the panel-to-printer path does not. Print a runtime test page on the same printer configuration.
- Individual blank fields. A report field is linked to the wrong tag or the tag carries no valid value at print time. Put the same tags on a temporary diagnostic screen and split the fault with a guide to diagnosing whether it is the driver, the tag or the screen.
Freeze the batch before the trigger fires #
A report template reads whatever the tags hold when the print event executes. If the fields are bound to live control tags, the page captures a moving process: a quantity still counting, a temperature already drifting toward the next batch. The fix is a batch snapshot — a fixed set of values belonging to one completed batch. In one controlled PLC sequence, copy the final quantity, the captured start and completion times, the water temperature in tank 1 when the batch begins, and the batch identification into dedicated data areas, and prevent next-batch initialization from clearing them until the print is confirmed. The same read-while-write failure appears elsewhere; the mechanism behind why a WinCC flexible Excel report script overwrites its data is the consumer reading while the producer still updates. One rule for a pharmaceutical line: batch control and the authoritative record stay in the PLC. The HMI formats and prints; a lost page must never be the only copy of the record.
Configure the report and the print trigger #
- Create a report dedicated to the completed batch in the reports editor. Static objects carry the labels and headings; every dynamic field is linked to a snapshot HMI tag, with its properties set in the tag table or the property view.
- Build the print-request tag as a bit, an INT, or a DINT. A bit needs defined inactive and active states plus a documented reset owner. An integer can carry the changing batch sequence number.
- Assign the printing action: the tag's event calls the system function that prints the selected report. Confirm the exact event behavior in the help of your installed WinCC flexible version, because the available events depend on the configured runtime target.
- Verify each dynamic field's HMI tag against the PLC data type and scaling. A valid layout cannot repair a wrong address or a data type mismatch — the failure mode behind why an HMI writes the wrong PLC value above 9 shows up on paper exactly as it does on screen.
- Write down the initiating value, the reset owner, and the condition that permits the next request. If those three are undocumented, the next engineer will re-trigger the report by hand and corrupt the sequence.
When the values are right but nothing prints #
If the preview and the diagnostic screen are correct, the report definition is proven and the fault is delivery. Print a simple test page from the same runtime and printer configuration; if the test page fails, fix the path before touching the report again. Windows-based panels print to the printer configured on the panel: a serial printer on the panel's interface needs a matching baud rate, for example IF2 at 57600, and a network printer needs the panel's printer settings pointed at it. Confirm the printer is supported for the panel's operating system, then check the queue — a job that stays queued is a connection or driver fault, not a report fault.
Worked example: verifying one pharma batch from snapshot to printed page #
The numbers below are example test values you load deliberately for the acceptance test; they stand in for your own batch record.
Inputs, with their source:
- Batch number 4721, written by the PLC into the snapshot and, last, into the INT trigger tag (the PLC sequence you document).
- Material quantity: the PLC stores 240.5 kg as the raw integer 2405 with one implied decimal (the PLC's unit convention).
- Water temperature in tank 1 when the batch begins: 61.3 °C, captured into a snapshot tag at that event.
The rule, in words: after the trigger event, every printed field must equal the frozen snapshot value, and the printed number must equal the raw value times ten to the power of negative decimal places.
The arithmetic: the quantity field must show 2405 × 0.1 = 240.5 kg, not the raw 2405. The width check: 2405 fits a 16-bit signed INT, whose limit is 32767. Had the PLC stored the same quantity in grams, the raw value would be 240500, which exceeds that limit — a gram-based quantity needs a DINT tag from the PLC through the HMI tag to the report field.
The result: exactly one page carrying batch 4721, 240.5 kg, and 61.3 °C, all belonging to the same batch.
The decision: a field-by-field match against the frozen PLC record proves the data path. Any mismatch, any blank field, or a foreign batch number means the fault is in the snapshot or the trigger — not the printer. A page that is correct in preview but never arrives means the fault is in delivery.
Checks before you call it fixed #
Run all six on a test batch, in this order:
- Every report tag shown on a diagnostic screen matches the finalized PLC value.
- The snapshot stays unchanged from completion until the print is acknowledged.
- The trigger makes exactly one transition per batch and follows the documented reset behavior.
- The preview with known data shows every dynamic field populated, correctly labeled, and wide enough for the full value.
- Both a runtime test page and the batch report leave the queue and reach the selected printer.
- The printed identification, quantity, times, and temperature match the frozen PLC record — one batch per page, no exceptions.
If any check fails, return to the matching path above; do not compensate in the report layout for a fault that lives in the PLC sequence or the printer connection.
Questions asked
Should the print trigger be a bit or an integer?
Use an INT or DINT that carries the batch number when a report must never repeat after an HMI restart: a new number is a new request even if the panel rebooted mid-sequence. A bit is fine when the PLC owns a clean set/reset handshake. In either case add a separate acknowledgment bit so the PLC knows the print was issued before it clears or overwrites the snapshot area.
The report prints twice for one batch. What do I check first?
Log or trend the trigger tag across the entire end-of-batch sequence, including the reset. If the value returns to its inactive state and then reappears before the next batch, the event fires twice by design and the fix belongs in the PLC copy-and-reset order, not in the report. If the tag changes exactly once, look for two configured events or two print jobs aimed at the same report.
Can the HMI reprint a batch if the printer was offline?
Only while the snapshot values still exist. Keep the snapshot area intact until the print is acknowledged, and give the operator a manual print of the same report from a screen button; it reproduces the frozen batch. Once the PLC clears or overwrites the area for the next batch, that record is gone unless the PLC or an archive kept its own copy.
Does the printer have to hang directly on the panel?
No, but the panel must reach it through a path it supports. Windows-based panels print to a printer on the panel's serial interface at a matched baud rate, or to a network printer configured in the panel's printer settings. Confirm the printer model is supported for the panel's operating system before you trust it on a production line.

