Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
AutoPLANT | OpenPlant | PlantWise
  • Product Communities
  • More
AutoPLANT | OpenPlant | PlantWise
AutoPLANT | OpenPlant | PlantWise Wiki OPPID - How to create a new report using Crystal Reports
    • Sign in
    • -AutoPLANT | Bentley Raceway and Cable Management | OpenPlant | PlantWise Wiki
      • -OpenPlant
        • +CONNECT Services - OpenPlant
        • +Example Configuration - CONNECT Edition
        • +Installations - OpenPlant CONNECT Edition Applications
        • +OpenPlant Download Links & Videos
        • OpenPlant Product Compatibility
        • +OpenPlant Modeler CONNECT
        • +OpenPlant PID CONNECT
        • +OpenPlant Isometrics Manager CONNECT
        • +OpenPlant Orthographics Manager CONNECT
        • +OpenPlant Support Engineering CONNECT
        • +OpenPlant Project Administrator CONNECT
        • +OpenPlant CONNECT Edition-PlantSight Integration
        • +OpenPlant Modeler v8i
        • +OpenPlant Isometrics Manager v8i
        • +OpenPlant Project Administrator v8i
        • -OpenPlant PID v8i
          • -Application Solutions - OPPID
            • +Brief Notes - OPPID
            • +Conversion - OPPID
            • +ECProperties - OPPID
            • +Issues and Workarounds - OPPID
            • +Logging/Debug - OPPID
            • +ProjectWise - OPPID
            • -Reports - OPPID
              • +How to Modify DGN Report
              • How to use Data Manager Reports for OpenPlant PID projects
              • OPPID - How to create a new report using Crystal Reports
              • Problem with custom report template formatting
            • +Setup - OPPID
            • +Tag Format - OPPID
            • +Upgrade Information OPPID
          • +Class Editor - OpenPlant PID
          • +Customization - OpenPlant PID
          • +Database - Plant Project
          • +Properties - OpenPlant PID
          • +Release Notes - OpenPlant PID
          • +Training - OpenPlant PID
          • +White Papers/Guidelines - OPPID
        • +OpenPlant Orthographics Manager v8i
        • +OpenPlant Support Engineering v8i
        • +OpenPlant ModelServer v8i
        • +OpenPlant Reporting v8i
        • How to Connect with Bentley Technical Support Team using Microsoft Teams
        • How to Connect with Bentley Technical Support Team using Microsoft Teams via Browser
      • +Bentley AutoPLANT
      • +Bentley Navigator
      • +Bentley PlantSpace
      • +Plant Project Tools
      • +Bentley Raceway and Cable Management
      • i-model Composition Service for S3D
      • Working from home with OpenPlant
      • Working from home with Bentley Raceway and Cable Management
      • Working from home with AutoPLANT Modeler
    • How to Associate the Specification Based on Service in OpenPlant Modeler Connect

     
     Questions about this article, topic, or product? Click here. 

    OPPID - How to create a new report using Crystal Reports

    Applies To 
    Product(s): OpenPlant PID V8i
    Version(s): SELECTseries 3+
    Environment:  N/A
    Area:  N/A
    Subarea:  N/A
    Original Author: Bentley Product Advantage Group

    Creating a TTX file in Crystal Report

    TTX file defines the fields. The names of these fields should be the same as of the names of the Properties that user wants to display in the report. The name of the TTX file should be the same as of the name of Class. One TTX file defines for one Class only. For example, If you want to show all the Equipments. One TTX file named EQUIPMENT.ttx should be defined. If you create TTX file named EQUIPMENT, then this template works for all the classes that are derived from EQUIPMENT like PUMP, VESSEL etc. But if you define PUMP.ttx, it will not work for EQUIPMENT class i.e. it supports the polymorphic behavior.
    The table name (Or name of TTX file) should be the same 

    • Open Crystal Report.
    • Goto File -> New -> Blank Reports.
    • In the Database Expert dialog, select "Field Definitions Only"

    • Expand Field Definitions Only, dialog is launched

    • In the Field Definitions Only dialog, you can either Open an existing TTX file Or Create and Define a new one.
    • Define fields for new TTX file (Add names of properties you want to display in the report like NAME, DESCRIPTION, MATERIAL, MODEL , MANUFACTURER)

    • Close the form and save the file with the name DEVICE.ttx (The properties selected in this example are of DEVICE class of OpenPlant Schema).
    • Press Finish in Field Definitions Only dialog.
    • On Database Expert dialog, select the newly created connection named "DEVICE"

    • Press OK on Database Expert dialog.
    • New connection fields are listed in Field Explorer dialog (normally docked at the bottom right corner of the application. It can be made visible from View -> Field Explorer). You can drag and drop the fields on the work area and adjust its settings (Font, Position etc) accordingly

    •  One Important Thing: Click on File -> Page Setup option and Check the "No Printer (optimize for screen display) option

     

    Using Crystal Report template in OpenPlant PID

    Creating template

    • In OpenPlant PID, launch Report dialog using Utilities -> Reports.
    • Click on "New Report" button Or Right Click and press Edit on any report

    • Press Add Button to add the crystal report template created in previous section

    • Press OK to create new template.
    • Template will appear in the list.

    Creating ECQuery for template

    • On the Create New Report dialog, add name, description etc for new report.
    • Create a Query by pressing ... on the Query textbox in Report Info section.
    • Select Device class Or Any class derived from Device at any level (Like the same template can be used for Equipment, Instruments etc). Don't forget to click the highlighted icon to support polymorphism

    • Click OK to define the Query.

    Creating Crystal Report template for Related Instances

    Repeat the steps (3 - 10, select "Field Definitions Only" in Database Expert dialog - Press OK on Database Expert dialog.) mentioned in the above section "Creating a TTX file in Crystal Reports" and create TTX files for both main and related class. For example: If you want to show PipeLines and related PipeRun data, you have to create 2 connections (TTX files) for PIPING_NETWORK_SEGMENT and PIPING_NETWORK_SYSTEM.

    Defining TTX and Linking Related Tables

    • These 2 tables in crystal report need to be linked together to show related data correctly.
    • You need to define an additional FIELD in TTX file named instanceID of type String in both TTX files.
    • Link these 2 tables in Database Expert dialog. Select Database -> Database Expert menu item

    • Press Clear Links button.
    • Create a new link between instanceID fields (from PIPING_NETWORK_SYSTEM to PIPING_NETWORK_SEGMENT) of both tables using drag and drop.
    • Double Click on the link to edit it and select appropriate options

    • Click OK in Link Options and Database Expert dialog.
    • A warning message may appear. Ignore it.

    Creating Group

    • Select Insert -> Group menu item.
    • Choose the Field you want to group with. In this example, NAME field of PIPING_NETWORK_SYSTEM is chosen as this can identify each Pipeline

    • Press OK. It will create a new Group Header section.
    • You can drag and drop the fields of the main table i.e. PIPING_NETWORK_SYSTEM into the Group section.
    • Drag and drop the fields of related table i.e. PIPING_NETWORK_SEGMENT into the Details section

    Report is ready to be consumed from within OpenPlant PID

    Comments or Corrections?

    Bentley's Product Advantage Group requests that you please confine any comments you have on this Wiki entry to the "Comments" area below. THANK YOU!

    • TechNote
    • OpenPLANT PowerPID
    • Openplant
    • Report
    • Share
    • History
    • More
    • Cancel
    • Gerd.Eichler Created by Bentley Colleague Gerd.Eichler
    • When: Wed, Feb 3 2010 9:21 AM
    • Rahul Kumar Last revision by Bentley Colleague Rahul Kumar
    • When: Wed, Apr 26 2017 2:04 AM
    • Revisions: 9
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies