You are on page 1of 34

Reporting Reference Manual

AVEVA Solutions Ltd

Disclaimer
Information of a technical nature, and particulars of the product and its use, is given by AVEVA Solutions Ltd and its subsidiaries without warranty. AVEVA Solutions Ltd and its subsidiaries disclaim any and all warranties and conditions, expressed or implied, to the fullest extent permitted by law. Neither the author nor AVEVA Solutions Ltd, or any of its subsidiaries, shall be liable to any person or entity for any actions, claims, loss or damage arising from the use or possession of any information, particulars, or errors in this publication, or any incorrect use of the product, whatsoever.

Copyright
Copyright and all other intellectual property rights in this manual and the associated software, and every part of it (including source code, object code, any data contained in it, the manual and any other documentation supplied with it) belongs to AVEVA Solutions Ltd or its subsidiaries. All other rights are reserved to AVEVA Solutions Ltd and its subsidiaries. The information contained in this document is commercially sensitive, and shall not be copied, reproduced, stored in a retrieval system, or transmitted without the prior written permission of AVEVA Solutions Ltd Where such permission is granted, it expressly requires that this Disclaimer and Copyright notice is prominently displayed at the beginning of every copy that is made. The manual and associated documentation may not be adapted, reproduced, or copied, in any material or electronic form, without the prior written permission of AVEVA Solutions Ltd. The user may also not reverse engineer, decompile, copy, or adapt the associated software. Neither the whole, nor part of the product described in this publication may be incorporated into any third-party software, product, machine, or system without the prior written permission of AVEVA Solutions Ltd, save as permitted by law. Any such unauthorised action is strictly prohibited, and may give rise to civil liabilities and criminal prosecution. The AVEVA products described in this guide are to be installed and operated strictly in accordance with the terms and conditions of the respective licence agreements, and in accordance with the relevant User Documentation. Unauthorised or unlicensed use of the product is strictly prohibited. First published September 2007 AVEVA Solutions Ltd, and its subsidiaries 2007 AVEVA Solutions Ltd, High Cross, Madingley Road, Cambridge, CB3 0HB, United Kingdom

Trademarks
AVEVA and Tribon are registered trademarks of AVEVA Solutions Ltd or its subsidiaries. Unauthorised use of the AVEVA or Tribon trademarks is strictly forbidden. AVEVA product names are trademarks or registered trademarks of AVEVA Solutions Ltd or its subsidiaries, registered in the UK, Europe and other countries (worldwide). The copyright, trade mark rights, or other intellectual property rights in any other product, its name or logo belongs to its respective owner.

Reporting Reference Manual

Reporting Reference Manual

Contents

Page

Reporting
Introduction to Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1
Sample Report Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1 Before You Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:2 Starting to Use Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:3 How to Use This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:3 Running a Report from a Saved Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:3

Creating and Running a Simple Report . . . . . . . . . . . . . . . . . . . . . . 2:1


Creating a Simple Nozzle Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1
Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1 2:1 2:1 2:2

Column Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2 Adding and Moving Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:3 Runtime Prompts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:4 Saving and Deleting Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:4
Saving a Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:4 Deleting a Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:5

Reporting on Different Parts of the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:5


Adding Elements using the Members List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:5 Adding Elements in a Given Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:5

2007 AVEVA Solutions Ltd

12.0

Reporting Reference Manual

From

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:6

More Column Layout Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:6


Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:6 Numeric Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:7 Text Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:8

Introductions and Summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:8

Sorting and Totalling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:1


Changing the Order of Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:2 Sorting on More than one Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:2 Totalling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:4 Subtotalling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:4
Showing only the First Occurrence of Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:5

Quantity

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:6

Selective Reporting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4:1 File Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:1


Page Information Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:1 Report Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:2
Late Evaluation of Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:2 Points to Note. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:2

Headers, Footers and Page Lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:3 Introduction and Summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5:3

Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:1


Running Reports in Batch Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:1 System Command Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:1 Report Output Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6:1

2007 AVEVA Solutions Ltd

1 A1:ii

12.0

Reporting Reference Manual


Introduction to Reports

Introduction to Reports
This manual is an introduction to the PDMS Reports Utility, available in DESIGN, DRAFT and PARAGON. The main features of the Report Utility include: Generation of report to file or screen. Listing of any element from a PDMS database. Specify lists of properties by which elements can be sorted. Quantifying of lists under sub-totals and grand totals. The ability to create expressions for column values, based on the contents of the column or the results of other columns. The ability to use expressions in report output, including user definition of titles, summaries, headers and footers. Generation of reports with specified column widths and delimiters for interfacing to other database systems or spread sheets. Complete control over the report definition and layout. Generation of reports using the batch process.

1.1

Sample Report Templates


You produce a report by running a report template. The template specifies what the report will contain, whether it will be sent to the screen or a file and how it will be laid out. Templates also specify what information can be specified at the time the report is run, for example, what part of the database, or the output filename. There is a library of example reports supplied with the product in the directory %PDMSUI%/ REPORTS. Under this directory is a TEMPLATES directory, which contains the templates which generated the reports. The templates are PDMS macros, but the best way to see how they are set up is to select Utilities>Reports>Modify... from the main menu, and look at the settings on the forms displayed. Templates have the file extension .tmp, and the corresponding reports have a file extension .rep. Most of the examples are based on the sample project and the sample templates supplied with the product.

2007 AVEVA Solutions Ltd

1:1

12.0

Reporting Reference Manual


Introduction to Reports

The sample templates produce the following types of report: nozz_sched This is a Nozzle schedule, which lists all Nozzles sorted by name, and shows the P1 bore, connection type and direction, and the position of each Nozzle. This report is a list of Branches, sorted by the name of the Pipe which owns them. The Head and Tail bores and the Head and Tail references are given. This report shows material information for all Branch members, sorted by type, Detail Text and Material Text. The Tube length and quantity of each component are totalled. There is an Imperial version of this report template. This report totals all Tubing. The Specification Reference, P1 Bore, Detail Text and Material Text are shown. This is a material take-off list for structural components. This report is an example of selective reporting. The centre-line length of each Branch is listed. There is an Imperial version of this report template. This report gives the gradient of each tubing component. This is an example of reporting on the catalogue database. It lists Branch members, with their CATREFs and the parameters of the CATREFs. This is an example of reporting on the catalogue database. It lists Branch members, with their CATREFs followed by the PTREFs and GMREFs of the CATREFs. This report uses derived properties to report on the area and volume of tubing.

line_list

pipe_mto

tube_mto steel_mto valve_list centre_line tube_gradient catalogue_param

catalogue_ptgmref

tube_area_vol

1.2

Before You Start


This manual assumes that you are familiar with PDMS to the level of the Basic Training Course. Most of the examples in this manual illustrate templates which report directly on PDMS attributes and pseudo-attributes. You can also use more complex expressions in report templates, and although some of these are illustrated, you will need to be familiar with PML, the AVEVA Programmable Macro Language, if you want to set these up for yourself. For information about further training, please contact your nearest AVEVA Support Office (see the copyright page at the front of this guide for details). To use the sample templates supplied with the product, the PDMS variable $PDMSREPDIR should be set to the directory where the sample reports are stored.

