We get more calls about Mailware’s report writer than any other feature. So, this tutorial provides instructions on making your own reports and a list of tips and tricks you can use to enhance the reports included in Mailware.
This tutorial includes the following topics:
First, let’s cover how to find the report you want and open it. Mailware’s reports are stored in 2 separate locations:


Whichever you choose finding reports is simple. Reports are sorted by various types. Reports in the Reports buttons of various screens are associated with the screen (e.g., the Order screen Reports button includes Invoices, Mailing Labels etc.). Reports are generally in one of the following categories:
The Report Center also includes subcategories for the various screens in Mailware:
To find the report you want look in its group. For example, to locate an invoice in the Reports Center:
Type “invoice” in the Search field and click Go.
Or,
Click the Filter by field and choose Orders, then Click the Go To field and select Operation Reports. Scroll to the invoices.
Some reports you preview will ask for a date range. Enter dates in the format mm/dd/yy. (Tip: Reports usually default to Today’s date so you can simply press Enter at each prompt to see report results for today’s date. For dates in the current year you can exclude the yy). Your report will appear in a preview window.
You can then print them by clicking the Print icon on the toolbar to open a standard Windows dialog. Click OK to print to the listed printer.
Tip: You can first change printers in the pulldown if you have more than one and for most reports you can also specify a page range (e.g., 1 to 1). In Preferences you can specify a default invoice and label printer.
That covers the basics of finding and printing reports. Don’t worry if it sounds like a lot of steps. We will show you several shortcuts in the Report Tips and Tricks portion the tutorial. But first let’s move on to Editing a Report so you can learn how to change a report to suit your business.
We showed you how to find, open and print a report in the previous section – Report Basics. Now let’s move on to one of the most popular of Mailware’s features.
Note: For this tip we will use the R5110 Invoice for Date Range report which is located in the Company Database reports tab.
We are going to work with the most commonly modified report – Mailware’s pre-built Invoice/Date Range. First, locate it in the Company Database (see the Report Basics tip for help locating the report).
Click the edit icon next to the report to open the Shazam Report Writer to the Define Search page. Now, follow the steps below to modify the invoice.
Left click on the Bill To: field, then Right click it. A pop up menu appears with options for modifying the field. In this menu Left click the Customize Objects option.
The Page Designer is your main editing tool in the Layout Page tab. You can change the field it affects any time by simply clicking the desired field on the Layout while the Page Designer is open. For example,If necessary, move the Page Designer so you can see another field in the report. Then, Left click any currently unselected field.Did you notice the name of the field changed in the pulldown field at the top of the Page Designer’s Customize tab? Try left clicking other fields and watch the name change. This lets you switch quickly to another field and edit it without closing the Page Designer.You can leave the Page Designer open while you work on the Layout or close it with the X in its corner if it is in your way. You can also open it anytime by clicking its icon You can change the way fields look on your report by editing their properties on the Page Designer. To demonstrate, let’s try changing some fonts. If you closed the Page Designer open it now by clicking its icon
. Then Left click the [ShipCompany] field under Ship To:.
Reports contain 2 types of fields: Data fields are created in the Define Search tab and Placed on the report from the Page Designer. Custom fields are labels, bitmap images, calculated fields and shapes you add from the Page Designer and edit directly on the Layout page.
Let’s start with Custom fields.
Now, let’s add a data field.

If you have already complete the Report Basics and Editing Reports tips, or if you are already comfortable with Mailware’s report writer, you will appreciate the following list. It contains shortcuts, features and advanced techniques you can use to maximize your reports.
You can have multiple instances of the report writer open simultaneously, and can keep them open all day. This is handy for reports you run repeatedly through the day. To open multiple Report Explorer reports:
Tip: You can edit reports in the C:\Mailw15\Reports folder by opening them from the Company Database Reports tab. The edited report will then be available from that item in the Reports tab. You can also export reports you created/edited in the Report Explorer and overwrite the .srw reports in the C:\Mailw15\Reports folder.
You can add report shortcuts to the Reports buttons on various screens. You can also move, copy or delete the included report shortcuts.



