Creating a new report type

This page is OBSOLETE. New version can be found here.

Flash tutorial

To view a Flash presentation of the procedure click here.

Creating a report template in OpenOffice?.org

Report templates are created with OpenOffice.org Writer which can be downloaded from http://download.openoffice.org/index.html. OpenOffice.org is a open source office suite which works on many platforms.

Editing the report template is similar to creating a form which is ment to be printed and filled in manually. Typically you add labels like 'Name: ' and then leave some empty space for the name etc. Images, tables and other kind of objects can also be used just like in other documents.

User fields

User data is dynamically inserted to the report template by the means of user fields, which are a part of the OpenDocument format specification. NorfelloCMMS supports the following types of fields:

  • String
  • Long string
  • Integer
  • Floating point number
  • Boolean
  • Date
  • Time
  • Date and time

Inserting a field in the OpenOffice.org Writer is done with the 'Fields' dialog which can be found by navigating 'Insert' -> 'Fields' -> 'Other' or by pressing CTRL+F2. Then select the 'Variables' tab and 'User field' from the type list. From this view you can select the appropriate formatting and name the field. Insertion is done by first positioning the cursor and then clicking the 'Insert' button.

It should be noted that setting the formatting doesn't automatically select a type for the field. This is done later in the report type creation wizard.

Field names can contain lower and upper case letters, numbers from 0 to 9 and underscores. You should name the fields so that you can identify them later in the report type creation wizard. For example, field for the customer address could be 'customer_address' and for failure description you could use 'failure_description'.

Image fields

User fields are complemented by image fields which provide an input method for querying the user for a position inside a image. This could be used for example to indicate the location of a failed piece of equipment in a floor plan.

Image fields are inserted to the report template by first inserting the picture by navigation 'insert' -> 'picture'. Then go to the 'Picture' dialog by right clicking on the picture and selecting 'Picture...' from the pop-up menu.

Image fields are defined by starting the name of the image with IMAGE_FIELD:. Name can be entered in the 'Options' tab of the 'Picture' dialog.

Automatic fields

Automatic fields are inserted to the report template similar to the user fields but the values for these fields are not querid from the user. Instead they come directly from the CMMS.

Automatic fields are recognized by the name of the user field. Supported fields are:

User field name Value
cmms_asset_code Asset's code
cmms_asset_full_code Asset's full code
cmms_asset_name Asset's name
cmms_report_id Report's ID
cmms_report_creation_date Creation date of the report
cmms_report_type_name Report type's name
cmms_report_category_name Report category's name
cmms_creator_name Name of the user that created the report
cmms_creator_login Login of the user that created the report
cmms_creator_phone Phone number of the user that created the report
cmms_creator_email Email address of the user that created the report

Report type creation wizard

New report types are created with the report type creation wizard which can be found from the 'Control' section of the NorfelloCMMS. Before you can create a new type you must have created at least on report category and the OpenDocument report template for the new type.

In the first step of the wizard, you specify the report category and name the new type. Next you must upload the OpenDocument report template, which you created earlier. NorfelloCMMS will check that the uploaded file is an OpenOffice text document and will give you a error message if something is wrong.

Third view will give you a list of the user and image fields found in the document. Check that all your fields are recognized properly and make modifications to the template if necessary.

Forth and final step of the wizard is where you decide the type of each user field and change the layout of the report creation form. You can group associated fields together with field groups which can be created in the first form of the page. Each field group has a name and a place in the report creation form.

In the next form you see all the fields that you have specified in the report template. Each field has six different properties that you can edit:

  • Name: Name of the field, which will be displayed next to the input field.
  • Type: Type of the field affects the way the value is queried from the user.
  • Group: Which field group this field belongs to if any.
  • Place in the group: Controls the ordering inside a field group.
  • Show in report list: If set, the value of this field is displayed in the report listings.
  • Can't be empty: If set, the value of this field can't be empty.

If the 'Editable' check box is checked, the reports of this type can be edited.

You can preview the report creation form and report listing at any time by clicking on the 'Preview' link on the bottom of the page.

Attachments

  • failure_report.odt (19.2 kB) -Example report template, added by jarmo on 08/24/06 16:34:11.

© 2004-2007 Norfello Oy All Rights Reserved