CRMtimes.GIF (8509 bytes)

CRMtimesnav.GIF (22964 bytes)

 

commencerm_logo.gif (2110 bytes)

 

Technical Desk - Report Writer Basics(1)

pe01561_.jpg (31228 bytes)

Commence now includes a powerful Report Writer utility, that can be used to view your Commence data in a custom report format. The Report Writer utility allows you to create advanced, formatted reports, including headings, various fonts and graphics.

This article focuses on the basics of Report Writer. It covers how to create a report, how to launch the Report Designer, and provides an overview of the controls and properties which are accessible through the Report Designer. 

Support for the Report Writer is fully detailed in the Commence User Manual (pages 45-56). There are many features that can be taken advantage of, and some of the basic ones will be covered in this article. Some of the more advanced features will be discussed in the next issue of CRMtimes. Please note that Commence and Advanced User Systems only support the features which are documented in the User Manual.

The Report Writer utility is bundled with Commence and consists of two components, the Report Viewer and the Report Designer. 

Report Viewer

If you want to do some work with reports, the first thing you have to do is create a report using the Report Viewer.

Creating a report using Report Viewer

  1. Select Views -> Open/Manage Views from the menu. Click Create New. The New View dialog box will appear.

 

  1. In the View As radio group, choose Report Viewer.

  2. From the category list box, highlight the category that contains the data for the new view. Click View to open the new report.

  3. A New View window will open

  1. Select Customise -> Design View to begin formatting the report.

  • Fields: This tab lets you select which fields will be displayed in the report viewer

  • Filter/Sort: This tab lets you set filters and sorts for the report viewer

  • Design: This tab takes you to the Commence Report Designer so you can design your report layout and configure other report attributes

  1. On the Design tab, click Launch Designer. You will be prompted to save the new report viewer.

Enter a View Name and click Save.

Note: The report viewer may be saved to the View Bar or Views Menu along with your other Commence views. 
  1. After saving the report viewer, the Commence Report Designer will launch.

 

Selecting Which Fields Appear In The Report

To select which fields will be displayed in the Report Viewer:

  1. After selecting Customise -> Design View, click the Fields tab.

  2. From this window, you can choose which fields will be included in the Report Viewer.

  3. When you have finished adding fields, you may click OK to save your changes and close the window.

There are two columns shown on the Design View - Fields dialog box. The first column, shown on the left-hand-side of the form (Fields In Report), indicates all fields that are included (i.e. visible) in the current Report Viewer design. The column in the area on the right of the form (Fields Not In Report) are those fields NOT included in the current Report design.

To select which fields will be included in a Report Viewer, proceed as indicated below.

  • Append Field - this option adds a field to the end of the list of fields included in the Report View. Simply highlight the desired field in the Fields Not In Report column, and press the <-- Append Field button. The field name will now be listed at the end of the Fields In Report column.

  • Insert Field - this option can be used interchangeably with Append Field for the Report Viewer. The field layout will be determined in the Commence Report Designer.

  • Remove Field --> - this option is used to remove the selected field from the list of Fields In Report.

NOTE:  Double-click on a field in the list of Fields In Report to remove the field, Double-click on a field in the list of Fields Not In Report to add the field to the Report

Filtering And Sorting Reports

The items in the report viewer can be filtered and sorted as with any other Commence view. 

Setting a filter will determine which items are displayed in the finished report. Likewise, setting the sort order will affect the order in which those items appear in the finished report.

To filter and/or sort the items in the Report Viewer:

  1. After selecting Customise -> Design View, click the Filter/Sort tab.

  2. Press the Filter button on this screen if you wish to define a filter. The standard Filter dialog will appear.

  3. Press the Sort button on the Filter/Sort screen to apply a sort to the items in the Report Viewer.

A modified version of the Sort Fields dialog for the Report Viewer will appear:

  1. From here, select what fields are to be used for the sort and whether the sort on the field is to be in Ascending (A - Z) or Descending (Z - A) order.

  2. When you have finished your changes, you may click OK to save your changes and close the window.

NOTE: In order to see the changes you have made you must both save the changes to the sort order above and refresh the report. To refresh the report you can either close the report and re-open it or a better method is to click on the refresh button in the report viewer as shown below.  
 

NOTE: With Report Writer reports, Group Headers and Group Totals fields are managed from in the Report Designer. However you also need to ensure that the data in the report is sorted appropriately for the Group Headers and Totals to work correctly. The process of setting these headers will be discussed in a future CRMtimes article.

 