2007 AVEVA Solutions Ltd

1:2

12.0

Reporting Reference Manual


Introduction to Reports

1.3

Starting to Use Reports


You will usually have a library of report templates set up for you, but you can produce and run a report template quickly by selecting Reports>Create, filling in the New Report Template form to specify what you want to report on and then pressing Apply on the form, which will run the report. Note that this is the easiest way of testing a template that you are creating or modifying.

1.4

How to Use This Manual


Running a Report from a Saved Template summarises how to run a report from a saved template, which you may already know about. Creating and Running a Simple Report in Chapter Creating and Running a Simple Report is a tutorial which works through the steps of creating a simple report template, running it and saving it. Sorting and Totalling in Chapter Sorting and Totalling illustrates sorting and totalling by modifying the sample templates. Selective Reporting in Chapter Selective Reporting is a brief introduction to using PML expressions to produce selective File Reports in Chapter File Reports describes the options which are only applicable to file reports, including inserting headers and footers. It also describes how to insert introductions and summaries, which can be provided for screen reports as well, but they are created in the same way as headers and footers. Note that not all the options on all the forms are described when they are first seen. If you want more information about a form, use the online help.

1.5

Running a Report from a Saved Template


You may already be familiar with creating a report by running a saved report template. If not, try this introductory exercise: 1. Select Utilities>Reports>Run. You will see a File Browser, showing the contents of the directory REPORTS. Select the TEMPLATES sub-directory. 2. Select the report template pipe_mto.tmp and select Open. You will see the Report Details form, with the following options: Filename If you specify a filename, the report will be sent to the given file in your working directory. If you leave the text box empty, the report will be sent to the screen. Hierarchy Give a list of elements. The report will be output for all the elements given, and all the elements owned by them.

2007 AVEVA Solutions Ltd

1:3

12.0

Reporting Reference Manual


Introduction to Reports

2007 AVEVA Solutions Ltd

1:4

12.0

Reporting Reference Manual


Creating and Running a Simple Report

Creating and Running a Simple Report


This chapter describes how to create a simple report template, run it and save it. To work through the example, start up DESIGN, DRAFT or PARAGON, using the SAM project.

2.1

Creating a Simple Nozzle Schedule


The exercise creates a nozzle schedule, a simplified version of the one in the template nozz_sched.tmp supplied with the product. If you are running DRAFT, make sure that the Members List for the DESIGN database is displayed. Select Utilities>Reports>Create. You will see the New Report Template form. There are several groups of options on the form, described in the following subsections.

2.1.1

Destination
Destination allows you to specify whether the report is output to Screen or to a File. For this example, select Screen.

2.1.2

Selection
The Selection options allow you to specify the type of item you want to report on, and the level in the database hierarchy below which the selection will be made. The Zone EQUIP in the sample project contains the Equipment /E1301, which owns several Nozzles. We will produce a template to report on these Nozzles. For this example: 1. Enter NOZZ in the Type(s) textbox. 2. Leave the With text box blank. This is used in selective reporting, described in Selective Reporting. 3. Replace WORLD in the Hierarchy text box with /E1301. Note that the slash must be present, as you can give several names in the box.

2.1.3

Columns
Now create three columns for the report, to display the name of the Nozzle, the arrive bore and the position, using the Columns options. Select the New option button, and the Creating Column form will be displayed.

2007 AVEVA Solutions Ltd

2:1

12.0

Reporting Reference Manual


Creating and Running a Simple Report

The Expression text box defines the contents of the column. You can enter a PDMS attribute or pseudo-attribute here, or an expression containing attributes or pseudoattributes. Ignore the Sorting and Precedence option for now. By default, the list of items in the report will be sorted in the order in which they are stored in the database. You can set the Units option when appropriate. The Column Layout button is used to control the format of each column, but we will use the default layout for now. Fill in the form as follows: 1. For the first column, enter NAME in the Expression text box. 2. This is all you need to set for the first column: do not press OK yet, but select Next Column. The settings on the Creating Column form will be cleared ready for you to define the second column. 3. The second column will display the arrive bore of the Nozzles. Type P1 BORE into the Expression text box. Select Units of Any/mm. 4. Select Next Column again and define the third column, which will display the coordinates of the Nozzle, by entering POS into the Expression text box. Units should be set to Pos(mm). Now select OK on the Creating Column form. Note that the three columns you have defined are shown in the scrolling list on the New Report Template form.

2.1.4

Running the Report


Select Apply on the New Report Template form, which will run the report. The report will be output to a window: if you have an active window displayed, for example the command line window, the report will be displayed there. If there is no active window, a new window will be opened. The report should look like this:

NAME /E1301-S1 /E1301-S2 /E1301-S3 /E1301-T1 /E1301-T2

P1 BORE 200.00 200.00 200.00 100.00 100.00

POS E 0.00 E 0.00 E 0.00 E 0.00 E 0.00 N 3540.00 N 1100.00 N 5980.00 N 290.00 N 290.00 D 635.00 U 635.00 U 635.00 U 635.00 D 635.00

Note: By default the text that you entered in the Expression text box is used as the column heading. You can change this, as described in Text Display.

2.2

Column Layout
The layout of this report is not very easy to read, so now we will use the option on the Layout for Column form to improve it.

2007 AVEVA Solutions Ltd

2:2

12.0

Reporting Reference Manual


Creating and Running a Simple Report

Highlight POS in the list on the New Report Template form, and select Modify. On the Modifying Column 3 form, select Column Layout, and you will see the Layout for Column form. Set the Spaces before Column option to 4, and set Justification to Left. The output will look like this:

NAME
/E1301-S1 /E1301-S2 /E1301-S3 /E1301-T1 /E1301-T2

P1 BORE
200.00 200.00 200.00 100.00 100.00

POS
E 0.00 E 0.00 E 0.00 E 0.00 E 0.00 N 3540.00 N 1100.00 N 5980.00 N 290.00 N 290.00 D 635.00 U 635.00 U 635.00 U 635.00 D 635.00

Further column layout options are describes in More Column Layout Options.

2.3

Adding and Moving Columns


Now we will add two more columns to the report, for P1 CONN and P1 DIR. 1. A new column is inserted before the one selected in the list on the New Report Template form. To insert a column at the end of the list of columns, make sure that the entry reading <end> is highlighted, and select New again. 2. Enter P1 CONN into the Expression text box and set Units to Off. On the Column Layout form, set justification to Left. Select Next Column on the Creating Column form. 3. Enter P1 DIR into the Expression text box and set Units to Off. On the Column Layout form, set justification to Centre and select OK. 4. Select OK on the Creating Column form. Remember that inserting a new column will renumber all columns to the right of the new column. Now move the POS column so that it is the last (fifth) column again. 1. Highlight the POS column in the list on the New Report Template form, and select the Move option button. You will see the Move Column form. Select 5 from the option gadget and select OK. 2. Select Apply on the New Report Template form. The modified report should look like this:
NAME /E1301-S1 /E1301-S2 /E1301-S3 /E1301-T1 /E1301-T2 P1 BORE 200.00 200.00 200.00 100.00 100.00 P1 CONN FBD FBD FBD FBB FBB P1 DIR D U U U D POS E 0.00 E 0.00 E 0.00 E 0.00 E 0.00 N 3540.00 N 1100.00 N 5980.00 N 290.00 N 290.00 D 635.00 U 635.00 U 635.00 U 635.00 D 635.00

