The Student Letter Text

Modified on Fri, Jan 12 at 1:48 PM

Letter Text

The text portion of a letter template is literally the text that is printed on the blank page.

We can inject the properties from the query into our text using macros. If you cannot find the appropriate macro in the "macro builder" - it is either not available currently OR you need to add an additional data table to the query.

For example, if you do not see User Flag macros to pull from, you will need to add in the StudentUserFlag object.  Once it is added to the query, the macro build should now have any additional Student User Flag macros.

Fixed Width Fonts

The default font for the letter text is Courier. Courier is a fixed width font, and makes lining up columns of data very easy because each printed character is the same width.

Variable width fonts such as Helvetica appear much nicer when printed, but you cannot align text with those fonts.

To get around this problem, you can use the fields feature will let you position macros precisely on the printed page.

The fields feature is a more advanced feature that allows you to create very professional looking letters.

Macros

Macros are those bits of text surrounded by ${} such as *${Student.studentName}*.

When the letter generating is running, it will replace those bits of text with the actual values. A letter macro is defined as:
${[Aggregate]:Object[(Index)].property,[[[size],alignment],format]}

If that looks overly complicated, well, it is!

Lucky for us, we do not have to memorize or even know anything about that notation.

There is an easy to use tool built into the system that creates these cryptic macros for us. It is called the "Macro Builder".

You can open the macro builder by clicking on the link for it next to the save button. This will open a popup window.

Macro Builder

The Object and Property drop down list will show you all of the objects and properties that you can build a macro from. The list is generated from the objects that are used in the Query.

The Index field is used to specify which Object in a set you want to display. In our Student Fine letter example, a single Address Object contains a Single Student Object which may contain 5 Student Fine Objects. The index says that I want to display the Nth Object's property.

The Characters to display field is used when you want to right or center justify a block of text. For example, you may want to right align dollar amounts within a 10 character block. For left justified text, this field can be left blank. You can also use this to limit the number of characters that are displayed. If you want to display the first 20 characters in a Student's name, you can set this value to 20.

The Align Text options are used to set Left, Right or Center aligned text. This option is only used when the Characters to display field contains a value.

The formatting field lets you format your numeric or date/time fields. You can enter a format by hand, or choose one from the drop down list next to it.

The aggregate function allows you to display the sum, minimum, average or maximum values of a set of Objects.

Aggregates only work on numeric data. If an index is specified, it will be ignored.

Once you have defined your macro, you can simply copy and paste it from the text box at the bottom of the dialog box and into your letter.

Example:

Once you have your text entered, you are ready to TEST or GENERATE your letter!


For the main Student Letter article, click here.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article