How to Set Up and Edit Report Templates in Collection-Master
Goal
The goal of this document is to better understand how to set up report templates in Collection-Master. This document will focus on a few reports explaining the mechanics of editing a report and modifying it.
Report Templates in Collection-Master
Many reports in Collection-Master may be customized by editing the report template. The report template is a text file that is used by the program to format the output of the report. Collection-Master ships around 1,000 report templates; you may see them in the F:\CLSINC\REPORTS folder. In addition, you can customize or create new templates in the F:\CLSINC\CUSTRPT folder.
DEBUG mode
Collection-Master has an option to run in Debug Mode. When in debug mode, additional information becomes available. During this document, we may refer to “Debug Mode.” In these cases, we set the Environmental Variable for “DEBUG” to “Yes.”
Report Template Folders
- F:\CLSINC\REPORTS – This folder is reserved for reports published by Collection-Master. You should modify the report templates in this folder, as installing an update will likely override the template back to the published report.
- F:\CLSINC\CUSTRPT – This folder is reserved for custom reports modified and saved by the end-user. If you preserve the original document name, the Custom Report will replace the report published by Collection-Master.
- Naming Convention – Typically each report engine uses a prefix such as “COLLSUM” followed by a number. With a custom report, you may call the new report with a more descriptive name. Avoid special symbols, and use an “_” instead of a space.
Finding Templates in the Documentation
From the Search tab in the manual, search for “Report Template Name.” You will see many examples in the manual. Here are a few interesting report templates in Collection-Master.
Report Path | Report Name | Template Prefix |
[2-3-6] | Collection Summary Report | COLLSUM or COLSUM |
[1-3-5] | Print Labels | Labels |
[2-9] | Paper Ledger Card | PACT |
[1-5-7-1] | Closed/Re-Open Report | O_C_RPT |
[2-3-Z] | Costs Summary Report | COSTSUM |
[3-9-#] | Activitiy Status Report | ST- (Varies by section) |
Using Excel-IT with report templates.
Some reports support using ‘HTM” or “XLS” and the traditional RPT templates. HTM is a web-based report, and XLS is an enhanced version intended to work with Excel-IT.
Special Accounting XLS Templates
The fee bill, cost bill, and remittance reports have special multi-tab XLS versions of the reports included with the update.
- rmit_details_pmt_dp_cost.xls
- rmit_details_pmt_dp_cost_pmtrev_dprev_costrev.xls
- rmit_details_sum.xls
- rmit_onesheet.xls
- rmit_onesheetboxed.xls
- rmit_onesheetshaded.xls
- rmit_pmt_dp_cost_pmtrev_dpprev_costrev.xls
- rmit_pmt_dp_cost_sum_revs.xls
- rmit_pmt_dp_rev_cost.xls
- rmit_sum_details.xls
Section Name | Contents |
details | Itemized details of the remittance |
pmt | Report filtering only payments |
dp | Report filtering only direct payments |
cost | Report filtering only costs expended |
pmtrev | Report filtering on payment reversals |
dprev | Report filtering on direct payment reversals |
costrev | Report filtering on cost reversals |
sum | Report providing a summary of the remittance. |
revs | Report filtering on Reversals. |
Very often, one of the pre-made remittance reports will meet your needs. Simply copy the desired report to F:\CLSINC\CUSTRPT and all the report RMIT + [Sort Code].xls or RMIT + [Forwarder #].xls or even RMIT.xls if you want the format to be the default for all forwarders.
Report Template Types: NWP vs HTML
Report templates provide “Hex Codes” to determine the report output.
- Fixed Fonts reports – These reports are traditional dot-matrix reports. They do not take advantage of advanced fonts and have limited compatibility with HTML / Excel outputs. They are generally legacy reports.
- Native Windows Printing (NWP) – These reports use various codes to provide advanced proportional font formatting. They provide the best possible output for all output options, including PDF, HTML, and Excel.
- HTML or Excel Printing – These reports use HTML commands to create advanced output, including anything you can code in HTML. HTML supports multi-tab XLS reports as well as providing HTML output for use with HTML & Excel. Note that HTML reports are not compatible with traditional printers.
Using Debug Mode to Identify Report Template
Using the [2-3-6] Financial Summary Report as an example with the Debug Mode enabled, you can see the exact templates used by a report. Notice that in this example, some of the reports are pulled from a custom version in the CUSTRPT folder:
The Various Components of a Report Template
A report template always starts with the “maximum width” used by the report. In the above example: 177.
The following table shows the maximum characters for various paper sizes. These maximums all assume 20 Characters Per Inch (CPI). Technically, you can push the margins further, and some printers only support 17 CPI, but it’s a good guide. If you take the margins out, the maximum paper size for legal landscape is 14 inches and a maximum of 280 CPI. It turns out that we can’t stretch the paper to be larger!
Paper Size | Orientation | Size (1/2” Margin) | Maximum Characters |
Letter | Portriate | 7.5” | 150 |
Legal | Portriate | 7.5” | 150 |
Letter | Landscape | 10.5 | 210 |
Legal | Landscape | 13.5 | 270 |
The second line of the template is an English description of the report. This description will be used to display on the report menu if appropriate.
Some reports have “Flags” or options that will change the nature of the report. In the above example:
- ||COLLECTIONS ONLY:
In the case of ||COLLECTIONS ONLY: it instructs the 2-3-6 report to report on Collections Only.
Each area of the report is broken into a different section:
Report Section | Frequency |
||TOP OF PAGE: | Top of Every Page |
||TITLE: | After Top of Page on the 1st Page of the report |
||HEADING: | At the beginning of the itemized section. Paper reports will repeat the heading for every page. |
||BODY: | Each Line item for the report |
||TRAILER: | At the end of the itemized section. |
||TOP OF PAGE:
[Column14CPI(Arial)][Column-Row_Label]Current Trust Account:[Column-MidRow_String]\ACCOUNT\[Column-MidRow_Label] Date:[Column-MidRow_Date] \DATE\ [Column-MidRow_Label]Page:[Column-MidRow_Number]\PAGE\[/Column-Row][/Column]
- [Column14CPI(Arial)] – This command tells the software to use Arial as a proportional font for the report section. CPI is used as an approximate number of characters per inch.
- Remember that with proportional fonts, XXXXXXXXXXXXXX is wider than ………….. even though both are 14 characters.
- You may wish to refer to the Mastermind session on Printing for more details about the various print options.
- Grid components support various types of shading and line draw.
Command | Description |
[Column14CPI(Arial)] | Begin a section of proportional fonts. |
[Column-Row_Label] | Start a proportional font section. No Line draw or shading. |
[Column-MidRow_String] | Use this command to separate columns, and define a string output. |
[Column-MidRow_Date] | Use this command to separate columns, and define a date output. |
[Column-MidRow_Label] | Use this command to separate columns, and define a Label output. |
[Column-MidRow_Number] | Use this command to separate columns, and define a Numeric output. (Right Aligned) |
[/Column-Row] | End a line of output |
[Column-Header_Caption] | Used to define the beginning of a shaded header |
[/Column-Header] | Used to define the end of a shaded header |
[/Column] | Close off a section of proportional fonts. |
- In addition to the grid components, you can define line draw components.
Command | Description |
[BoxBottom] | Add a “Bottom Box” to the output. Useful as an example to underline a report name. |
[BoxSides] | In addition to the bottom line, add sides to the report template. |
There are many other combinations available, and the various COLLSUM.rpt templates provide good examples.
HTML or Excel/Excel-it Reports
HTML or Excel/Excel-it reports allow for advanced HTML formatting, including all HTML commands. They are very similar in nature to the NWP reports covered earlier, but instead of using the NWP commands, they take advantage of HTML to define the report output. Excel-it best consumes HTML reports.
- Note: The HTML RPT template uses HTML coding but is not an HTML document, so you can’t use an HTML editor directly on the report template.
||TOP OF PAGE:
- HTML reports may include style sheets and other advanced formatting commands.
</pre><HEAD>
<TITLE>DAILY COLLECTIONS LEDGER -\ACCOUNT\ DATE:\DATE\ </TITLE>
<!– #BeginEditable “CM Standard Style” –>
<meta http-equiv=Content-Type content=”text/html; charset=windows-1252″><meta name=ProgId content=Excel.Sheet><meta name=Generator content=”Collection-Master”>
<style id=”CM HTML Reports”>
<!–table
{mso-displayed-decimal-separator:”\.”;
mso-displayed-thousand-separator:”\,”;}
.Class_CM_Heading_Left
{padding-top:1px; padding-right:0px; padding-left:0px; mso-ignore:padding; color:windowtext; font-size:12.0pt; font-weight:600; font-style:normal; text-decoration:none; font-family:TimesNewRoman; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:Fixed;vertical-align:bottom;
text-align:Left;
background:#99FFFF;
border: 2px groove silver;
}
.Class_CM_Heading_Right
{padding-top:1px; padding-right:0px; padding-left:0px; mso-ignore:padding; color:windowtext; font-size:12.0pt; font-weight:600; font-style:normal; text-decoration:none; font-family:TimesNewRoman; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:Fixed;vertical-align:bottom;
text-align:Right;
background:#99FFFF;
border: 2px groove silver;
}
.Class_CM_Heading
{padding-top:1px; padding-right:0px; padding-left:0px; mso-ignore:padding; color:windowtext; font-size:12.0pt; font-weight:600; font-style:normal; text-decoration:none; font-family:TimesNewRoman; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:Fixed;vertical-align:bottom;
text-align:Center;
background:#99FFFF;
border: 2px groove silver;
}
.Class_CM_Body
{padding-top:1px; padding-right:0px; padding-left:0px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:Fixed;vertical-align:bottom;
text-align:Left;
background:#FFFFCC;
border: 2px groove silver;
}
.Class_CM_Body2Color
{padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:Fixed;vertical-align:bottom;
text-align:Left;
background:#CCFFFF;
border: 2px groove silver;
}
.Class_CM_Date
{padding-top:1px; padding-right:0px; padding-left:0px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:Fixed;vertical-align:bottom;
text-align:Left;
background:#FFFFCC;
border: 2px groove silver;
mso-number-format:[MSO-DATE];
}
.Class_CM_Currency
{padding-top:0px; padding-right:0px; padding-left:0px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:Fixed;vertical-align:bottom;
text-align:Right;
background:#FFFFCC;
mso-number-format:[MSO-CURRENCY];
vnd.ms-excel.numberformat:$#,##0.00_)[semicolon][Red]($#,##0.00);
border: 2px groove silver;
}
.Class_CM_Number
{padding-top:0px; padding-right:0px; padding-left:0px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:0;vertical-align:bottom;
text-align:Right;
background:#FFFFCC;
border: 2px groove silver;
}
.Class_CM_Time
{padding-top:0px; padding-right:0px; padding-left:0px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:Fixed;vertical-align:bottom;
mso-style-parent:style0;
mso-number-format:”h:mm:ss”;
background:#FFFFCC;
mso-pattern:auto none;
text-align:Left;
border: 2px groove silver;
}
h1{
color: black;
background-color: #99FFFF;
text-align: center;
font-size-adjust:+.6;
}
h2{
color: black;
background-color: #99FFFF;
text-align: center;
font-size-adjust:+.5;
}
h3{
color: black;
background-color: #99FFFF;
text-align: center;
font-size-adjust:+.4;
}
.Label{
padding-top:1px; padding-right:0px; padding-left:0px;
mso-ignore:padding;
font-size:12.0pt; font-weight:400; font-style:normal;
mso-generic-font-family:auto; mso-font-charset:0;
mso-number-format:Fixed;
vertical-align:bottom;
text-align:Right;
background:#99FFFF;
border: 2px groove silver;
}
.Report_Table{
border:1.0pt solid windowtext;
color:black;
background-color:#FFFFCC;
width:90%;
}
.Column_Heading{
padding-top:1px; padding-right:0px; padding-left:0px; mso-ignore:padding;
font-size:12.0pt; font-weight:600; font-style:normal;
mso-generic-font-family:auto; mso-font-charset:0;
mso-number-format:Fixed;
vertical-align:bottom;
text-align:general;
background:#99FFFF;
border: 2px groove silver;
}
.Field_Time{
padding-top:0px; padding-right:0px; padding-left:0px;
mso-ignore:padding;
font-weight:400; font-style:normal;
mso-generic-font-family:auto; mso-font-charset:0;
mso-number-format:Fixed;
vertical-align:bottom;
background:#FFFFCC;
border: 2px groove silver;
color:black;
text-align:right;
}
.Field_Number{
padding-top:0px; padding-right:0px; padding-left:0px;
mso-ignore:padding;
font-weight:400; font-style:normal;
mso-generic-font-family:auto; mso-font-charset:0;
mso-number-format:Fixed;
vertical-align:bottom;
background:#FFFFCC;
border: 2px groove silver;
color:black;
text-align:right;
}
.Field_String{
padding-top:1px; padding-right:0px; padding-left:0px;
mso-ignore:padding;
font-weight:400; font-style:normal;
mso-generic-font-family:auto; mso-font-charset:0;
mso-number-format:Fixed;
vertical-align:bottom;
text-align:Left;
background:#FFFFCC;
border: 2px groove silver;
}
.Field_Currency{
padding-top:0px; padding-right:0px; padding-left:0px;
mso-ignore:padding;
font-weight:400; font-style:normal;
mso-generic-font-family:auto; mso-font-charset:0;
mso-number-format:Fixed;
vertical-align:bottom;
background:#FFFFCC;
border: 2px groove silver;
text-align:Right;
vnd.ms-excel.numberformat:$#,##0.00_)[semicolon][Red]($#,##0.00);
}
.Field_Date{
padding-top:0px; padding-right:0px; padding-left:0px;
mso-ignore:padding;
font-weight:400; font-style:normal;
mso-generic-font-family:auto; mso-font-charset:0;
mso-number-format:Fixed;
vertical-align:bottom;
background:#FFFFCC;
border: 2px groove silver;
text-align:Right;
}
.Total_Time{
color:black;
font-weight:bold;
background-color:yellow;
text-align:right;
}
.Total_Number{
font-weight:bold;
color:black;
background-color:yellow;
text-align:right;
}
.Total_Currency{
color:black;
font-weight:bold;
background-color:yellow;
text-align:right;
vnd.ms-excel.numberformat:$#,##0.00_)[semicolon][Red]($#,##0.00);
}
–>
<!– #EndEditable –>
</style>
</head>
<body bgcolor=”#FFFFFF”>
||HEADING:
- With an HTML report, the heading section defines the beginning of a table as well as defining the header fields included with the output.
- While it is not required for each field to be on its own line, it makes it much easier to read and edit.
- Notice that the fields have been assigned classes; in HTML, classes define the behavior and type of field.
||HEADING:
<table border=”1″ bgcolor=”White”><font face=”Arial” size=”5″ color=”BLACK”>
<tr>
<th Class=Class_CM_Heading>PMT<br>DATE</th>
<th Class=Class_CM_Heading>FILE<br>NUMBER</th>
<th Class=Class_CM_Heading>CLIENT<br>NUMBER</th>
<th Class=Class_CM_Heading>FORWARDER<br>FILE NUMBER</th>
<th Class=Class_CM_Heading colspan=2>DEBTOR<br>NAME</th>
<th Class=Class_CM_Heading>PAYMENT<br>AMOUNT</th>
<th Class=Class_CM_Heading>TOTAL<br>FEES</th>
<th Class=Class_CM_Heading>AGENT<br>FEES</th>
<th Class=Class_CM_Heading>ACTUAL<br>FEES</th>
</tr>
||BODY:
- Similar to the heading section, the body lists each of the fields to be included.
- Notice that the field is represented with a “\” (Backslash).
- In addition to the constants that are defined for each report, many times, SQL fields are supported.
- In 2-3-6, the following SQL fields are supported. Not all report templates support all fields.
Table | Description |
Master | Master Claims table, includes many of the claim fields. |
Extra | Supplemental fields including Caption & Misc Fields. |
Masforw | Fields for the forwarder file associated with the claim. |
Finsum | Fields from the FINSUM table including many details about the transaction. |
Clerkf | Fields for the Court or Venue associated with the claim. |
-   is an HTML command that represents a “Non-Breaking Space.” In particular, it is useful for the forwarder file #, which can often be a 20-digit number that Excel interprets as scientific notation.
||BODY:
<tr>
<td Class=Class_CM_Date>\TDATE\</td>
<td Class=Class_CM_Body>\FILENO\ </td>
<td Class=Class_CM_Body>\FORW{5}\ </td>
<td Class=Class_CM_Body>\B1(3)\ </td>
<td Class=Class_CM_Body>\B2(1){1:29}\ </td>
<td Class=Class_CM_Body>\CODE\ </td>
<td Class=Class_CM_Currency>\COLL\</td>
<td Class=Class_CM_Currency >\FEES\</td>
<td Class=Class_CM_Currency >\TOOK\</td>
<td Class=Class_CM_Currency >\ACTUAL\</td>
</tr>
||TOTALS:
- The totals section provided totals for the report. In this example, the report provided specific totals for Direct Payments and in-house payments along with grand totals. As with the other sections, you can only use the pre-defined fields and cannot make up a new set of calculations.
||TOTALS:
<tr>
<TH Class=Class_CM_Heading COLSPAN=6>DIRECT PAYMENT TOTALS:</th>
<th Class=Class_CM_Currency >\DPTOT(1)\</th>
<th Class=Class_CM_Currency >\DPTOT(5)\</th>
</tr>
<tr>
<TH Class=Class_CM_Heading COLSPAN=6>IN-HOUSE TOTALS:</th>
<th Class=Class_CM_Currency >\INHOUSE(1)\</th>
<th Class=Class_CM_Currency >\INHOUSE(5)\</th>
</tr>
<tr>
<TH Class=Class_CM_Heading COLSPAN=6>TOTALS:</th>
<th Class=Class_CM_Currency >\TOT(1)\</th>
<th Class=Class_CM_Currency >\TOT(5)\</th>
<th Class=Class_CM_Currency >\TOT(7)\</th>
<th Class=Class_CM_Currency >\TOT(8)\</th>
</tr>
</table>
||TRAILER:
- In this report, the trailer presents the settings the user picked when running the report.
- <HR> is an HTML command for Horizontal Rule (Or Line).
- Notice the <pre> command, which switches the report to fixed or pre-formatted fonts.
- Pre-formatted text shows up in “Column A” in Excel. Excel adds a bit of complexity as a column can only be a single width, so formating the report into individual cells would take a moderate amount of effort and would likely affect the formatting of the body.
||TRAILER:
<HR>
<pre>
Starting date:\SDATE\ Ending date:\EDATE\
LOW HIGH
\FORW_WCM\ number: \L_FORW\ \H_FORW\
\ATTY_WCM\ number: \L_ATTY\ \H_ATTY\
\SECY_WCM\ number: \L_SECY\ \H_SECY\
\COLL_WCM\ number: \L_COLL\ \H_COLL\
\COCO_WCM\ number: \L_COCO\ \H_COCO\
Transaction Type: \L_CATEG\ \H_CATEG\
Include Direct Payments on report (Y/N):\NO_DP\
Print Only Direct payments (nothing else)(Y/N):\DP_ONLY\
Include Only Collection Transactions (Y/N):\COL_ONLY\
Print Itemization on Report (Y/N):\IR\
</pre>
</body>
</html>
Notepad++
We use Notepad++ internally to edit our report templates. Any text editor may be used including the regular Notepad included with Windows.