2007 AVEVA Solutions Ltd

2:3

12.0

Reporting Reference Manual


Creating and Running a Simple Report

2.4

Runtime Prompts
If you are going to save the template so that it can be run in future, it is likely that you will want to have some control over the content when the report is run. For example, you will want to specify the part of the hierarchy to report on. You can control what information the user is prompted for when the report is run using runtime prompts. The Runtime Prompts form will be displayed when you select Options>Runtime Prompts on the menu on the New/Modify Report Template form. The options correspond to the options on the New/Modify Report Template form. They are: File name Type(s) With Hierarchy Volume From

File name allows you to specify the file where the report will be stored. The only other options we have looked at so far are Type(s) and Hierarchy. 1. Switch on File name, Type(s) and Hierarchy on the Runtime Prompts form and select OK. 2. Now run the report again, by selecting Apply on the New Report Template form. You will see the Report Details form, with the values you have set on the Report Template form for the three parameters displayed. You can now change them: for example, enter a filename, and add other Equipments to Hierarchy. Note: If you specify in the template that a report will be sent to a file, and the user removes the filename on the Report Details form, the report will be sent to the screen. However, if you specify that the report will be sent to the screen, do not switch on the Filename option on the Runtime Prompts form, because the report will be sent to the screen even if the user gives a filename. Note: Do not set any runtime prompts for report templates intended for batch mode. Note: Text boxes filled on the Runtime Prompts form will appear as defaults on the Report Details form.

2.5
2.5.1

Saving and Deleting Templates


Saving a Template
If you want to save the report template in a file, select one of the options under File on the menu at the top of the New Report Template form: Save As allows you to save the template in a new file. A File Browser will be displayed. Save saves the template to the current file if the template has been saved already. The filename is shown in the title bar of the form.

Note: The file where the template is stored has no relation to the file specified if you want to output the report itself to a file. See File Reports for more information. You can save your template if you wish, provided you have write access to the directory, but you will not need it in future exercises.

2007 AVEVA Solutions Ltd

2:4

12.0

Reporting Reference Manual


Creating and Running a Simple Report

2.5.2

Deleting a Template
If you select Reports>Delete, you will see a File Browser from which you can select the template or report you want to delete.

2.6

Reporting on Different Parts of the Database


The following exercises are based on the supplied template pipe_mto.tmp. You may wish to look at the corresponding supplied report, pipe_mto.rep, first, using a text editor. Select Utilities>Reports>Modify, and select the template from the list. The Modify Report Template form will be displayed. Note that this is exactly the same as the New Report Template form, except that the name of the template is shown in the title bar of the form, and the setting for the template are shown on the form. Note: All the supplied templates output to files, and have runtime prompts set. For the exercises, we suggest that you send the reports to the screen, and switch off the runtime prompts by selecting Options>Runtime Prompts from the menu at the top of the Modify Report Template form. The parts of the database you want to include in the report are specified by entering the elements at the top of each part of the hierarchy in the Hierarchy text box on the New/ Modify Report Template form. The default is the World. If you just want to specify one or two elements, you can just type in the element names. The names must always be preceded by a slash and separated by a space, because you can enter several names, for example:

/100-B-1 /100-B-2
If you want to specify several elements, it is easiest to use the Hierarchy form, which also allows you to report on all the elements in a Volume, selected from the MDB, the Drawlist or the Obstruction list.

2.6.1

Adding Elements using the Members List


The Hierarchy form is displayed when you select the Hierarchy button on the Modify Report Template form. 1. Go to the PIPES Zone in the Members List. 2. Select Pipe /100-B-1 in the Members List, and select CE on the Hierarchy form. The Pipe will be shown in the scrolling list in the Hierarchy form. Do the same for /100-B-2 and /150-A-3. 3. Note that you can remove an element from the list by highlighting it in the list and pressing Remove. 4. Select OK on the Hierarchy form, and the Pipes will appear in the Hierarchy text box on the Modify Report Template form. Note: Specifying elements using this option will override anything you specify in the Volume or From option.

2.6.2

Adding Elements in a Given Volume


If you leave the Hierarchy option on the Modify Report Template form empty, you can specify a Volume in the model, and report on elements Completely within or Partially within it. Selecting Completely within or Partially within from the Volume option button on the Hierarchy form will display the Report Volume form, which is used in the same way as other PDMS forms for defining volumes.

2007 AVEVA Solutions Ltd

2:5

12.0

Reporting Reference Manual


Creating and Running a Simple Report

The volume is defined by entering the coordinates of the diagonal of a limits box, either by entering the coordinates into the text boxes, or using the menu options to pick a point with the cursor. The reporting volume can also be defined by selecting the Grid Lines option from the Intersections menu on the Report Volume form. This will display the Volume from Grid form, which is used in exactly the same way as the Clip from Grid form (described in Graphical Model Manipulation Guide). Note: Specifying a Volume will select elements from the whole MDB. The other From options cannot be used.

2.6.3

From
The From options are used to specify where the Reports Utility will look for the elements to report on: MDB should be used if you are giving specific elements in the Hierarchy. Drawlist will select all elements in the drawlist. The Hierarchy text box should be left blank. Obstruction list will select all elements in the obstruction list. The Hierarchy text box should be left blank.

2.7

More Column Layout Options


The following examples illustrate some more of the options on the Layout for Column n form. Some of the options are only used in sorting and totalling, and these are described in Sorting and Totalling. Some only apply to File reports, and these are described in File Reports. This section describes the general options which apply to all reports.

2.7.1

Layout
The number of Spaces before column. This is the number of spaces between the end of the previous column and the start of the current column. The effect will be affected by the Justification. The Column width in characters. If you do not give a value, the width of the widest entry will be used. The Justification can be set to Left, Centre or Right. The effects of the layout options are illustrated in the following examples, based on the template centre_line.tmp: The format as supplied: Centre Line Length Report for /100-B-1 PIPE /100-B-1 NAME /100-B-1-B2 PSPEC /A3B HEAD BORE 80.00 CENTRE LINE LENGTH 2455.19

2007 AVEVA Solutions Ltd

2:6

12.0

Reporting Reference Manual


Creating and Running a Simple Report

/100-B-1 /100-B-1

/100-B-1-B1 /100-B-1-B3

/A3B /A3B

50.00 50.00

39524.55 3119.80

Justification for the HBORE column set to Centre: Centre Line Length Report for /100-B-1 PIPE /100-B-1 /100-B-1 /100-B-1 NAME /100-B-1-B2 /100-B-1-B1 /100-B-1-B3 PSPEC /A3B /A3B /A3B HEAD BORE 80.00 50.00 50.00 CENTRE LINE LENGTH 2455.19 39524.55 3119.80

