SmartPlant Materials How to Create and Maintain to Create and Maintain... · SmartPlant Materials .…

Download SmartPlant Materials How to Create and Maintain to Create and Maintain... · SmartPlant Materials .…

Post on 04-Jun-2018

213 views

Category:

Documents

1 download

TRANSCRIPT

  • SmartPlant Materials How to Create and Maintain Reports

    Version 2007.2 (6.2.3) January 2007 / April 2007 DMAR1-PE-200060A-Updated

  • Copyright Copyright 2004-2007 Intergraph Corporation. All Rights Reserved.

    Including software, file formats, and audiovisual displays; may be used pursuant to applicable software license agreement; contains confidential and proprietary information of Intergraph and/or third parties which is protected by copyright law, trade secret law, and international treaty, and may not be provided or otherwise made available without proper authorization.

    Restricted Rights Legend Use, duplication, or disclosure by the government is subject to restrictions as set forth below. For civilian agencies: This was developed at private expense and is restricted computer software submitted with restricted rights in accordance with subparagraphs (a) through (d) of the Commercial Computer Software - Restricted Rights clause at 52.227-19 of the Federal Acquisition Regulations (FAR) and its successors, and is unpublished and all rights are reserved under the copyright laws of the United States. For units of the Department of Defense (DoD): This is commercial computer software as defined at DFARS 252.227-7014 and the rights of the Government are as specified at DFARS 227.7202-3. Unpublished rights reserved under the copyright laws of the United States. Intergraph Corporation Huntsville, Alabama 35894-0001

    Warranties and Liabilities All warranties given by Intergraph Corporation about equipment or software are set forth in your purchase contract, and nothing stated in, or implied by, this document or its contents shall be considered or deemed a modification or amendment of such warranties. Intergraph believes the information in this publication is accurate as of its publication date.

    The information and the software discussed in this document are subject to change without notice and are subject to applicable technical product descriptions. Intergraph Corporation is not responsible for any error that may appear in this document.

    The software discussed in this document is furnished under a license and may be used or copied only in accordance with the terms of this license.

    No responsibility is assumed by Intergraph for the use or reliability of software on equipment that is not supplied by Intergraph or its affiliated companies. THE USER OF THE SOFTWARE IS EXPECTED TO MAKE THE FINAL EVALUATION AS TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN ENVIRONMENT.

    Trademarks Intergraph, the Intergraph logo, SmartSketch, FrameWorks, SmartPlant, INtools, MARIAN, PDS, and IntelliShip are registered trademarks of Intergraph Corporation. Microsoft and Windows are registered trademarks of Microsoft Corporation. Other brands and product names are trademarks of their respective owners.

  • Table of Contents

    Table of Contents Preface .................................................................................................................................4

    Overview .............................................................................................................................5

    Document Scope ...........................................................................................................6 Assumptions and Dependencies, Constraints & Exclusions ............................................... 6 Purpose of this Document ................................................................................................... 6

    Identify and Capture Reporting Needs ............................................................................7

    Formulate a Base Query to Support the Requirements ................................................9

    Create a New Oracle Report ...........................................................................................10

    Create a New Report using Report Wizard ................................................................11 Create a New Report Manually ..................................................................................21 Create a Report from an Existing Report ...................................................................22

    Modify an Existing Report ..............................................................................................23

    Index ..................................................................................................................................27

    SmartPlant Materials How to Create and Maintain Reports 3

  • Preface

    Preface This document is a users guide for SmartPlant Materials 2007.2 (6.2.3).

    It describes how to create and maintain SmartPlant Materials reports in SmartPlant Materials 2007.2 (6.2.3) using Oracle Reports Developer.

    Send documentation comments or suggestions to PPMdoc@intergraph.com.

    4 SmartPlant Materials How to Create and Maintain Reports

    mailto:PPMdoc@intergraph.com?subject=Documentation%20Comments

  • Overview

    Overview SmartPlant Materials uses Oracle Reports Server to deliver reports that are developed in Oracle Reports Developer to end users through integrating reporting in the SmartPlant Materials application. For instance, when an end-user wants to see a report that shows commodity groups, parts, and codes for review, SmartPlant Materials Administrators along with Oracle Developers can develop and integrate a new report showing exactly what the end-user requested and incorporate it into their SmartPlant Materials installation.

    SmartPlant Materials How to Create and Maintain Reports 5

  • Overview

    Document Scope The audience for this document is SmartPlant Materials Administrators and Oracle Developers.

    Assumptions and Dependencies, Constraints & Exclusions Assumptions regarding the subject matter of this document are as follows:

    Administrators will have experience in navigating and understanding the SmartPlant Materials application.

    Administrators will have access to the appropriate sample database(s) through the software required.

    Developers will be given specifications from the SmartPlant Materials Super User/Administration team for new reports or modifications to existing reports.

    Not covered in this document is the actual definition of new report requirements. The subject matter covered is intended to allow experienced personnel maintain and/or create SmartPlant Materials reports based on delivered requirement specifications from the business usage team. The example used in this document is purely for demonstration purposes.

    Purpose of this Document The purpose of this document is for developers to be able to create and maintain both delivered SmartPlant Materials reports and reports that have been custom developed by Intergraph for the customers SmartPlant Materials implementation.

    6 SmartPlant Materials How to Create and Maintain Reports

  • Identify and Capture Reporting Needs

    Identify and Capture Reporting Needs Lets assume that the SmartPlant Materials implementation team has requested that a new report be generated that shows the SmartPlant Materials Commodity Group, Part, and Code for any requested group, part, or commodity code inclusively. In order to develop and integrate this new report in SmartPlant Materials, we must capture the exact requirements of this new report in the form of a specification to be delivered to an Oracle Developer to build the new report layout. In this specification, the customer needs to include as the following:

    The layout of the report. In other words, the report should be landscape format, with a standard company header, gridlines, and so forth.

    Parameters to be included in the report to allow filtering.

    The column requirements of the report.

    Any special logic required to generate the actual fields to be displayed if not available from database columns.

    The name of the report, location in the SmartPlant Materials application, and availability to existing roles in SmartPlant Materials (security)

    Once this specification has been created, it should be delivered to the development team to generate the report and integrate it into the SmartPlant Materials application. Specifications should at least contain information like the following:

    SmartPlant Materials How to Create and Maintain Reports 7

  • Identify and Capture Reporting Needs

    8 SmartPlant Materials How to Create and Maintain Reports

  • Identify and Capture Reporting Needs

    Formulate a Base Query to Support the Requirements

    The most important step prior to developing a new report is to understand where the information in the report will come from. Based on the SmartPlant Materials physical tables, the development team should take the given specification and evaluate what tables will need to be accessed and how they are to be joined. Also, they need to identify any additional logic that will be required to present the information in the format requested (for example, if any filtering applies as shown below).

    If, when formulating the base query for the report, any questions should arise, the development team needs to coordinate with the business team to be sure the issues are addressed before moving forward.

    For this example, we will use a very simple example query like the following:

    SmartPlant Materials How to Create and Maintain Reports 9

  • Create a New Oracle Report

    Create a New Oracle Report Now that the requirements have been defined and discussed, the developer can generate a new report using Oracle Reports Developer.

    10 SmartPlant Materials How to Create and Maintain Reports

  • Create a New Oracle Report

    Create a New Report using Report Wizard There are several ways to start a new report. In this case, we will start from an empty new report and use the Oracle Report Wizard to help us create a basic report for commodity groups, parts, and codes.

    Steps:

    Open Reports Developer and you should see the following:

    The options are to use the wizard, create a report manually, or open an existing report. In this case, we will just use the Report Wizard to create our example report. Click OK, and you will see the following:

    SmartPlant Materials How to Create and Maintain Reports 11

  • Create a New Oracle Report

    You can choose to display this screen every time you use the wizard or not using the

    Show this page next time option.. Click , and begin the wizard-based report building method.

    We will be generating a paper layout report in this example, so choose the following on the next screen:

    12 SmartPlant Materials How to Create and Maintain Reports

  • Create a New Oracle Report

    Now the report builder shows you the different types of reports available. We will use the default Tabular style report for our example, but there are many types available for more advanced reporting.

    SmartPlant Materials How to Create and Maintain Reports 13

  • Create a New Oracle Report

    Click , and you will see a screen asking for the data source type, which will be the default SQL Query that we have already discussed and prepared in the Formulate a Base Query to Support the Requirements section above. Click

    . Now, a dialog box with an SQL text box and three buttons will appear. First, you must connect to the target database to be able to add the query needed for your new report. Click Connect and log in to the database as M_SYS using the following dialog box (you should already have the password and connection string to the target database).

    Clicking Connect will return you to the SQL text box dialog box. Now, you can start adding the query that will be used for the report. In our case, we can paste the query generated in the Formulate a Base Query to Support the Requirements section

    14 SmartPlant Materials How to Create and Maintain Reports

  • Create a New Oracle Report

    above. However, you can also choose to use the Query Builder tool provided by Oracle to generate the new query. You should see the following:

    Click , and move on. The system will tell you that three new parameters have been created for the report (one for each parameter we will include in this example) to facilitate the filtering we need based on either commodity group, part, or code.

    Click OK, and we will modify the parameters after the Wizard is finished. Now, Oracle Reports walks you through how you want to define the layout of the report we are generating. For example, what columns do we want to see, in which order, how much width for each column, the fonts, and so forth, starting with the following dialog box:

    SmartPlant Materials How to Create and Maintain Reports 15

  • Create a New Oracle Report

    Click the button to include all three columns, and click twice. The next screen deals with setting up columns for calculations, which we will not be doing in this example. Now, you should see the following window:

    16 SmartPlant Materials How to Create and Maintain Reports

  • Create a New Oracle Report

    This screen is where you can define the labels for each column on the report layout we are creating. You can also adjust the width of each column. For our example, the labels are correct; however, set the width to 5 for Commodity Group and Commodity

    Part. Once complete, click .

    On the next screen, you can choose to use predefined report layout templates. We will use the system default of Beige for our example. You should see the following:

    SmartPlant Materials How to Create and Maintain Reports 17

  • Create a New Oracle Report

    Now, click and Reports Developer will generate the report. The following window should display, and you need to enter % (the Oracle wildcard character) for each parameter value as shown:

    18 SmartPlant Materials How to Create and Maintain Reports

  • Create a New Oracle Report

    Now click the Run Report ( ) icon to see the results of your report using the Live Previewer. Your report should look similar to the following:

    Save the report to your SmartPlant Materials Report folder directory, and this step of the exercise is complete.

    Always add the following PL/SQL to the BEFORE REPORT trigger for all reports that are to be run only for the current project the end user is logged into SmartPlant Materials as:

    1. First add a new User Parameter to the report called P_US_ID (number with default settings is fine)

    2. Second, add the before-report-trigger code shown below and compile: function BeforeReport return boolean is BEGIN mpck_login.select_login(:p_us_id); RETURN (TRUE);

    END;

    This function sets the environment up to use SmartPlant Materials project and discipline filtering, if required.

    SmartPlant Materials How to Create and Maintain Reports 19

  • Create a New Oracle Report

    In addition, when saving reports for SmartPlant Materials, always use the Reports Binary (.rdf) file format.

    20 SmartPlant Materials How to Create and Maintain Reports

  • Create a New Oracle Report

    Create a New Report Manually This document does not cover manual creation of an Oracle Report, which is also an option while using Oracle Reports Developer. The customer will probably be using pre-defined templates of their choosing, delivered reports from Intergraph in the SmartPlant Materials application, or custom reports delivered to the customer as part of the implementation.

    SmartPlant Materials How to Create and Maintain Reports 21

  • Create a New Oracle Report

    Create a Report from an Existing Report This section explains how to use an existing report to create a new report in Oracle Reports Developer.

    First, you must know which report to create a new report based on.

    Steps:

    1. Open Reports Developer, and cancel the Report Wizard dialog box. 2. Click File > Open, and open the appropriate source report file. 3. Save the report as your target report name, and make the modifications to the

    Data Model or Paper Layout Sections or any other Sections that require changes for the new report.

    4. Incorporate the report into SmartPlant Materials.

    22 SmartPlant Materials How to Create and Maintain Reports

  • Modify an Existing Report

    Modify an Existing Report This section demonstrates how to modify existing SmartPlant Materials Reports. In our example, we will increase column widths and change the order in which information is displayed from our new report created in the section titled Create a New Oracle Report.

    Now that the requirements have been defined and discussed, the developer can begin to generate a new report using Oracle Reports Developer.

    Steps:

    Open Reports Developer and you should see the following:

    In this case, choose the Open an existing report method since we will be modifying the report we designed in our earlier example.

    SmartPlant Materials How to Create and Maintain Reports 23

  • Modify an Existing Report

    Now open the file we just created:

    You should now see the Object Navigator view of the report as shown below:

    24 SmartPlant Materials How to Create and Maintain Reports

  • Modify an Existing Report

    We want to change the column width of Commodity Group in our example and also the Commodity Code so we need to open the Paper Layout. Double-click the Paper Layout Icon ( ) to open the report layout. You should now see the following:

    You can use your mouse to select the columns and frames that need to be adjusted in order to make the modifications required.

    Change the columns in our example to better fit the page as necessary.

    The next step involves changing the sort order of the data behind the report. In this case, we are (by default) sorting commodity groups in ascending order. We would like to now sort the commodity catalog in descending order. In order to do so, we must enter the Data Model for the report. From the Object Navigator, select the Data Model by double-clicking the Data Model Icon ( ). Now you should see something like the following:

    SmartPlant Materials How to Create and Maintain Reports 25

  • Modify an Existing Report

    We can see and modify the query behind this report by double-clicking the query box (Q_1), or by selecting the query box and using our right-context menu:

    Now you should see your original query used when the report was designed:

    Modify the query so that the ORDER BY statement is as follows:

    ORDER BY cg.cg_group_code DESC

    This will re-order the results of our query to sort by commodity group code in descending order.

    This completes the changes required in our example. Compile the report, and save your changes. Once the report has been recompiled and saved, post it back to the original folder for custom reports, and the process is complete.

    26 SmartPlant Materials How to Create and Maintain Reports

  • Index

    SmartPlant Materials How to Create and Maintain Reports 27

    Index

    audience document, 6

    base queries, 9 creating

    new reports, 10, 11, 21, 22 document

    audience, 6 purpose, 6 scope, 6

    existing reports, 22

    manual creation of reports, 21 modifying

    existing reports, 23 new

    reports, 10 Oracle Report Wizard, 11 overview

    reports, 5 purpose

    document, 6 reports

    columns, 7 existing, 22 filtering, 7 layout, 7 modifying, 23 names, 7 new, 10 overview, 5 requirements, 7

    requirements reports, 7

    scope document, 6

    PrefaceOverviewDocument ScopeAssumptions and Dependencies, Constraints & ExclusionsPurpose of this Document

    Identify and Capture Reporting NeedsFormulate a Base Query to Support the Requirements

    Create a New Oracle ReportCreate a New Report using Report WizardCreate a New Report ManuallyCreate a Report from an Existing Report

    Modify an Existing ReportIndex

Recommended

View more >