logo
search
Document Editing Problems

Fix Blank Invoice Totals After Next Record Rules in Mail Merge

Algirdas JasaitisAlgirdas Jasaitis Sep 30, 2026 869 views

Question details

The Total Amount and Balance Due fields in a mail merge invoice appear blank when placed after the 'Next Record If' rules, but display correctly if placed before.

Fix Blank Invoice Totals After Next Record Rules in Mail Merge
Product
Word Processor Mail Merge
Device & OS
not provided
Scenario
Generating invoices with multiple line items using the standard mail merge and 'Next Record' rules.
Observed behavior
Fields placed after the 'Next Record' command fail to pull data from the current record and instead output blank values.
Before you start

Make sure your data source is cleanly formatted and open your mail merge template to locate exactly where your summary fields and 'Next Record' commands are positioned.

Solution 1Recommended

Move Total Fields Before Next Record Rules

The most straightforward solution is to rearrange your document template so that summary data is retrieved before the mail merge engine skips to the next data row.

The 'Next Record' command instructs the word processor to immediately advance to the next row in your spreadsheet. Any fields placed sequentially after this command will attempt to pull data from that next row, which may not have the corresponding total or balance data.

1
Open your template

Launch your word processor and open the main mail merge document used for your invoices.

2
Locate the affected fields

Find the 'Total Amount' and 'Balance Due' merge fields that are currently positioned after the 'Next Record' or 'Next Record If' rules.

3
Reposition the fields

Select, cut, and paste these total fields so they are placed prior to the 'Next Record' rule within the document layout.

4
Preview the merge

Click 'Preview Results' to confirm that the totals now correctly display the data corresponding to the current invoice record.

Move Total Fields Before Next Record Rules
Formatting Tip: You can place summary fields in a header, footer, or dedicated summary section at the top of the page to easily keep them before the detailed line items and Next Record rules.
Streamline Your Document Workflows

Create Accurate Invoices Easily with WPS Writer

WPS Office provides an intuitive Mail Merge feature that makes generating invoices, letters, and labels straightforward. With an easy-to-manage visual interface and direct integration with WPS Spreadsheet data sources, you can easily reposition fields and avoid common formatting errors.

  1. 1. Start Mail Merge: Open WPS Writer, navigate to the 'References' tab, and click on 'Mail Merge' to reveal the merge toolbar.
  2. 2. Connect Data Source: Click 'Open Data Source' and select your WPS Spreadsheet containing the invoice data and calculated totals.
  3. 3. Insert Data Fields: Use 'Insert Merge Field' to place your data points accurately, ensuring that your summary totals are placed before any 'Next Record' commands.
  4. 4. Preview and Complete: Click 'View Merged Data' to instantly preview your invoices, verify that all totals display correctly, and finish the merge.
Fully compatible with Microsoft Word (.docx) and Excel (.xlsx) file formats.Visual mail merge wizard for precise field placement and real-time previewing.Seamlessly connect complex spreadsheets to documents without data loss.Lightweight, fast, and completely free alternative for your daily office tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the 'Next Record' rule make my fields blank?

The 'Next Record' command instructs the word processor to immediately jump to the next row in your data source. Any fields placed after this rule will try to fetch data from the subsequent row. If that next row doesn't have the relevant total, or is completely blank, the field will display as blank in your document.

What is a many-to-one mail merge?

A many-to-one mail merge is a technique that allows you to group multiple rows of data (such as multiple items purchased by a customer) into a single document (like one invoice). This relies on a common identifier, like an invoice number, to bundle the records together.

Can I use 'Next Record If' to group multiple invoice items?

While 'Next Record If' can be used to conditionally skip or display records, it is very difficult to build complex invoices with it because it is constrained by standard mail merge limitations. For multiple line items, a dedicated many-to-one merge tool is highly recommended over nested 'Next Record If' rules.