Space before the HBORE column set to 5, rather than 2: Centre Line Length Report for /100-B-1 PIPE /100-B-1 /100-B-1 /100-B-1 NAME /100-B-1-B2 /100-B-1-B1 /100-B-1-B3 PSPEC /A3B /A3B /A3B HEAD BORE 80.00 50.00 50.00 CENTRE LINE LENGTH 2455.19 39524.55 3119.80

Space before the HBORE column set to 2, and the column width set to 15: Centre Line Length Report for /100-B-1 PIPE /100-B-1 /100-B-1 /100-B-1 NAME /100-B-1-B2 /100-B-1-B1 /100-B-1-B3 PSPEC /A3B /A3B /A3B HEAD BORE 80.00 50.00 50.00 CENTRE LINE LENGTH 2455.19 39524.55 3119.80

2.7.2

Numeric Display
The Remainder can be set to: or Fraction in which case you must specify the Denominator. In the output, the denominator will be reduced if possible. US gives 10'-5" PDMS gives 10' 5 Decimal in which case you can specify the number of Decimal places

The Style only affects how feet and inches are displayed. For example:

Leading zeros can be on or off.

2007 AVEVA Solutions Ltd

2:7

12.0

Reporting Reference Manual


Creating and Running a Simple Report

2.7.3

Text Display
You can specify the characters used to specify Unset text. Headings For reports without sorting or totalling Headings will normally be On. For example of switching Headings off, see Sorting and Totalling. The Page option is only used for file reports. For more information, see File Reports .

Heading Text
The Heading Text can be set to: Expression Text which will use the expression entered in the Expression text box on the Creating Column form. For example, CLLE for the centre line length. Default which will use the full PDMS attribute name is possible. For example, if you enter CLLE in the Expression text box, the column heading will be CENTRE LINE LENGTH. Custom in which case you should enter the text required in the text box. You can insert several lines of text. The Centre Line Length template, which has the heading split over two lines, is an example.

Values For reports without sorting or totalling Values will normally be On. For examples of the other options see Sorting and Totalling. Subtotals and Totals Totals can only be produced for columns containing numeric data, and which do not have the Subtotal option set. For more information, see Sorting and Totalling.

2.8

Introductions and Summaries


The Page options on the menu on the New/Modify Report Template form can be used to insert Introductions and Summaries into screen or file reports. However, they normally involve using variables, which are introduced in Selective Reporting and so they are described later, in File Reports.

2007 AVEVA Solutions Ltd

2:8

12.0

Reporting Reference Manual


Sorting and Totalling

Sorting and Totalling


By default, the items reported on will be listed in the order that they are stored in the database. You can specify which attributes will be used to sort the elements in the report and the type of sorting, for example, ascending or descending numerical order. If more than one attribute is used for sorting, you can control the precedence, that is which attribute is sorted first. For this exercise, look at the template line_list.tmp by selecting Utilities>Reports>Modify on the Main Menu. Note: The sample templates are all for file reports, with runtime prompts set. If you want to try the examples, send the reports to the screen and switch the prompts off (use Options>Runtime Prompts on the New/Modify Report Template form). This template reports on the Pipe Name, Specification, Head Bore, Tail Bore, Head Ref and Tail Ref of Branches. The template sorts the Branches in ascending order of Head Bore. With the Hierarchy set to the Zone PIPES, the output will look like this:
Line List for WORLD PIPE PSPEC /50-B-9 /A3B /40-B-10 /A3B /100-B-1 /A3B /100-B-1 /A3B /50-B-9 /A3B /50-B-9 /A3B /50-B-9 /A3B /40-B-10 /A3B /80-A-11 /A1A /80-B-14 /A3B /100-B-1 /A3B /100-B-2 /A3B /80-B-7 /A3B /100-C-12 /F1C /80-B-14 /A3B /100-B-2 /A3B /150-A-3 /A1A /100-B-8 /A3B /100-B-8 /A3B /100-C-12 /F1C /100-C-13 /F1C /150-B-6 /A3B /150-A-57 /A1A /150-A-57 /A1A HBORE 15.00 40.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 80.00 80.00 80.00 80.00 80.00 100.00 100.00 100.00 100.00 100.00 100.00 150.00 150.00 150.00 TBORE 15 40 100 100 50 50 50 40 80 50 80 80 80 80 50 100 150 100 100 100 100 150 100 100 HREF /50-B-9-B1-TEE2 /40-B-10-B1-TEE1 /P1502A-N2 /P1502B-N2 /P1501A-N2 /50-B-9-B1-TEE4 /P1501B-N2 /50-B-9-B1-TEE3 /80-B-14-B1 /80-B-14-B1-TEE1 /100-B-1-B1-TEE2 /100-B-2-B1-TEE1 /E1302A-S2 /100-C-12-B1-TEE1 /D1201-N2 =0/0 /100-B-2-B1 /D1201-N4 /100-B-8-B1-TEE1 =0/0 /1301/NS1 /1101/N5 =0/0 /150-A-57-B1-TEE1 TREF =0/0 /40-B-10-B1-TEE2 =0/0 /100-B-1-B1-TEE1 /1101/N4 /50-B-9-B1-TEE5 /50-B-9-B1-TEE1 =0/0 =0/0 /80-A-11-B1-TEE1 /100-B-1-B1-TEE3 =71/608 /D1201-N1 /100-C-12-B1-TEE2 /80-A-11-B1 /150-A-3-B1 =0/0 /P1501B-N1 /P1501A-N1 /1301/NS2 =0/0 /E1302B-S1 /P1502A-N1 /P1502B-N1

2007 AVEVA Solutions Ltd

3:1

12.0

Reporting Reference Manual


Sorting and Totalling

/200-B-4 /A3B 200.00 200 /250-B-5 /A3B 200.00 250 /250-B-5 /A3B 200.00 250 Summary: 27 Lines in Schedule

/1101/N3 /1301/N2 /1301/N4

/1301/N1 /1101/N2 =72/615

3.1

Changing the Order of Sorting


