MicroStation CONNECT Edition Help

Report Definitions

A Report Definition is a way to extract and present data from a DGN file in tabular format. The result of evaluating a report definition is a Report, which is a list of data rows. For example, if you want to know how many pipes with a diameter greater than or equal to 5 exist in a model, you can create a report based on the Pipe item type, filtered by Diameter >= 5. When you evaluate the report definition, you get a report in which each row represents a pipe. Reports can also join related sets of properties into a single row. For example, design file properties and WorkSet properties, or item properties and properties of an element to which the item is attached can be listed together in a report. You can also define sorting and formatting options to customize the appearance of the report.

Reports can be placed as a table as well as exported to Excel workbook or .csv files.

To generate a report from item types, you need to create a report definition in the Reports dialog.

In case of sheet index, when you place an index sheet as a table, a report definition of the index sheet is automatically created in the Reports dialog.

When you perform Advanced search or Criteria search in Explorer, you can save the search result as a report definition.

Upgrading Tag Report Templates to Report Definitions

You can upgrade the old tag report templates as report definitions. Once upgraded, the columns in the tag report template are converted to columns in the report definition. The tag sets in the tag report template are upgraded as item types. You can also associate a related object to the Tag Set in the form of Element and its various properties and definitions. These elements along with their selected properties and definitions are displayed in the reports column.

Working with Related Object

You can upgrade the old tag report templates as report definitions. Once upgraded, the columns in the tag report template are converted to columns in the report definition. The tag sets in the tag report template are upgraded as item types. You can also associate a object to the Tag Set in the form of Element and its various properties and definitions. These elements along with their selected properties and definitions are displayed in the reports column.

For Eg. If you are working with tags associated to an element and wish to extract properties of the host elements such as ID or Description, you can use theTag is attached to Elementrelationship. You must include Tag Instance as the primary object and element as the related object. To get the Element ID of an element on which the tag resides, you must set the From related Object to "Yes"in properties definition.

From related Object setting is not limited to tags. Any relationship where source (Included object) & target (related object) are of the same type, you will see From related Object option for a property which is common for both source and target. Here, you must define whether to fetch property value from source or target.

Example: Consider a Line with Element ID = 1400 has Tag1 (Element ID 1401, Tag Name= ”FName” & Value=”Ian”) & Tag2 (Element Id 1402, Tag Name=”LName” & Value=”Roberts”.

The expected result is:

The From related Object setting for Element ID & Element Description is set as No.

Tag Name Tag Name Host Element ID Host Element Desc
Fname Ian 1401 Tag
LName Roberts 1402 Tag

The From related Object setting for Element ID & Element Description is set to Yes.

Tag Name Tag Name Host Element ID Host Element Desc
Fname Ian 1400 Line
LName Roberts 1400 Line

Sheet Index Report

When you place a sheet index as a table, a report of the sheet index is automatically created in the Reports dialog. The sheet index report can then customized and exported to Excel workbook or .csv formats.

Explorer Search Report

When you perform Advanced search or Criteria search in Explorer, the search result can be saved as a report definition. Consider a scenario where you want to search for rooms that have an area of more than 50 m2. You can search the same by creating an Advanced search query in the Explorer dialog File tab. Now, say you want to generate a list of these rooms. You can save the search result as a report and place a table from the report.

Report definition generated from Explorer search results contain the following:
  • Report name - Matching the name of the search node.
  • Item Types - Matching item types defined in the search.
  • Filter - Matching the criteria defined in the search.
  • Location - If the search is performed in the File or Items tab of the Explorer dialog, the location is the Active model, including all references. If the search is performed in the Resources tab of the Explorer dialog, the location for the search is defined by the $(_DGNFILE),$(MS_DGNLIBLIST),and $(MS_DGNLIBLIST_DRAWCOMP) configuration variables.
  • Columns - Corresponding to the properties explicitly selected in the Advanced Search dialog.
  • (Technology Preview) Add Calculated Column -Allows you to use an Expression directly in a report. The expression can be entered using Expression Builder as already possible for Item Types properties.
  • (Technology Preview) Add Sr.No Column - Adding the Serial Number Column in your reports will automatically generate a unique number for each of the rows in a report table.
  • (Technology Preview) Show All Columns - Columns can be hidden or shown by double clicking on eye icon in the report definition. The column will now be shown or hidden in the table based on its visibility status.
  • Sorting rules - Corresponding to the sorting specified in the Advanced Search dialog.
Note: Search results performed in the File tab of Explorer dialog may not exactly match the corresponding report results because the File search includes active model and the dictionary model; so items like shared cells and styles are also searched.