Home Evaluation Summary for programmers Product limitations Goals of Axisbase Quick start Installation Using the launchpad and opening databases Connecting to a sample database Using building blocks Planning Define the purpose Define the requirements Borrow existing work Determine the architecture Design the data model Design the process model Deploy and maintain the product
building blocksPerforming a mailmerge Bulk e-mailing
ProgrammingSingle-threaded progress indicator in c#
Database menu itemsImport XML Save Copy As Integrity Check Change Password
Database Properties windowOpening the database properties window Record types tab Display types tab Roles and Users tabs Sidebar tab Database ID/Links tab Counters tab
Building blocksBuilding blocks window Editing grids and cells Hyperlinks and nesting Data Subset window Data Outsource window List window Window window Report window Bulk Operation window Label Printer window Choosing a data source
Special topicsExpression syntax Browse records Storing building blocks within other building blocks Programming Using custom code in building blocks Using Axisbase as an embedded database Axis1.Util namespace reference Axis1.Data namespace reference (Fishnets) Axis1.Data namespace reference (other) Axis1.Forms namespace reference
Performing a mailmerge
A mailmerge converts a template document into an expanded document. The expansion is created by replicating the template one time for each record in a data set. A template can include one or more loop sections (which are replicated for each record) as well as text before and after the loop (which only appears once in the result).
Use the mailmerge feature for data reporting for print or web publication, to print form letters, or to get data into a word processor for some other use. By reporting to external text files, you leverage the full features of a word processor in your reports, which can't be done with the built-in report building block. For example, you can create columns, or reformat the report to different paper sizes, or specify the page breaks manually. By exporting to an HTML document, you can create reports suitable for web publishing.
The general mailmerge styles are:
Axisbase supports these formats:
To perform a mailmerge,
Creating the template
It's easiest to understand how to format a template by seeing an example:
In many word processors' mailmerge tools, you use a wizard and insert special mailmerge fields. With Axisbase mailmerge, you just type the actual characters as shown. To insert a field from the data set, use the full name surrounded by # characters. The full name is usually the Axis ID, type name, and property name serparated by periods.
The $loop construct must be followed by a space and the table name as defined by the data subset, and a final $ character. Only the section between $loop...$ and $endloop$ are replicated.
Master/Detail data (nested loops)
Axisbase mailmerges can process master/detail data relationships, which is not found in most mailmerge tools. For example, suppose you want to send order confirmation letters to customers who ordered in the last week, and include the line items that they ordered in the letter. In this case, your data subset would define two tables linked in a master/detail relationship: MARS.order and MARS.lineitem. The template would look something like this:
Axisbase will replicate the outer loop section for each order; within each replication of the outer loop, it will replicate the inner loop section for each line item in the order.
Example 1: Updating a web page containing several lists of company statistics. You may have an internal company web page that lists daily or weekly sales by region, per product, or all open orders, or some other lists. You can design a data subset that includes multiple independent tables. In the mailmerge template, you can specify multiple independent $loop sections with any amount of fixed text before, between or after the loops. By running the single mailmerge, you can update all the lists on the web page at once.
Example 2: Nested independent loops. In less common circumstances, you may want to repeat the entire contents of a table within each section of an outer loop. For example, if you want to generate weekly letters to job seekers, and include in the letters the list of currently open jobs, then you may set up two unrelated record types: job seekers and open positions. You would then create a data subset with all records of both types, and a template that includes a loop of the open positions nested in a loop of the job seekers.