Change the order of sorting to descending order of Head Bore. Select HBORE in the list on the Modify Report Template form, and select the (Columns) Modify option button. On the Modify Columns form, set the Sorting option button to 9-0. When you run the report, the output will be as follows:
Line List for /PIPES PIPE PSPEC HBORE TBORE /200-B-4 /A3B 200.00 200 /250-B-5 /A3B 200.00 250 /250-B-5 /A3B 200.00 250 /150-B-6 /A3B 150.00 150 /150-A-57 /A1A 150.00 100 /150-A-57 /A1A 150.00 100 /100-B-2 /A3B 100.00 100 /150-A-3 /A1A 100.00 150 /100-B-8 /A3B 100.00 100 /100-B-8 /A3B 100.00 100 /100-C-12 /F1C 100.00 100 /100-C-13 /F1C 100.00 100 /100-B-1 /A3B 80.00 80 /100-B-2 /A3B 80.00 80 /80-B-7 /A3B 80.00 80 /100-C-12 /F1C 80.00 80 /80-B-14 /A3B 80.00 50 /100-B-1 /A3B 50.00 100 /100-B-1 /A3B 50.00 100 /50-B-9 /A3B 50.00 50 /50-B-9 /A3B 50.00 50 /50-B-9 /A3B 50.00 50 /40-B-10 /A3B 50.00 40 /80-A-11 /A1A 50.00 80 /80-B-14 /A3B 50.00 50 /40-B-10 /A3B 40.00 40 /50-B-9 /A3B 15.00 15 Summary: 27 Lines in Schedule HREF /C1101-N3 /E1301-S2 /E1301-S3 /C1101-N6 =0/0 /150-A-57-B1-TEE1 /C1101-N1 /100-B-2-B1 /D1201-N4 /100-B-8-B1-TEE1 =0/0 /E1301-T2 /100-B-1-B1-TEE2 /100-B-2-B1-TEE1 /E1302A-S2 /100-C-12-B1-TEE1 /D1201-N2 /P1502A-N2 /P1502B-N2 /P1501A-N2 /50-B-9-B1-TEE4 /P1501B-N2 /50-B-9-B1-TEE3 /80-B-14-B1 /80-B-14-B1-TEE1 /40-B-10-B1-TEE1 /50-B-9-B1-TEE2 TREF /E1301-S1 /C1101-N2 =140/612 /E1302B-S1 /P1502A-N1 /P1502B-N1 /150-A-3-B1 =0/0 /P1501B-N1 /P1501A-N1 /E1301-T1 =0/0 /100-B-1-B1-TEE3 =139/603 /D1201-N1 /100-C-12-B1-TEE2 /80-A-11-B1 /C1101-N4 /100-B-1-B1-TEE1 /C1101-N5 /50-B-9-B1-TEE5 /50-B-9-B1-TEE1 =0/0 =0/0 /80-A-11-B1-TEE1 /40-B-10-B1-TEE2 =0/0

3.2

Sorting on More than one Attribute


Remember to use the Next column and Previous column option buttons on the Modify Columns form, to move between columns. Keeping Sorting as 0-9 for HBORE, switch Sorting to 0-9 for TBORE. Note that the Precedence button is now set to 2, and that the precedence is also shown by Sort 1 and Sort 2 against the columns on the Modify Report Template form. Go back to the HBORE column, and note that the Precedence is shown as 1. This means that the Branches will be sorted first in order of Head Bore, and second in order of Tail Bore.

2007 AVEVA Solutions Ltd

3:2

12.0

Reporting Reference Manual


Sorting and Totalling

If you run the report now, the output will look like this; note the different order for Branches with HBORE 50:
Line List for /PIPES PIPE PSPEC HBORE TBORE /200-B-4 /A3B 200.00 200 /250-B-5 /A3B 200.00 250 /250-B-5 /A3B 200.00 250 /150-A-57 /A1A 150.00 100 /150-A-57 /A1A 150.00 100 /150-B-6 /A3B 150.00 150 /100-B-2 /A3B 100.00 100 /100-B-8 /A3B 100.00 100 /100-B-8 /A3B 100.00 100 /100-C-12 /F1C 100.00 100 /100-C-13 /F1C 100.00 100 /150-A-3 /A1A 100.00 150 /80-B-14 /A3B 80.00 50 /100-B-1 /A3B 80.00 80 /100-B-2 /A3B 80.00 80 /80-B-7 /A3B 80.00 80 /100-C-12 /F1C 80.00 80 /40-B-10 /A3B 50.00 40 /50-B-9 /A3B 50.00 50 /50-B-9 /A3B 50.00 50 /50-B-9 /A3B 50.00 50 /80-B-14 /A3B 50.00 50 /80-A-11 /A1A 50.00 80 /100-B-1 /A3B 50.00 100 /100-B-1 /A3B 50.00 100 /40-B-10 /A3B 40.00 40 /50-B-9 /A3B 15.00 15 Summary: 27 Lines in Schedule HREF /C1101-N3 /E1301-S2 /E1301-S3 =0/0 /150-A-57-B1-TEE1 /C1101-N6 /C1101-N1 /D1201-N4 /100-B-8-B1-TEE1 =0/0 /E1301-T2 /100-B-2-B1 /D1201-N2 /100-B-1-B1-TEE2 /100-B-2-B1-TEE1 /E1302A-S2 /100-C-12-B1-TEE1 /50-B-9-B1-TEE3 /P1501A-N2 /50-B-9-B1-TEE4 /P1501B-N2 /80-B-14-B1-TEE1 /80-B-14-B1 /P1502A-N2 /P1502B-N2 /40-B-10-B1-TEE1 /50-B-9-B1-TEE2 TREF /E1301-S1 /C1101-N2 =140/612 /P1502A-N1 /P1502B-N1 /E1302B-S1 /150-A-3-B1 /P1501B-N1 /P1501A-N1 /E1301-T1 =0/0 =0/0 /80-A-11-B1 /100-B-1-B1-TEE3 =139/603 /D1201-N1 /100-C-12-B1-TEE2 =0/0 /C1101-N5 /50-B-9-B1-TEE5 /50-B-9-B1-TEE1 /80-A-11-B1-TEE1 =0/0 /C1101-N4 /100-B-1-B1-TEE1 /40-B-10-B1-TEE2 =0/0

Change the Precedence of the TBORE column to 1, which will automatically change the precedence of the HBORE column to 2. Now the output will look like this:
Line List for /PIPES PIPE PSPEC HBORE /50-B-9 /A3B 15.00 /40-B-10 /A3B 50.00 /40-B-10 /A3B 40.00 /80-B-14 /A3B 80.00 /50-B-9 /A3B 50.00 /50-B-9 /A3B 50.00 /50-B-9 /A3B 50.00 /80-B-14 /A3B 50.00 /100-B-1 /A3B 80.00 /100-B-2 /A3B 80.00 /80-B-7 /A3B 80.00 /100-C-12 /F1C 80.00 /80-A-11 /A1A 50.00 /150-A-57 /A1A 150.00 /150-A-57 /A1A 150.00 TBORE 15 40 40 50 50 50 50 50 80 80 80 80 80 100 100 HREF /50-B-9-B1-TEE2 /50-B-9-B1-TEE3 /40-B-10-B1-TEE1 /D1201-N2 /P1501A-N2 /50-B-9-B1-TEE4 /P1501B-N2 /80-B-14-B1-TEE1 /100-B-1-B1-TEE2 /100-B-2-B1-TEE1 /E1302A-S2 /100-C-12-B1-TEE1 /80-B-14-B1 =0/0 /150-A-57-B1-TEE1 TREF =0/0 =0/0 /40-B-10-B1-TEE2 /80-A-11-B1 /C1101-N5 /50-B-9-B1-TEE5 /50-B-9-B1-TEE1 /80-A-11-B1-TEE1 /100-B-1-B1-TEE3 =139/603 /D1201-N1 /100-C-12-B1-TEE2 =0/0 /P1502A-N1 /P1502B-N1

2007 AVEVA Solutions Ltd

3:3

