Advanced Customization > Business Logic Customization > Report Generation > Report Loading > Objective
  
Objective
Objective
You want to load reporting objects into a Windchill Business Reporting (WBR) system.
Background
The Windchill Business Reporting (WBR) solution uses Windchill and Cognos objects in the system. Often times these objects are developed in another system such as a development system and then moved to another system where they are used in production. This document describes how these Reporting objects are loaded into a system.
For Windchill business objects, the standard Windchill Data Loading mechanism is used. These tools are based on describing objects and their attributes in XML files. The loading is accomplished by instantiating the business objects, populating the attributes specified in the XML files, and using standard Windchill create APIs.
For Cognos report objects, standard Cognos SOAP APIs are used. Cognos report attributes are specified in a Java properties file and the report’s definition is specified in an associated XML file. These files are processed and the data is passed to a Cognos SOAP API for creating reports.
Scope/Applicability/Assumptions
This documentation assumes that the Windchill Business Reporting (WBR) solution (i.e. Cognos) has been successfully installed and configured. The Windchill instance name is referred to as <WindchillInstanceName>. The Cognos root URL is referred to as <WBRHomeURL>. Typically, if the WBR solution is installed on <WBRHost>, then the <WBRHomeURL> would be http://<WBRHost>/Cognos/cgi-bin/cognos.cgi. It is assumed that you can login to <WBRHomeURL> and you have sufficient Cognos privileges to view Windchill Data Source objects and create reports.
Assume you have access to the Windchill server tasks directory, <WindchillHome>/tasks, to create an Info*Engine task <MyTask> in its associated sub-directory <MyTaskPackage>. Assume that this task has already been developed and tested on another source system, <WindchillSourceHome>.
Assume you have access to the Windchill UI and the ReportTemplate, <MyReportTemplate> in the Site context of another source system, <WindchillSourceHome>.
Assume you will load a new Windchill Report object, <MyReport>, and it will use the <MyReportTemplate> to retrieve data from Windchill. It is also assumed that you will be able to create a Report object in Windchill in the Site context.
For WBR integration, you must also have access rights to update the reporting meta model.
Solution
Construct and execute load files for Reporting objects.
Customization Points
Procedure – Loading Multiple Task Data Sources
In the primary procedure, Procedure — Loading an Info*Engine Task Data Source above, a single Info*Engine Task is loaded. To load multiple tasks, repeat step 1 for each task.
Each step in the remainder of the procedure only needs to be executed once. In the last step, verify that all Data Sources were loaded.
Procedure – Loading Multiple ReportTemplate Data Sources
In the primary procedure, Procedure — Loading a ReportTemplate Data Source above, a single ReportTemplate is loaded. To load multiple ReportTemplates, in step 2, specify a separate “csvReportTemplate” element for each ReportTemplate.
Each step in the remainder of the procedure only needs to be executed once. In the last step, verify that all Data Sources were loaded.
Procedure – Loading Multiple Windchill Report Objects
In the primary procedure, Procedure — Loading a Windchill Report Object above, a single Windchill Report object is loaded. To load multiple Windchill Report objects, in step 2, specify a separate “csvReport” element for each object.
Each step in the remainder of the procedure only needs to be executed once. In the last step, verify that all Windchill Report objects were loaded.
Procedure – Specifying Windchill Report Object Attributes
In the primary procedure, Procedure — Loading a Windchill Report Object above, only the basic Windchill Report Object attributes are specified. The following are the additional attributes that can be specified. For additional information see the Report javadoc.
csvReport Element
Description
csvname
Required. This entry specifies the Report’s name.
csvcontainerPath
Optional. This entry specifies a container where the report should be stored. If no value is specified, the site container is used by default.
csvdescription
Optional. This entry specifies a description of the Report.
csvinputPage
Optional. This entry specifies an input page for the Report.
csvresourceBundle
Optional. This entry specifies a resource bundle for the Report.
csvuiContext
Optional. This entry specifies the UI context mask to be used to control where the Report is displayed in the Windchill UI.
csvreadyForUse
Optional. This entry specifies whether the Report is ready for use for end users. If no value is specified, the default value is false.
csvsoapClass
Optional. This entry specifies the soap class if the Report uses a report task as its data source. This element is used along with the “csvsoapMethod” element to completely specify the report task. The Report must specify either a report task or ReportTemplate as its data source.
csvsoapMethod
Optional. This entry specifies the soap method if the Report uses a report task as its data source. This element is used along with the “csvsoapClass” element to completely specify the report task. The Report must specify either a report task or ReportTemplate as its data source.
csvreportTemplateN ame
Optional. This entry specifies the ReportTemplate name if the Report uses a ReportTemplate as its data source. This element is used along with the “csvreportTemplateContainerPath” element to completely specify the ReportTemplate. The Report must specify either a report task or ReportTemplate as its data source.
csvreportTemplateC ontainerPath
Optional. This entry specifies the ReportTemplate name if the Report uses a ReportTemplate as its data source. This element is used along with the “csvreportTemplateName” element to completely specify the ReportTemplate. The Report must specify either a report task or ReportTemplate as its data source.
Procedure – Loading Multiple Cognos Reports
In the primary procedure above, Procedure — Loading a Cognos Report, a single Cognos Report is loaded.
To load multiple Cognos Reports, repeat steps 3 and 4, for each Cognos Report. Each step in the remainder of the procedure only needs to be executed once. In the last step, verify that all Cognos Reports were loaded.
Procedure – Specifying Cognos Report Attributes
In the primary procedure — Loading a Cognos Report above, only the basic Cognos Report attributes are specified. The following are the additional attributes that can be specified.
Property Name
Description
type
Optional. This entry specifies the Report’s type. The valid values are report, query, and reportTemplate. If not value is specified, then the default value is "report".
defaultName
Required. This entry specifies the Report’s name.
defaultDescription
Optional. This entry specifies a description of the Report.
resourceBundle
Optional. This entry specifies the name of a Java resource bundle that is used to localize entries in the corresponding Cognos report specification XML file.
Limitations
For Cognos Report loading, there are load file directories that are used for Windchill out-of-the-box reports. These directories should not be used for custom load files. The reserved directories are <WindchillHome>/loadFiles/cognosReports and <WindchillHome>/loadFiles/cognosReports/<assemblyId> where <assemblyId> is a standard Windchill assembly ID such as wnc, pdml, pjl, etc.
Sample Code
Examples of Usage in Windchill Code
There are several out-of-the-box reports that use the load files described in this document. These are located in the <WindchillHome>/loadFiles, <WindchillHome>/loadFiles/reports, and <WindchillHome>/loadFiles/cognosReports directories.
Packaged Samples
A demo load file for Windchill ReportTemplate and Report objects is available in <WindchillHome>/loadXMLFiles/DemoReports.xml.
Additional Resources
Reporting Info*Engine Task Data Source Customization
ReportTemplate Data Source Customization
Cognos Presentation Customization
Related Package/Class Javadoc
Foundation module
wt.query.qml
Reporting module
Reporting module
com.ptc.windchill.enterprise.report
Other Related Windchill Documentation
Info*Engine User’s Guide
Introduction to Data Loading and the LoadFromFile Framework
Info*Engine Implementation
Specialized Administration
Report Management online help
Related Websites
http://www.ibm.com/cognos/support