Customizing Statement Reports
This tutorial will demonstrate how to customize the statement reports in the Statements section of the program. This video applies to all statement report sections.
AgWare created a new field for the Statement Reports called an MgrIndentMemo. This field allows the user to control the indent width of the field, the style of the statement headers, and the style of the statement footers. The first step to customizing your statement report, is to run the report that you want to customize. I’ll go ahead and run the statements by farm income summary report. Next, we need to make a copy of the system report, as you can’t make changes directly to a system report. To copy the report, we’ll click the design report button, and click the copy report option. If you do not see the design report button, this means you don’t have permission to design reports. You’ll need to contact your database administrator to make the custom report. You’ll then need to give your report a name; this can be anything you would like. I’ll name mine Customized Income Statement, and click the OK button. Once you click OK, this will open the report directly into the report designer. On the left side of the designer, you’ll see a toolbar of buttons. These are all the report object options; in other words, they are the different items you can add to the report. For example, the fourth item from the top is used when adding a text field. The second item from the bottom is the button for the new MgrIndentMemo field. Since this is an existing statement report, we already have the MgrIndentMemo field added to the report. You’ll see it in the DetailData1 band. If the field was not already present in the report, you would click the left toolbar button, and draw the field on the report where you want it. You’d then use the down arrow key shown when hovering over the field to set the field name. When you select the MgrIndentField, the name of the field appears at the bottom of the screen. Notice it says TMgrIndentMemo1. This is exactly what we want to see, because this means it is our new field that has the additional options for indenting and formatting.
The first new option we’ll look at is the indent width property. On the bottom left of the screen, you’ll see the object inspector. This shows all available properties for the selected report field. We’ll go ahead and make sure our MgrIndentMemo is chosen. Then, we’ll scroll down in the object inspector until we see the IndentLevelFieldName property. All items in the object inspector are in alphabetical order. The IndentLevelFieldName property should always default to IndentLevel. If it doesn’t, go ahead and select it from the available drop down list. This property tells the report that we want to look at the value in the IndentLevel field of the Statements table in the database to determine the indent level of the current statement item. The next field is the IndentWidth. The unit of measurement for the indent width is shown in the bottom left hand corner of the report designer. The default unit of measurement is inches. If your report is not in inches, you can double click on the unit of measurement shown to change it. The default IndentLevel for the system reports is .15 inches. You can increase or decrease this amount by entering your own number. For instance, if I change this to .5 inches, and preview the report by clicking on the preview toolbar button, you’ll notice that the indent width is much larger than it previously was. Now, I’ll click the close button to close the preview, and I’ll change my IndentWidth back to .15 inches.
The next new option we’ll look at is the HeaderGroupStyle. All options contained in this main property will only affect the headers you’ve configured in your statement setup. When you click the plus sign to the left of the HeaderGroupStyle, you’ll see five different options. The ExtraIndent field gives you the option to apply an extra indent to the headers. The font options allow you to change the font name, font size, and font style. If we click the plus sign to expand the font options, and then click the plus sign to expand the style options you’ll see the normal bold, underline, italics, and strikethrough options. If you choose any of the font options in the HeaderGroupStyle, you’ll want to make sure you check the UseFont option. This tells the report to override any of the default font options, and use the special font options you’ve configured here. We’ll go ahead and set our header size to 12 and we’ll also underline it. Now, we’ll preview our header changes. You’ll now see that only the headers have a larger font size and are underlined.
The next option is the Frame option which contains the various options for setting the field’s frame such as the frame color, frame width, and frame type. To apply a frame type, you’ll expand the Typ property and set the desired property to true. If you choose any of the frame options in the HeaderGroupStyle, you’ll want to make sure you check the UseFrame option. This tells the report to override any of the default frame options, and use the special frame options you’ve configured here.
The other new option on the MgrIndentMemo is the FooterGroupStyle. The properties contained in the FooterGroupStyle are the same as the options contained in the HeaderGroupStyle except they only apply to the footers you configured in your statement setup.
If there is more than one field in a report line, you’ll need to apply any desired changes to each field. For instance, in this report I have my display name field on the left and my period print value field on the right. Even though they are on the same line, since they are two separate report fields they each contain their own properties. If I wanted to turn on the top frame for the footer on the dollar amount shown on the report, I would select the period print value field, expand the FooterGroupStyle options, expand the frame options, expand the typ options, set top to true, and check the use font option. Now, when I preview my report it shows the top frame on each of the amounts shown in the group footers.
As noted previously, you can use the preview button on the toolbar to preview any changes you have made to the report. To close the print preview, you’ll simply click the close button on the toolbar. When you are finished applying your changes, you’ll click the save layout and close button. This will then close the designer and take you to the printed report. Now, when you come into the report tab, you’ll see that your custom report appears in the group above the system reports. You can create as many customized statement reports as needed. Simply follow the previous steps to create the other reports.
If you have any questions or comments about customizing statement reports, please don’t hesitate to give us a call at 605-791-4872, or send an email to email@example.com.