You can have your reports prompt you for input when they are Previewed or Printed. For example, an invoice could prompt you for the order number.
In the Define Search screen double click a field (most fields will work with this tip, however, a few will not including Dates which can be set up to prompt as described below). An example would be the OrderNo field in the invoice. The following dialog will open:

In the Filter field on the right select one of the options in the pulldown (e.g., Is Equal To). In the example above we chose Is Greater Than or Equal To.
Enter your prompt text in square brackets [ ]. We entered: [Enter the beginning Order Number]
Click the OK button, then choose File>Save Report from the text menu.
Click the Preview Report tab to test your prompt.
A dialog will open with the text you entered as in our example below.

Enter an order number (We entered an order number of 2) and click OK. Your report will show results for all orders equal to that number or greater. In our example order number 1 would not be included.
You can enter multiple prompts in a single report. To include a date range selection see the next tip: Adding a Date Range Prompt to Your Reports.
You can have your reports request a Date Range when they are Previewed or Printed. This is a handy way to display only the records you wish to view without hard coding dates into your report. In the Define Search tab double click a date field and change its Header to read:
GetDateRange
Then change the Filter to Is Between, and in the 2 fields that open below it enter a default range (entering the word TODAY in each field for example will cause the report to default to the current date if you do not enter dates when prompted).
The example below is from the Invoice report. We changed the Header which originally read: OrderDt to read: GetDateRange. When run, the report will ask for a date range, then display orders based on the date shown on the Order Entry screen.

You can add fields from your Company Information settings in Mailware’s Preferences by Placing labels in the Layout Page of the report writer then changing their Names to any of the following:
ClientCompany
ClientAddress1
ClientAddress2
ClientPhone1
ClientCity
ClientState
ClientZip
To make formatting easier the following can be used in a single field.
ClientCityState
ClientCityStateZip
To change label Names select the label then open the Page Designer (click , then the Customize tab) and look at the Name field under the General heading. In the example below the Name field contains the text: ClientCompany.

Note: The Name fields will display your company information the next time you open the report.
Your label reports can prompt you for the location you wish to print an individual label. To create a report that prompts you:

Sometime you will want reports to pull only records that match certain criteria. The Define Search tab of the report writer contains the data fields that are included in the report. Any field can have filters applied to it. In the following example the report has been filtered for records with an order number greater than 500.

To set a filter first left click any white cell below the field HEADER you wish to use. Then double click to open the following dialog.

On the right side of the dialog select a filter type. In the example above we used Is Greater Than. Then, in the field(s) below enter your criteria.
Click the OK button (not pictured) to close the dialog. You may enter up to 5 filters for each field (Filter1, Filter2, Filter3, Filter4 and Filter5) depending on the type used (for example Is Equal To provides 5 fields for each filter so you may have as many as 25 criteria entered).
Note: Filters work in conjunction with each other. If you add a filter for OrderNo as above and use a Date Range under Order Date, only orders matching BOTH criteria will be selected. Also, the filters must occupy the same line to work together (e.g., Filter1 for the OrderNo field works in conjunction with Filter1 for the Order Date field and ignores Filter2 through Filter3). Experiment with filters to understand how the process works. You can use various combinations of them to create complex selections.
Reports automatically sort results based on field order in the Define Search screen and the SORT option that is set. If SORT is set to None results are sorted in ascending order. In the following example records will be sorted on Key first, then OrderNo.

You can change sort order by selecting the white cell in the SORT row and double clicking to open an edit dialog. Select a different SORT method from the pulldown in the dialog. The first field that contains a SORT method will determine the first sort, the second field will determine the second sort etc. You can also reposition columns in the Define Search screen by left clicking and dragging their field HEADERS (the grey button at the top of the column).
Labels may not print properly when using the default values in in the report writer. You can adjust these values by editing a Label report and changing the vertical and horizontal gaps, label size etc. This information is available in the Labels tab in the Report Setup dialog (click
, then the Labels tab).

