WinVask -  Faktura

How To: Mail Merge Report

How To: Mail Merge Report

Previous topic Next topic  

How To: Mail Merge Report

Previous topic Next topic  

 

Mail Merge reports use a combination of database field information and hardcoded text (that you define) to print a formatted report - you probably receive a Mail Merge type report in your mailbox from solicitors. This type of report is easy to create:

 

ð        Create a new report file
ð        Add a Detail report band to the report page
ð        Double left click the newly added Detail report band to display the Band Detail Properties dialogue box
ð        Make sure a checkmark is displayed inside the Mail Merge checkbox, and then click the EDIT TEXT button to add in the freeform text that is your mail merge text:

 

frb_bm125

 

After you've clicked the EDIT TEXT button a popup window is displayed to enter your text:

 

frb_bm126

 

The window is resizable (drag the bottom right corner of the window to make it larger); the screen capture above shows a combination of text and database fields. The top of the window has a small toolbar with six icons; from left to right their functionality is:

 

ð        Save changes and return to the Report Formatter window
ð        Cut selected text to the Windows clipboard
ð        Copy selected text to the Windows clipboard
ð        Paste Windows clipboard information to the EDIT TEXT dialogue box
ð        Display the Font selection dialogue box
ð        Display the Dictionary

 

As you've probably guessed, you will be clicking the Dictionary button quite often to add database field information into the EDIT TEXT dialogue box. The example above shows that every time a database field was added to the text that double quotation marks and arrows are needed; the sequence is:

 

Double Quote + Less Than Arrow + Database Field/Variable + Greater Than Arrow + Double Quote

 

When the Dictionary adds a database field/variable to the EDIT TEXT window it will AUTOMATICALLY add the arrow symbols for you; however, it WILL NOT add the double quote symbols (leading and trailing), so YOU MUST DO IT! If you fail to add the double quotes your report will probably fail when it is executed. The fix is easy (find where you failed to add the double quote symbols) - just irritating.

 

* NOTE *

 

You can use the Dictionary to access all of the internal Report Builder functions to modify the database information to suit your needs; examples of what you can do would include:

 

ð        Combining multiple database fields into one formatted text string (e.g. First Name, Last Name) by using the CLIP() function and the Ampersand (&) symbol
ð        Use the CHOOSE() function to evaluate a database field and generate the appropriate text field; for example, you have a database field that stores the customer's gender as M or F; you can use the CHOOSE function to instead print Mister or Misses onto the form letter
ð        Evaluate the last time the customer was contacted against the current computer date to generate a text string like "it has been 14 months since we last contacted you regarding your policy."

 

* NOTE *

 

The Font Dialogue Box won't allow you to use multiple font types/sizes/styles on the formletter - you can only use one font type/style/size on the form letter!

 

After you have entered your Mail Merge letter information click the OK button to save the text and return to the Report Formatter window. Save the report and run it to see what needs tweaking.