12.0

Reporting Reference Manual


Sorting and Totalling

/100-B-2 /A3B 100.00 /100-B-8 /A3B 100.00 /100-B-8 /A3B 100.00 /100-C-12 /F1C 100.00 /100-C-13 /F1C 100.00 /100-B-1 /A3B 50.00 /100-B-1 /A3B 50.00 /150-B-6 /A3B 150.00 /150-A-3 /A1A 100.00 /200-B-4 /A3B 200.00 /250-B-5 /A3B 200.00 /250-B-5 /A3B 200.00 Summary: 27 Lines in Schedule

100 100 100 100 100 100 100 150 150 200 250 250

/C1101-N1 /D1201-N4 /100-B-8-B1-TEE1 =0/0 /E1301-T2 /P1502A-N2 /P1502B-N2 /C1101-N6 /100-B-2-B1 /C1101-N3 /E1301-S2 /E1301-S3

/150-A-3-B1 /P1501B-N1 /P1501A-N1 /E1301-T1 =0/0 /C1101-N4 /100-B-1-B1-TEE1 /E1302B-S1 =0/0 /E1301-S1 /C1101-N2 =140/612

3.3

Totalling
To see the effect of totalling, use the template centre_line.tmp and set the hierarchy to 100B-1 and 100-B-2. The template as supplied will report on the Branches, giving the Pipe name and the Pipe Specification, sorted on descending order of Head Bore, and the Centre Line Length, as follows:

Centre Line Length Report for /100-B-1 /100-B-2 PIPE NAME PSPEC HEAD BORE CENTRE LINE LENGTH /100-B-2 /100-B-2-B1 /A3B 100.00 7610.35 /100-B-1 /100-B-1-B2 /A3B 80.00 2455.19 /100-B-2 /100-B-2-B2 /A3B 80.00 2526.65 /100-B-1 /100-B-1-B1 /A3B 50.00 39524.56 /100-B-1 /100-B-1-B3 /A3B 50.00 3119.80
Now switch on the Totalling option button on the Layout for Column form for the Centre Line Length column, and the report will appear like this:

Centre Line Length Report for /100-B-1 /100-B-2 PIPE NAME PSPEC HEAD BORE CENTRE LINE LENGTH /100-B-2 /100-B-2-B1 /A3B 100.00 7610.35 /100-B-1 /100-B-1-B2 /A3B 80.00 2455.19 /100-B-2 /100-B-2-B2 /A3B 80.00 2526.65 /100-B-1 /100-B-1-B1 /A3B 50.00 39524.56 /100-B-1 /100-B-1-B3 /A3B 50.00 3119.80 =========== 55236.56

3.4

Subtotalling
The Subtotals option on the Layout for Column form can be Off or set to the number of a sorted column. Subtotals can only be produced for columns containing numeric data.

2007 AVEVA Solutions Ltd

3:4

12.0

Reporting Reference Manual


Sorting and Totalling

Set Subtotalling on for the Centre Line Length column, and the report will look like this:
Centre Line Length Report for /100-B-1 /100-B-2 CENTRE LINE LENGTH /100-B-2 /100-B-2-B1 /A3B 100.00 7860.35 ----------7860.35 /100-B-1 /100-B-1-B2 /A3B 80.00 2455.19 /100-B-2 /100-B-2-B2 /A3B 80.00 2526.65 ----------4981.84 /100-B-1 /100-B-1-B1 /A3B 50.00 39524.55 /100-B-1 /100-B-1-B3 /A3B 50.00 3119.80 ----------42644.36 Subtotalling with Totalling will produce the following report: PIPE NAME PSPEC HEAD BORE CENTRE LINE LENGTH /100-B-2 /100-B-2-B1 /A3B 100.00 7610.35 ----------7610.35 /100-B-1 /100-B-1-B2 /A3B 80.00 2455.19 /100-B-2 /100-B-2-B2 /A3B 80.00 2526.65 ----------4981.84 /100-B-1 /100-B-1-B1 /A3B 50.00 39524.56 /100-B-1 /100-B-1-B3 /A3B 50.00 3119.80 ----------42644.36 =========== 55236.56 PIPE NAME PSPEC HEAD BORE

Subtotalling is closely related to the Values option on the Layout for Column form. The options are: On The result of the expression (entered in the Expression text box on the Creating Column form) will be shown for every line in the report. This is the normal setting for reports without sorting or totalling. Off No values will be shown. 1st If this column is sorted, this option can be used to display only the first occurrence of a particular expression result. Sub A value will only be output in this column when a subtotal appears in one of the other columns.

3.4.1

Showing only the First Occurrence of Values


For a sorted column, you can output only the first occurrence of a value. For example, set the Values to 1st for the HBORE column:

Centre Line Length Report for /100-B-1 /100-B-2

2007 AVEVA Solutions Ltd

3:5

12.0

Reporting Reference Manual


Sorting and Totalling

PIPE

NAME /100-B-2-B1

PSPEC /A3B

HEAD BORE

/100-B-2

/100-B-1 /100-B-2

/100-B-1-B2 /100-B-2-B2

/A3B /A3B

/100-B-1 /100-B-1

/100-B-1-B1 /100-B-1-B3

/A3B /A3B

CENTRE LINE LENGTH 100.00 7610.35 ----------7610.35 80.00 2455.19 2526.65 ----------4981.84 50.00 39524.56 3119.80 ----------42644.36 =========== 55236.56

You can display each value for a sorted column next to the corresponding subtotal value. Set the Values option for HBORE (which must be sorted) to Sub. Set the Centre Line Length Subtotals to 4, that is, show subtotals for each value in column 4 (HBORE).

Centre Line Length Report for /100-B-1 /100-B-2 PIPE NAME PSPEC HEAD BORE CENTRE LINE LENGTH /100-B-2 /100-B-2-B1 /A3B 7610.35 ----------100.00 7610.35 /100-B-1 /100-B-1-B2 /A3B 2455.19 /100-B-2 /100-B-2-B2 /A3B 2526.65 ----------80.00 4981.84 /100-B-1 /100-B-1-B1 /A3B 39524.56 /100-B-1 /100-B-1-B3 /A3B 3119.80 ----------50.00 42644.36 =========== 55236.56

3.5

Quantity
The template pipe_mto.tmp outputs a report which shows the quantity of each type of item with a given Detail Text. Hence the important relationship is between Column 2, Detail Text, and Column 5, Quantity. Values are set to Sub for all the columns except Detail Text, where the 1st occurrence of each value is given. Subtotals is set to 2 for the Quantity column, which means that items with the same Detail Text are totalled.

2007 AVEVA Solutions Ltd

3:6

12.0

Reporting Reference Manual


Sorting and Totalling

