Bring Structure Into Your Data With Autocad Plant Report Creator

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

PT16479

Bring Structure into Your Data with AutoCAD Plant


Report Creator
Carsten Beinecke
CAD STUDIO ABCOM GMBH

Learning Objectives
· Define the query of your report
· Use the wizard of DevExpress
· Understand the user interface of Report Designer
· Structuring with Grouping, Sorting, Filtering your report

Description
AutoCAD P&ID and AutoCAD Plant 3D create a whole lot of data while you are drawing. We
show how you start with a simple report and then start grouping and ordering it in the way you
need. We show you how to define the classes you want to use for your report and what how you
layout your report. We explain the user interface of Report Designer of DevExpress so you
know how to work with the different palettes.

Your AU Expert(s)
Carsten Beinecke has worked in the plant industry for 28 years, starting as a drafter and
becoming a supporter and developer for plant software. As the author of books and training
manuals for AutoCAD P&ID and AutoCAD Plant 3D, Carsten has helped numerous customers
set up and customize these software systems. He has a very deep understanding of the
database structure of AutoCAD P&ID and AutoCAD Plant 3D. He supports customers around
the world. Carsten is the Product Manager of PlantTools. He started with the development in
2008. PlantTools are apps for AutoCAD P&ID and AutoCAD Plant 3D.

Page 1
Think First

Before you start creating a new report configuration you should think about the following topics:

§ Sample Documents
Check if you already have some Excel, PDF or other files you can use to see what you try to
accomplish. Or you have a list your customer expect you to deliver.

§ Existing Report
Is there an existing report configuration for Report Creator you can use to get started? Maybe
use an existing equipment list for P&IDs and adapt it to your needs.

§ Classes & Properties


What are the classes of your project you want to use in your report? Is it just one or do you need
to combine multiple classes? Check which classes contain what properties in your Project
Setup. This is important if you select multiple classes and you need to have properties of
different classes in one column.

§ Structure (Group, Sort, Filter)


Now you can think how you structure your report. Do you have a list where each object from
your drawing is listed individually (for example in an equipment list) or do you group rows
together like in a Bill of Material from your 3D piping.

How do you want to sort the rows in your report? Do you need to filter to leave something out of
your report?

§ Calculation & Scripting


Is there a need to “calculate”? This starts already when you need to concat values. You can
look at calculation like creating calculations in Excel.

Scripting is not part of this class. This may be needed if everything else doesn’t give you what
you want. For example, you can group the PipeLineSegments of a PipeLineGroup for a line list.
But then you want to have the different sizes of the PipeLineSegments shown in ascending
order (i.e. ½”, ¾”, 1 ½”, 2”).

§ Layout
How does you report looks like in general? Do you have a header which is used just on the first
page or on each page? What about a logo from you and/or your customer? What project data
from your project setup do you want to see in your header?

§ Output Type & Format (PDF, XLS)


What file format do you want to create? Where do you want your reports to be created? When
creating Excel files you need to pay close attention to the layout, because you may get a lot of
small rows and columns in Excel from overlapping labels in your layout or when you have gaps
between the labels.

Page 2
User Interface

When creating a new report configuration, you can simply


start from top to bottom.

First type in a name. Then you define the query. Next the
Layout.

Finally, you define the Output Type. Do you need one report
per project. For example, when creating an equipment list. Or
do you want the report for each drawing. For example, if you
want an instrumentation list for each P&ID drawing. Or one
report per object. This is used mostly for creating data
sheets.

Defining Query

With the query, you define where the


data for your report comes from. First
you select P&ID or Plant 3D. Next
you select the class or classes you
need for your report.

You can also sort and filter in the


query, but this can be done more
conveniently in the layout itself.

The Test button gives you a preview


of all available columns of your
classes. This way, you can preview if
you have everything you need.

Page 3
Wizard

When you start a brand-new report configuration and you click on the “Edit report layout…”
button, the wizard of DevExpress automatically opens. If you do not need it, you can click on
cancel and create the layout from scratch.

The wizard has 5 pages.

Page 1

Select the properties you need preferably in the order


you need them. If you know that you need additional
columns for calculations, then just use any property as
a filler so you already have an additional column you
later can modify.

Page 2

Her you can start grouping your rows. I usually don’t do


it in the wizard, because the result of the layout may
not be what you expect. So I click on “Next >” and skip
over it.

Page 3

Here you most often choose “Tabular” (except when


creating data sheets, then it’s “Columnar”).

And, the orientation must be selected. Mostly


“Landscape”.

Page 4
Page 4

Here you can choose a predefined style. Not that


important, since you will later probably change
everything anyway.

Page 5

Finally, the header of the report.

Page 5
User Interface DevExpress

When the wizard is done, you see the layout of the “Report Designer” which is from the
company DevExpress.

At the top, you see a ribbon mostly used for formatting.

On the left, you see the available tools for your layout. The tools you will most likely use are
“Label” (for text and fields), “Picture Box” (for Logos), “Table”, “Line”.

On the right top, you can switch between the “Report Explorer” which shows the structure of the
layout and the Field list, which are your properties.

The lower right shows the properties of whatever you select.

Below you see groups and their sort order.

Page 6
Structuring

To structure your report the way you want it, you have several options or tools available.

Grouping

Grouping means, that you want to find similar


rows and add them up or sum them up. For
example, in a Bill of Material you want to add
the length of all pipes with the same
PartSizeLongDesc (The long description
identifying a specific type of pipe for a specific
size).

You can group by using just one property or multiple.

Calculation

With calculations, you can essentially do what you


also do in Excel. You can concatenate properties,
add IF statements and do complex mathematical
calculations.

You can use all properties of your classes.

Filtering

As mentioned before, you can filter also in the query,


but it is more convenient and much more flexible, if
you use the FilterString Editor.

The FilterExpression Editor can be opened by clicking


on the little arrow at the top left corner of your layout
and then by clicking on the “…” button in the dialog.

Page 7
Scripting

Scrips can be written in C#, Visual Basic, Jscript .NET.

Scripts can be used when calculations aren’t enough anymore. One example is,
when you see the different sizes of the line segments used for one line group in
descending order.

The following picture shows an example from another case.

Scripting is not part of this class.

Page 8
Demo

Writing in detail about the examples shown during class, would be endless. Therefor you can
watch a 50 min video with all the detailed info.

Example 1 – Equipment List

This shows a simple equipment list ordered by Tag.

Example 2 – Pumps and Blowers List

This example uses the Blowers and Pumps class, orders by Tag and has a calculated field to
show the flow capacity.

Page 9
Example 3 – Valves List by Line# and Description + Size + Spec

This is a valve list where the valves are grouped by line number and as a second level of
grouping, they are grouped by Description, Size and Spec to get the number of valves.

Example 4 – BOM from 3D Piping

This is a report with data coming from 3D piping. It is also grouped by line number and then by
PipeSizeLongDescription.

The video shows each example in a step by step instruction. It shows more than shown during
the class.

Video Link: http://autode.sk/2eAuVCc

Page 10

You might also like