Report Designer

The Commence Report Designer is used to customise the report layout for a Report Viewer.

To Customise A Report Using the Report Designer

  1. The report viewer window should be the active window.

  2. After selecting Customise -> Design View, click the Design tab.

  3. Click the Launch Designer... button to open the following dialog:

  1. The fields you selected in the report viewer will be listed in the Fields toolbox on the left hand side of the screen.

NOTE: Each field in this list has been bound to a text box, also known as a control, within the Report Designer. As you customise the properties for each field, you are actually setting the properties for the control that the field has been bound to.
  1. Use drag and drop to move each field into the report layout. Fields can be positioned anywhere in the Header, Body, or Footer of the report. When you drop the field into the report, it will be displayed as a box and the field label will be changed to txtFieldname or Field1 indicating that this field is now a text or field control.

You can add as many copies of the same field to the report as you want. Just drag and drop the field from the Fields toolbox to the report again.

  1. Each field can be resized to accommodate the amount of data expected for each field. To resize a field, click on the edge of the control for that field until handles appear on each side. A handle can be dragged in two directions to increase or decrease the field width and height as needed.

  2. Additional controls, such as labels, lines and images can be added to the report. 

  3. As you design the report, you may click Preview at the top of the Commence Report Designer window to see what the report looks like at each stage in the design process.

  4. Each field you add to the report has properties that can be set, such as font and colour. In the Property Toolbox, select the field you want to customise from the drop-down list. Or click directly on the field in the report to access the properties for that field. 

  5. You can add page numbering to your report using the field's PageCount summary type. Page numbers are created using a running summary field.

  6. When you are finished designing the report, click on Save to Commence to save the report viewer layout. This will also regenerate the report for you - this could take several minutes for very large reports.  

  1. Select File -> Exit to close the Commence Report Designer.

 

Adding Controls With The Toolbox 

The buttons on the toolbox allow you to add various controls to your report.

 

Field Property Toolbox

Each field that you add to the report has properties that can be set. The table below describes these properties.

Shortcut - Some field properties can be set by clicking on the corresponding shortcut button on the Format Toolbar.

 

NOTE: Group Headers and totals are accomplished by setting the summary functions (e.g., SummaryDistinctField, SummaryFunc, SummaryGroup, SummaryRunning, and SummaryType).

 

NOTE: When using the summary functions with a field, the CanGrow and CanShrink properties are disabled for the field.

How To Insert A Logo Into A Report

  1. Open up the Report that you want to customise

  2. Go to Customise > Design View

  3. Click on the Design Tab and then click the Launch Designer... button

  4. When the designer opens, select the Image Icon from Toolbox

  1. Move to the position in the report where you want the logo to appear, you will see the mouse pointer turns into a + sign. Click and hold down the left mouse button and drag the mouse diagonally down and to the right and you will see a dotted rectangle appear. Adjust the size of the rectangle so that it is approximately the size of the logo and then let go of the mouse button. You do not need to worry too much about getting it exactly correct, as you can easily adjust the image size and position later.

 
NOTE: If you make a mistake by putting the logo in the wrong part of the report, you can simply delete the Image control rectangle by selecting it and then hitting the delete key.
  1. You will notice that the Properties Toolbox now shows all the properties for Image1 (the default name) used for the Image control you have just created. As you can see there are several properties you can adjust and from a glance you will notice that the Picture property has (None) assigned to it at the moment. Click where it says (None) and a little grey box will appear to the right of the word (None). Click on the grey box and a dialog box will pop-up allowing you to select a file to use for the image. Find the file you want to use and click on the open button. The image will appear in the Image1 rectangle as below.

NOTE: If the image is not displayed correctly in the rectangle, you can either resize the rectangle so it fits the image, or you can set the SizeMode property to Stretch and the image will resize to fit in the rectangle.
  1. When you are finished designing the report, click on Save to Commence to save the report viewer layout. This will also regenerate the report for you - this could take several minutes for very large reports. 

  2. Select File -> Exit to close the Commence Report Designer.

An Example Report Writer Report

Here is an example of what a Report Writer report can look like when complete:

In the next issue of CRMtimes, the more advanced features of the Report Writer will be discussed.

 

bottomline.gif (4517 bytes)
CRMtimes - eNewsletter for Business Managers implementing CRM

auslogosmall.gif (726 bytes)

This site is sponsored by Advanced User Systems Pty Ltd.

Email: CRMtimes@aus.com.au
http://www.aus.com.au