The elements are first sorted alphabetically on type. The Material Text, and in the case of TUBI elements, the length, is also given. The columns are set up as follows: TYPE Sort Aa to zZ, Precedence 1. Values set to Sub, Subtotals Off and Total Off. DTXR Sort Aa to zZ, Precedence 2. Values set to 1st, Subtotals Off and Total Off. MTXX No sorting. Values set to Sub, Subtotals Off and Total Off. ITLE No sorting. Values set to Sub, Subtotals set to 2 and Total Off. QUANTITY No sorting. Values set to Sub, Subtotals set to 2 and Total Off.
Pipework MTO for /100-B-1 /100-B-2 /150-A-3 Type Detail Text ATTA unset ELBO ELBOW LR ANSI B16.9 BW FLAN ANSI.B16.36.WN.ORIFACE.FLANGE.#300.RF FLAN FLANGE WN ANSI B16.5 #150.RF FLAN FLANGE WN ANSI B16.5 #300.RF GASK GASKET RF 1.5MM ANSI B16.5 #150 GASK GASKET RF 1.5MM ANSI B16.5 #300 INST ORIFICE PLATE 3MM THK #300 REDU NIPPLE CONC SWAGED BLE/PSE REDU REDU CONC ANSI B16.9 BW REDU REDU ECC ANSI B16.9 BW TEE TEE ANSI B16.9 BW TUBI PIPE SCH40 ANSI B36.10 VALV CTRL VALVE FISHER TYPE 657-ED #300.RF VALV MISSION K WAFER CHECK VALVE #300 RF VALV VALVE GATE ANSI B16.10 #150.RF VALV VALVE GATE ANSI B16.10 #300.RF VALV VALVE GLOBE ANSI B16.10 #300.RF

Material Text unset ASTM A234-WPB ASTM A105 ASTM A105 ASTM A105 SS & ASB SS & ASB unset ASTM A234-WPB ASTM A234-WPB ASTM A234-WPB ASTM A234-WPB API 5L-B ASTM A216-WCB ASTM A216-WCB ASTM A216-WCB ASTM A216-WCB ASTM A216-WCB

Tube

Quantity 5 17 2 2 22 2 26 1 2 3 2 5 51 2 2 1 5 2

13410.56

2007 AVEVA Solutions Ltd

3:7

12.0

Reporting Reference Manual


Sorting and Totalling

2007 AVEVA Solutions Ltd

3:8

12.0

Reporting Reference Manual


Selective Reporting

Selective Reporting
The With option on the New/Modify Report Template form allows you to restrict the report to elements of the given type whose properties satisfy given conditions. The restriction is defined by an Expression, which is entered in the text box, full information about using expressions is given in the PDMS Database Reference Manual. The expressions used in selective reporting will be a combination of PDMS attributes or pseudo-attributes, logical operators and values. For example, if you are reporting on Elbows (that is, you have entered ELBO in the Type text box), you can restrict the report to Elbows with ABORE greater than 50 by entering the expression:

ABORE GT 50
where ABORE is the PDMS attribute, GT is an operator meaning greater than, and 50 is the value. The operators you can use are: EQ NE GT GE LE LT equal to not equal to greater than greater than or equal to less than less than or equal to

You can specify more than one condition using the operators AND, OR and NOT. For example, to report on Elbows with ABORE greater than 50 but less than 100 enter:

(ABORE GT 50) AND (ABORE LT 100)

2007 AVEVA Solutions Ltd

4:1

12.0

Reporting Reference Manual


Selective Reporting

2007 AVEVA Solutions Ltd

4:2

12.0

Reporting Reference Manual


File Reports

File Reports
This chapter describes how to set up templates for reports that will be output to a file. The content of the reports is defined in the same way as for screen reports, and the layout of the columns is also controlled in the same way, but there are additional options which control headers, footers and headings and other information which can be added to file reports. Set Destination to File, and give a filename in the text box. The file will be stored in the directory PDMSUSER/REPORTS. You should also specify what will happen if the file exists. The options are Append If the file exists, output will be appended to it. New If the file exists, you will be prompted to confirm that you want to overwrite the file. Overwrite If the file exists, it will be overwritten with no warning.

5.1

Page Information Options


The options under Page Information on the menu at the top of the New/Modify Report Template form allow you to add information which is not specified in the body of the report. The options are: Set a Header Set a Footer Insert an Introduction into the Report Insert a Summary into the Report Set the Page Length

Each option displays a form with a text pane. You type the information you want in the text pane. Each line of information is entered as an expression, full information about using expressions is given in the Database Management Reference Manual.

2007 AVEVA Solutions Ltd

5:1

12.0

Reporting Reference Manual


File Reports

5.2

Report Variables
There are several special variables used to insert information such as date and page numbers in a report. The variables are designed to be used outside the body of the report, that is, in the Introduction, Summary, Header or Footer. !pageno !filename !seltype !selhierarchy !selvolspec !selvolume !selfrom !criteria !selsize !selno Inserts page numbers. Inserts the filename to which the report will be sent. Inserts the contents of the Type text box. Inserts the contents of the Hierarchy text box. Inserts Off, Completely within or Partially within, as specified on the Hierarchy form. Inserts the coordinates defining the volume, as specified on the Hierarchy form. Inserts MDB, Drawlist or Obstruction List, as specified on the Hierarchy form. Inserts the complete selection criteria on which the report is based. Inserts the number of elements that match the criteria. Inserts the sequence number of an element in a selection. This variable should be used with the Sort option on the Creating Column form set to Fix for the column. Inserts today's date. Inserts the time.

!date !time

These variables must be used together with the operators which control late evaluation of variables. See Section , .

5.2.1

Late Evaluation of Variables


Variables stored in file report templates must be used with one of the late evaluation operators described below. Without these operators, the variables would be evaluated as soon as the form containing them is actioned using the OK or Apply button, instead of being stored as variables in the template and evaluated when the template is run. The three operators are: VTEXT, used for the late evaluation of variables when a text result is required. VLOGICAL, used for late evaluation when a logical result is required. VVALUE, used for late evaluation when a numeric result is required.

Examples of using the report variables with the late evaluation operators are given in the following sections.

5.2.2

Points to Note
A summary of the information you are most likely to need in setting up the page information is given below.

2007 AVEVA Solutions Ltd

5:2

12.0

Reporting Reference Manual


File Reports

Text must be entered in quotes. For example:

'Page number'
You can include any PML variables in the expressions. Variables must be preceded by one of the functions vtext, vval or vlog, which ensure late evaluation of the variables. For more information see Section , . For example, to show the page number on every page of the report, enter the following expression in the header or footer:

vtext( !pageno )
If you want to combine text and variables in the same expression (that is, on the same line, you must combine them using the text operator +. For example, if you want to number the pages with the format Page 1, Page 2 and so on, you should enter the following expression in the header or footer:

'Page ' + vtext ( !pageno )

5.3

Headers, Footers and Page Lengths


Information in Headers and Footers will appear at the top or bottom of every pages of a file report. Headers and footers are not available for screen reports. Note: You must have a page length of between 5 and 500 lines set before headers and footers will be displayed in file reports. The Page Length form, Page Header form and Page Footer form are displayed by selecting the options under Page Info from the menu on the New Report Template form.

5.4

Introduction and Summaries


Both file reports and screen reports can have an Introduction and Summary. You can insert whatever text and variables you want.

5.5

Examples
The following examples are mainly taken from the templates supplied with the product. To insert a page number containing the text Page number, followed by the page number, use the !pageno variable:

'Page No. ' + vtext (!pageno)


To insert the users name in the form of the text User Name: followed by the name, use the PDMS global variable !!user:

'User name: ' + vtext(!!user)


To insert the date and time, use the report variables !date and !time:

'Date: ' + vtext(!date) + ' ' + vtext(!time)


To insert a blank line, use:

''
To insert the hierarchy reported on, use:

2007 AVEVA Solutions Ltd

5:3

12.0

Reporting Reference Manual


File Reports

'Nozzle Schedule for ' + vtext(!selhierarchy)


To insert the number of elements reported on, use, for example:

'Summary: ' + vtext(!selsize) + ' Nozzles in Schedul e'

2007 AVEVA Solutions Ltd

5:4

12.0

Reporting Reference Manual


Additional Information

6
6.1

Additional Information
Running Reports in Batch Mode
Report templates are PDMS macros, which can be run in batch mode by giving the command $M/template-name. For more information about batch mode, see the PDMS MONITOR Reference Manual. Note: Report templates for batch mode must not have any runtime prompts set.

6.2

System Command Option


The System Command text box on the New/Modify Report Template form allows you to give a system command that will be run when the report has been completed. For example, you could use this option to send the report output to a printer, or to run a macro to process the report. The command is entered as an expression full information about expressions, is given in the Database Management Reference Manual.

6.3

Report Output Formats


The Report Format form will be displayed when you select Options > Other Formats on the menu on the New/Modify Report Template form. It allows you to output a report in CSV (Comma Separated Variable) format, which can be read into a spreadsheet. You can specify the field separator and text delimiter. Values in the report are recognised as text if the Units option on the Creating Column form is set to Off.

2007 AVEVA Solutions Ltd

6:1

12.0

Reporting Reference Manual


Additional Information

2007 AVEVA Solutions Ltd

6:2

12.0

Reporting Reference Manual

Index

A
Adding and moving columns . . . . . . . . . . 2:3 Adding elements . . . . . . . . . . . . . . . . . . . 2:5

Formats:output . . . . . . . . . . . . . . . . . . . . 6:1 Fraction . . . . . . . . . . . . . . . . . . . . . . . . . 2:7

H
Headers . . . . . . . . . . . . . . . . . . . . . . 5:1, Headings . . . . . . . . . . . . . . . . . . . . . . . . Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . Hierarchy:adding elements . . . . . . . . . . 5:3 2:8 2:5 2:5

B
Batch mode . . . . . . . . . . . . . . . . . . . . . . . 6:1

C
Column Layout . . . . . . . . . . . . . . . . . . . . 2:2 Column width . . . . . . . . . . . . . . . . . . . . . 2:6 Columns . . . . . . . . . . . . . . . . . . . . . . . . . 2:1 Columns:adding . . . . . . . . . . . . . . . . . . . 2:3 Columns:moving . . . . . . . . . . . . . . . . . . . 2:3 Creating a report template . . . . . . . . . . . 2:1 CSV format . . . . . . . . . . . . . . . . . . . . . . . 6:1

I
Imperial units style . . . . . . . . . . . . . . . . . 2:7 Introductions . . . . . . . . . . . . . . . . . . . . . . 2:8 Introductions in reports . . . . . . . . . . . 5:1, 5:3

J
Justification . . . . . . . . . . . . . . . . . . . . . . 2:6

D
Decimal . . . . . . . . . . . . . . . . . . . . . . . . . . 2:7 Deleting a template . . . . . . . . . . . . . . . . . 2:5 Destination . . . . . . . . . . . . . . . . . . . . . . . 5:1 Drawlist:adding elements from . . . . . . . . 2:6

L
Leading zeros . . . . . . . . . . . . . . . . . . . . . 2:7

N
New Report Template form . . . . . . . . . . 2:1 Numeric Display . . . . . . . . . . . . . . . . . . . 2:7

E
Expressions . . . . . . . . . . . . . . . . . . . . . . 4:1

F
File reports . . . . . . . . . . . . . . . . . . . 2:1, 5:1 First occurrence:of values . . . . . . . . . . . . 3:5 Footers . . . . . . . . . . . . . . . . . . . . . . 5:1, 5:3

O
Obstruction list:adding elements from . . 2:6 Output formats . . . . . . . . . . . . . . . . . . . . 6:1

2007 AVEVA Solutions Ltd

Index page 1

12.0

Reporting Reference Manual

P
Page information . . . . . . . . . . . . . . . . . . . 5:1 Page length . . . . . . . . . . . . . . . . . . . . . . . 5:1 page length . . . . . . . . . . . . . . . . . . . . . . . 5:3 Precedence . . . . . . . . . . . . . . . . . . . . . . . 3:2

W
With option . . . . . . . . . . . . . . . . . . . . . . . 4:1

Q
Quantity . . . . . . . . . . . . . . . . . . . . . . . . . . 3:6

R
Remainder . . . . . . . . . . . . . . . . . . . . . . . 2:7 Report Details form . . . . . . . . . . . . . . . . . 1:3 Report variables . . . . . . . . . . . . . . . . . . . 5:2 Reports directory . . . . . . . . . . . . . . . . . . . 1:1 Running a report . . . . . . . . . . . . . . . . . . . 1:3 Runtime Prompts . . . . . . . . . . . . . . . . . . 3:1 Runtime prompts . . . . . . . . . . . . . . . . . . . 2:4

S
Sample report templates . . . . . . . . . . . . . 1:1 Saving a template . . . . . . . . . . . . . . . . . . 2:4 Screen reports . . . . . . . . . . . . . . . . . . . . 2:1 Selective reporting . . . . . . . . . . . . . . . . . 4:1 Sorting . . . . . . . . . . . . . . . . . . . . 2:6, 2:8, 3:1 Spaces before column . . . . . . . . . . . . . . 2:6 Style (Imperial units) . . . . . . . . . . . . . . . . 2:7 Subtotalling . . . . . . . . . . . . . . . . . . . . . . . 3:4 Subtotals . . . . . . . . . . . . . . . . . . . . . . . . . 2:8 Summaries . . . . . . . . . . . . . . . . . . . . . . . 2:8 Summaries in reports . . . . . . . . . . . 5:1, 5:3 System Command . . . . . . . . . . . . . . . . . 6:1

T
Templates:deleting . . . . . . . . . . . . . . . . . 2:5 Templates:saving . . . . . . . . . . . . . . . . . . 2:4 Text Display . . . . . . . . . . . . . . . . . . . . . . 2:8 Totalling . . . . . . . . . . . . . . . . . . . . . 3:1, 3:4 Totals . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:8

U
Unset text . . . . . . . . . . . . . . . . . . . . . . . . 2:8

V
Values . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:8 Values:in subtotalling . . . . . . . . . . . . . . . 3:5 Variables:late evaluation . . . . . . . . . . . . . 5:2 Volumes:adding elements from . . . . . . . 2:5

2007 AVEVA Solutions Ltd

Index page 2

12.0

You might also like