TX Sheet Control

Invoice Report Pipeline

Topic

From a clean template to a delivered invoice, a repeatable report pipeline supplies authorized application data, validates the result and exports it with predictable fonts and print settings. The browser editor can author the template, and the independent server packages can generate the documents without a browser.

How the Pipeline Runs

The pipeline has five steps, in this order:

  1. Author the template and save it as TXWB.
  2. Prepare the data: validate and authorize the record.
  3. Merge a clean copy of the template.
  4. Check and export the merged invoice.
  5. Deliver and release the output and the processing owners.

Author the Template

Use the invoice template sample as an example. It has:

  • a fixed customer name,
  • a repeating line-item band,
  • row formulas,
  • a total below the band.

The original coordinates identify the bindings before expansion. Save the template as TXWB to retain the merge definition.

Prepare the Data

Before merging, validate:

  • amounts as numbers,
  • arrays as arrays,
  • required names and IDs.

Choose the policies for missing fields, null values and empty arrays intentionally, as described in Merge Policies and Template Design. Application authorization decides which customer and line items the request may use. Credentials and data retrieval do not belong in the template.

Merge a Clean Copy

Each platform merges a clean copy of the original template:

PlatformHow you merge
.NETLoad the original TXWB into a request or job owner and await Workbook.MergeAsync(record).
Node.jsLoad it into ServerSheetControl and await the public merge operation.
BrowsercreateMailMergeTemplate() captures a reusable starting point and produces independent merge results.

Mail Merge With JSON shows the mail-merge examples for each platform.

Warning

Merge Into a Clean Copy. Do not merge repeatedly into a document that is already expanded.

Isolate customers that you process concurrently. Reusing a warm processing pool can help, but each job still needs a clean, independent document state.

Check and Export

Inspect the warnings, the formula errors, the repeated ranges and the invoice total. The sample data produces 3 × 120 plus 2 × 90, or 540. Review the merged XLSX and the PDF of the sample.

Configure the print area, paper, margins and fit-to-width so that the amount column stays on the intended page. Page Layout and Print Settings describes these settings.

Deliver and Release

  • Await the export before you send a successful response.
  • Return a correct content type and file name, and authorize storage and downloads.
  • Release the processing owners in finally or with using.
  • Record useful timings and warning summaries without logging customer data or license strings.

Evaluation PDFs retain their watermark.

Next Steps