You can change the default format by clicking the Choose Standard Label Format button and selecting an Avery label type. You can then change Margins, heights etc in the fields on the dialog. Fields can also be used to create an entirely custom label.
We have found the following values work well for most printers for the standard Avery 5160/8160 and 5163/8163 formats:

When creating a Layout for a report you can combine fields in a single label in the Customize tab of the Page Designer (Add a Label to the report then on the Page Designer click Customize tab at the top and the Caption tab at the bottom). Enter fields in the edit area replacing the word Label.
This tip is especially useful for addresses. Try entering the following into a single field on the Layout page to create a tight address label:
| Enter Field as: | Resulting Address: |
| [Company] | Core Technologies |
| [FirstName] [LastName] | |
| [Address1], [Address2] | 1320 Pearl Street, #240 |
| [City], [State] [Zip] | Boulder, CO 80302 |
Sometimes you need calculated fields on reports that do not exist in Mailware’s tables. For example, Amount Due on orders is a calculated field you won’t find in the ORDERS table. You can, however, calculate these fields in the report writer’s Define Search.
First, double click a blank column or add a new one by clicking the Add Field icon
on the toolbar. In the dialog that opens you can build a custom expression by double clicking fields from tables on the left and mathematical expressions on the right. For example, to create the Amount Due field we double clicked TotalAmt, then -, then PaidAmt as in the example below:

Click the Field Properties tab to rename the field (it is otherwise named Custom by default). The new field may then be added to the report like any other.
Fields can be calculated in Layout too. When you Place a field from the Page Designer you can specify a mathematical argument (e.g., @Sum). Use the Calculate Field pulldown on the Page Designer before placing the field.
Tip: Use a custom expression of (999999999 – ORDERS.OrderNo ) to preview the latest record on the first page (e.g., the last invoice entered in the Order screen).
In Mailware 2005 and later you can use SQL commands in custom expressions.
These commands add features to your reports that were previously unavailable. For example, using an IF statement you can change the text that appears on any report. To try this for yourself use the following steps to change the Mailware invoice. The IF statement looks for the customer type (R=Retail, W=Wholesale) and changes the company name on your invoice accordingly.
Remember to save your report if you wish to keep these changes.
Using the above IF statement you can change the company address, alternate short order messages, hide or display sale notices etc. The only limitation is the expression cannot exceed 255 characters.
Additional commands can be used as well. For example, CASE can display alternate verbiage too. The format for the CASE command is as follows:
CASE expression
WHEN expression THEN value
[WHEN expression THEN value]
[ELSE] value
END
(CASE PrintOrder.Orders_PayMethod WHEN ‘Credit’ THEN ‘Credit Card’ ELSE ‘Other ’ END)
(CASE PrintOrder.Orders_PayMethod WHEN ‘Credit’ THEN ‘Credit Card’ WHEN ‘Check’ THEN ‘Check’ WHEN ‘PO’ THEN ‘Purchase Order’ WHEN ‘Money Ordr’ THEN ‘Money Order’ ELSE ‘Other ’ END)
Layout reports are divided into sections. The most basic layout reports contain a Header and Detail section. More complex reports contain:
Layout reports may also contain Group Headers and Group Footers. These are special sections that are each associated with a specific field. You can add and edit Group Headers and Footers in the Page Designer under the Arrange tab.
Group Headers are useful for breaking reports into pages and displaying information specific to a field. For example, Mailware’s Invoice/Date Range report uses an OrderNo Group Header to create a new page for each order number. The same header displays the unique order number, order date and ship method information for each order.
Group Footers can also be used for data specific to a field. For example, Mailware’s Invoice/Date Range report uses an OrderNo Group Footer to total each order’s sale.
Report Settings
You can change various report settings using the Report Settings icon on the toolbar.
Exporting
Any report can be exported in ASCII Delimited, ASCII Fixed, format. Preview the report normally then choose File from the text menu and select Export. In the dialog that opens select a format and enter a file name. Files are saved by default in your C:\Mailw15 folder, however, you can change the location with the … button on the dialog (e.g., save to a: to place a file on a floppy disk).
Several of Mailware’s reports are designed to be exported for use with other programs including: UPS Online, FedEx and several credit card software packages. These reports are located in the Report Explorer under Operation Reports in the System folder.
Print Invoices Button
The Print Invoice option in the Reports button on the Order screen opens the R5100 This Invoice.srw report. This report recognizes the selected order through a link to the OrderNo.db table that is created in your mailpriv folder when Print Invoice is selected.
These commands add features to your reports that were previously unavailable. For example, using an IF statement you can change the text that appears on any report. To try this for yourself use the following steps to change the Mailware invoice. The IF statement looks for the customer type (R=Retail, W=Wholesale) and changes the company name on your invoice accordingly.
Open an order in Mailware and press the F10 key to preview the invoice.
Click the Define Search tab.
On the toolbar click the Insert Blank Field icon.
Double click the blank column that appears in the lower half of the screen.
In the dialog that opens paste the following into the Custom Expression:
(If (PrintOrder.Customer_LastPayMeth=’W',’Company 1′,’Company 2′))
Note: You can rename Company 1 and Company 2 if you wish.
Click the Field Properties tab and change the Header field to: Title
Click OK to save the new field.
Click the Layout Page tab at the top of the screen.
On the toolbar click the page designer icon.
On the Page Designer uncheck the Automatically caption fields box at the bottom.
In the list, locate Title and drag it into the top of your report.
Delete the old company name field off the invoice (or you can drag it outside the red lines so it does not print, but is available later to move back).
Drag the new Title into place. You can enlarge the field by clicking the little black square handles if you have a long company name. You can also adjust the font by using the pulldowns at the top of the screen for the font name and size as well as the Bold, Italics etc. buttons.
Click the Preview Report tab to see the results (Note: if prompted regarding sort order answer Yes). If the customer for which you opened the order in step 1 has a type of Wholesale, the first company name will be used. Otherwise, company 2 will appear. Note: You can find the customer type on the Customer screen under the Additional Info tab.
Remember to save your report if you wish to keep these changes.
Using the above IF statement you can change the company address, alternate short order messages, hide or display sale notices etc. The only limitation is the expression cannot exceed 255 characters.
Additional commands can be used as well. For example, CASE can display alternate verbiage too. The format for the CASE command is as follows:
CASE expression
WHEN expression THEN value
[WHEN expression THEN value]
[ELSE] value
END
To add the CASE command to our report, follow the steps above and paste in the following expression:
(CASE PrintOrder.Orders_PayMethod WHEN ‘Credit’ THEN ‘Credit Card’ ELSE ‘Other ’ END)
Name the field PayType (instead of Title as above) and drag it into the report to replace the field under Pay Method in the first grey line. Now the words “Credit Card” will appear when you preview the invoice. However, we need to show other methods too. Using CASE you can specify different verbiage for each one. Try replacing the expression again with the following:
(CASE PrintOrder.Orders_PayMethod WHEN ‘Credit’ THEN ‘Credit Card’ WHEN ‘Check’ THEN ‘Check’ WHEN ‘PO’ THEN ‘Purchase Order’ WHEN ‘Money Ordr’ THEN ‘Money Order’ ELSE ‘Other ’ END)
Save the report and close the report writer. Open an order and add a payment type of PO or Money Ordr. When you press the F10 key to preview the report you will see the new verbiage in the Payment Method field.
With CASE you can type a shorter expression than would be required by the IF statement to achieve the same results.
"Mailware software is by far the best there is on the market. It is very user friendly and excellent for customers, orders, inventory, credit cards and shipping."
Cindy Stoller
CEO, LS Advertising, Inc.
Copyright © 2010 - Core Technologies - All Rights Reserved. Conforms to W3C Standard XHTML & CSS