An embedded report puts a table of records into a document, for example the line items of a purchase order, the tasks of a project, or a summary of hours by person. You set up the report once with the Exact Forms Plus Configurator, and Exact Forms Plus fills it in with current data every time it creates a document.
This page explains how embedded reports work in a document: placing them in a Word template, using one report in several templates, and fixing problems. For the configurator's screens and every setting, see the Exact Forms Plus Configurator articles. To build the template itself, see Exact Forms Plus document templates.
How embedded reports work
Each embedded report is a record in the Document Subtables table, which the setup wizard adds to your app. The record holds the report's Settings: the table, which records to show, the columns, and the formatting. It's listed under the template you created it from.
You put the record's Template Reference, for example
~strid=23~, in the Word template where the table should appear. The number is the record's Record ID#.When a document is created, Exact Forms Plus reads the settings, gets the records, and replaces that text with a Word table.
Because the template only holds this short reference, you can change the report in Quickbase without editing or uploading the template again.
An embedded report isn't limited to one template. You can put the same subtable/report in as many templates in the app as you need. See Use one embedded report in several templates.
Kinds of embedded report
An embedded report is a Detail report (one row per record, by default the records related to the master record), a Summary report (the rows of a saved Quickbase summary report), or a Master Summary report (a summary report limited to the master record). You choose the kind when you create the report and can't change it afterward. For what each kind shows and what it needs, see Subtable Type.
Create an embedded report
You create embedded reports in the Exact Forms Plus Configurator. Open it from the template record with Add New Exact Forms Plus Subtable, then work through its five steps. Before you start, set the template's master table; see Before you start.
Create or change an embedded report: open the configurator, choose the table (step 1) and the records to show (step 2), and save. Includes a worked example for purchase order line items.
Choose and format columns: the columns, their type, width, label, fonts, and totals (step 3).
Sorting, grouping, and totals: sort order, groups, and subtotal and grand total rows (step 4).
Table formatting options: borders, header colors, row shading, page breaks, and repeating columns (step 5).
When you save, the configurator creates the Document Subtables record. The template record then lists it with its Template Reference, such as ~strid=23~. Put that reference in the template as described below.
Place the report in the template
Copy the Template Reference from the Document Subtables record, for example
~strid=23~.In the Word template, paste it on its own line (its own paragraph), where the table should appear. For example, between the order details and the totals of a purchase order.
Format the
~strid=N~text with the font and color you want for the table. The table uses that text's formatting, unless you set fonts in the configurator.Save the Word file and attach it to the template record's Template File again.
A template can have several embedded reports, each with its own Template Reference value. If the same value appears twice, both places show the same table.
The table's heading row repeats at the top of each page.
If the report finds no records, the
~strid=N~text is replaced with No detail records found., or with the text in the template's MSG_DetailsNotFound field.
Change an embedded report
Open the report in the configurator, make your changes, and save. See Change an embedded report for the ways to open it, and Copy or delete an embedded report.
The next document uses the new settings, in every template that uses the report's Template Reference value. You don't need to upload the template again.
To reuse a template with all its embedded reports, select Copy this Document Template on the template record. See Copied templates.
Use one embedded report in several templates
An embedded report isn't tied to the template it was created from. It's not a one-to-many relationship where each template has its own reports: one embedded report can be used by any number of templates. For example, the same line items table can appear in a quote, an order confirmation, and an invoice.
When a document is created, Exact Forms Plus finds the report only by its Record ID# in your app's Document Subtables table (the table named in the template's Document Subtable DBID field). It doesn't check which template the report is listed under. To use a report in another template, paste the same Template Reference, for example ~strid=23~, into that template's Word file and upload it.
Where the report is listed: Related Document Template only decides which template shows the report in its list of embedded reports and on its configurator's Configurations tab. Other templates that use the report don't list it. To edit it, open it from the template it's listed under, or from the Document Subtables table.
Changes apply everywhere: when you edit the report, every template that uses it gets the change. If one template needs a different version, create a separate embedded report for it.
Same master table: if the report's filter uses fields from the master record, as related-records reports and Master Summary reports do, use it only in templates for the same master table.
Master fields in the clist: the configurator adds the master fields used in the filter only to the clist of the template the report is listed under. In each other template, make sure those fields are selected in the EFP Configurator (see Choose the master table fields) or listed in clist. If they're missing, the report can't use the master record's values and finds no records or shows an error.
Same app: templates in another app use that app's Document Subtables table, so they can't use this report.
Copied templates
Copy this Document Template copies the template record and its embedded reports. The copies are new Document Subtables records, with new Record IDs, listed under the new template. The Word file isn't changed, so it still contains the original Template Reference values, and the new template keeps using the original reports. To make the new template use its own copies, replace those values in its Word file with the copies' Template Reference values and upload it. Otherwise, you can delete the copies.
The Document Subtables table
Field | What it holds |
|---|---|
Configuration Name | The name you gave the report. |
Settings | The report's settings, written by the configurator. Edit them with the configurator rather than by hand. For what each part means, see Advanced subtable features. |
Template Reference | The text to put in the template: |
Notes | Your own notes, for example which templates use the report. |
Related Document Template | The template the report is listed under (hidden on forms). It doesn't limit which templates can use the report. Document Template Name, Masterclist, and Master table dbid are looked up from it. |
Edit Subtable Configuration | The button that opens the configurator for this report. |
Limits
Your account sets the maximum number of records per embedded report. If a report returns more, no document is created and the error says what the limit is. For larger documents, use the Exact Forms Plus Batch Processor.
Values in a filter can't contain commas, because commas separate the settings. The configurator removes commas, colons, periods, and
|from column headings.Template functions such as
~=FormatN(...)~don't work inside embedded report cells.
If the embedded report doesn't appear or looks wrong
These are problems you see in the created document. For messages the configurator shows while you set up a report, see Exact Forms Plus Configurator messages and troubleshooting.
What you see | What to do |
|---|---|
ERROR: STRID = N - The subtable record was not found. | No Document Subtables record has that Record ID#. Copy the value again from the record's Template Reference. |
ERROR: ~strid~ format error. Must be ~strid=99~ | The text is mistyped. Use |
Error: The Document Subtable DBID field is blank. | The template record's Document Subtable DBID field is empty. It should point to the Document Subtables table. |
No detail records found. | The filter found no records. Check the report's filter (see Filtering Criteria) and that the master fields it uses have values. If the report is shared with another template, check that template's clist (see Use one embedded report in several templates). |
ERROR: Maximium # of records to be processed for a subtable exceeded. | The report returned more records than your account allows. Narrow the filter, set Maximum Number of records to return (see Advanced Filtering Criteria), or use the Batch Processor. |
The Summary Report is a Crosstab report, Crosstab reports are not supported in EF+ | Choose a summary report without crosstabs. |
**ERROR: # of fields in Summary Report does not match Subtable Configuration. …** | The summary report changed after the embedded report was set up. Open it with Edit Subtable Configuration and save it again. |
** ERROR - dbid parameter is missing **, ** ERROR - clist parameter is missing **, or ** ERROR - Invalid Format in clist parameter … | The settings are incomplete or were edited by hand. Open the report in the configurator and save it again. |
Numbers in a column have lost their decimals | Change the column's Type to Numeric with Decimal. See Choose and format columns. |
Grouping or totals don't show | Set Repeat Columns to 0. When columns are repeated, grouping and totals are ignored, dynamic row shading, the item counter, and custom date formats don't work, and with Include Page break after group by no document is created. See Repeat columns. |
A copied template still shows the original template's tables, or edits to its embedded reports have no effect | The copied Word file still has the original Template Reference values. Replace them with the Template Reference values of the copied reports (see Copied templates). |
If you still need help, open a technical support case.
See also: Exact Forms Plus Configurator overview, Exact Forms Plus document templates, Template fields and functions, Advanced subtable features, Exact Forms Plus terms and concepts.