Chapter 2. Advanced reporting in IBM TRIRIGA. IBM Version 3 Release 5
Διαφήμιση
Διαφήμιση
Chapter 2. Advanced reporting in IBM TRIRIGA
You use IBM TRIRIGA Advanced Reporting for report presentations. IBM TRIRIGA
Advanced Reporting uses the Eclipse BIRT application and an IBM TRIRIGA plug-in for the BIRT application. Form reports show the contents of a single record.
Query reports show multi-record reports.
The BIRT application layout is grid-based, and every element must exist in an element of the BIRT layout grid. Grid layouts align report elements onto lines, align elements vertically into columns, and size the columns to fit the contents.
You can use grids to create a report by dragging elements into the report design.
Important:
You must follow BIRT and IBM TRIRIGA reporting guidelines and consider memory allocations if you run complex reports. The Java heap size is a critical parameter when you design, build, and run reports.
Before you can develop BIRT reports for an IBM TRIRIGA application, you must install the BIRT Report Designer and configure it to work with IBM TRIRIGA.
Installing the BIRT application
You install the BIRT Report Designer once. Before you begin the installation, ensure that a supported version of the Java
™
JRE is installed locally.
About this task
For the supported versions, see the Client Compatibility section of the IBM
Support Matrix.
Procedure
1.
Go to BIRT 4.3.1 in the IBM Integrated Service Management (ISM) library website.
2.
Download the BIRT Report Designer - All-in-One version to a local directory.
The directory name cannot include any spaces.
3.
In the folder where you downloaded BIRT, extract the birt-report-designerall-in-one-4_3_1.zip
file, open the Eclipse folder, and select the eclipse.exe
file.
4.
Select the workplace location where Eclipse stores your project files and select
OK
.
Configuring BIRT Process Servers
You can configure a second IBM TRIRIGA server to offload and process BIRT reports in a separate BIRT process. If you do not configure a separate process server, the BIRT report processing is done on the application server.
Procedure
1.
Locate the TRIRIGAWEB.properties file.
2.
Set the BIRT_PROCESS_SERVER_LISTENING_PORT property to the TCP port that communicates the two IBM TRIRIGA servers. The server detects BIRT requests on this port.
© Copyright IBM Corp. 2011, 2015
7
3.
Set the BIRT_PROCESS_SERVER_HOST_NAME property to the host name or IP address of the BIRT process server.
4.
Set the BIRT_PROCESS_SERVER_PORT property to the listening port that you configured on the BIRT process server.
5.
Save the TRIRIGAWEB.properties file.
6.
Restart the BIRT process server.
Installing the IBM TRIRIGA plug-in for BIRT
For IBM TRIRIGA Advanced Reporting, you must have theIBM TRIRIGA plug-in for BIRT installed.
Procedure
1.
Open the BIRT application, and select Help > Install New Software.
2.
In the Work With field, specify the following URL for the IBM TRIRIGA plug-in software site: http://[server:port]/[context path]/eclipse. Use the [context
path] only if the server is configured with a context path.
3.
Select the IBM TRIRIGA BIRT features.
4.
Select the details and select Next.
5.
Review and accept the licenses, and select Finish.
6.
Restart the BIRT application.
7.
In the Workspace field, select the workspace and select OK.
8.
In the Eclipse application, select Window > Preferences > IBM TRIRIGA
BIRT Preferences
and specify the information to connect to the IBM TRIRIGA server.
9.
Select Test Connection and in the Connected dialog box, select OK.
10.
Optional: Configure update notifications.
a.
Select Windows > Preferences, expand the Install/Update folder, and select Automatic Updates.
b.
Select Automatically Find New Updates and Notify Me.
c.
Select the Update Schedule, Download, and the When Updates are Found options.
d.
Select Apply > Update.
Upgrading the IBM TRIRIGA plug-in
When a new IBM TRIRIGA release is available, you update the IBM TRIRIGA plug-in in the BIRT Eclipse environment.
Procedure
1.
Open the BIRT application, and select Help > About Eclipse.
2.
Select Installation Details.
3.
In the Installed Software tab, select IBM TRIRIGA BIRT Feature.
4.
Select Update.
8
© Copyright IBM Corp. 2011, 2015
BIRT report process
Report writers create BIRT reports. BIRT reports are a type of advanced report for report presentations.
The following steps describe the BIRT report process:
1.
Create a starter report in IBM TRIRIGA.
2.
Import a starter report to the BIRT Report Designer.
3.
Develop a BIRT report.
4.
Preview a BIRT report.
5.
Export a BIRT report.
6.
Upload a BIRT report to IBM TRIRIGA.
7.
Associate the BIRT report with an IBM TRIRIGA access point.
Starter reports in IBM TRIRIGA
Starter report files are downloaded from the IBM TRIRIGA application. You can create reports from an existing report, a query report, or from a form.
Creating starter reports from query reports
You can create a starter report from a new or existing IBM TRIRIGA query report.
Query reports can contain data from top-level records. They can also contain multiple levels of detail that are accessible by using associated business objects and records. Most often, query reports show multi-record reports.
Procedure
1.
In the IBM TRIRIGA Report Manager, go to the report or query to use as a model.
2.
Select Advanced and select the BIRT Report link.
3.
Select Save.
4.
Select the location for the download of the starter file and select Save.
Creating starter reports from forms
You can create a starter report from a new or existing IBM TRIRIGA form. Form reports typically contain data from a top-level record. They can contain data from one or more associated records. In the Reports tab of a record, you can select form reports. You can also run a form report to display the form for multiple top-level records.
Procedure
1.
In the IBM TRIRIGA Form Builder, select Layout and select the BIRT Report link.
2.
Select Save.
3.
Select the starter file download location and select Save.
Importing starter reports into BIRT
You import starter reports from IBM TRIRIGA into the BIRT Report Designer.
About this task
If your compressed file extraction tool allows it, you can open the .zip file and in the BIRT Report Designer Navigator pane, drag the files into a particular report project.
Chapter 2. Advanced reporting in IBM TRIRIGA
9
Procedure
1.
In BIRT, select File > New > Project.
2.
Select the Business Intelligence folder, select Report Project > Next.
3.
Specify the name of the project and select Finish.
4.
In the Report Design window, select Navigator, right-click the project, and select Import.
5.
Select the compressed file that you downloaded when you created a starter report in IBM TRIRIGA and select Finish.
6.
Verify that the starter report shows in the Navigator tab.
Creating BIRT reports
To create a BIRT report, you use the BIRT Report Designer to modify the imported
.rptdesign
file. BIRT reports contain information that is IBM TRIRIGA.
Adding data sources
In BIRT reports, all data is accessed through data sources. A starter report includes a single data source that is named TRIRIGA. TRIRIGA is a scripted data source. All data sets that obtain their data from an IBM TRIRIGA server must use this data source.
About this task
If the TRIRIGA data source does not provide all the data that you need, you can use the data access methods that BIRT supports, including JDBC and XML. You must add the JDBC data source manually, and it must be named TRIRIGA_DB. At run time, the report is modified so that it interacts with the IBM TRIRIGA database that is associated to the server that the report is running on.
Procedure
1.
In BIRT, select Data Explorer.
2.
Right-Click the Data Sources and select New Data Source.
3.
Select JDBC Data Source and in the Data Source Name field specify
TRIRIGA_DB .
4.
Select Next.
5.
Optional: Select Driver Class and specify the database URL, the user name, and the password.
6.
Specify the database URL, the user name, and the password.
7.
In the JNDI URL field, enter jdbc/local/Datasource-TRIRIGA-data, and select
Finish
.
8.
Right-click Data Sets and select the new data set name.
9.
Specify the SQL statement.
10.
Optional: Add parameters.
11.
Select Finish.
Data sets
A starter report contains at least one data set. The data set models the IBM
TRIRIGA report or the form that was originally created by the BIRT Report.
The name of the data set represents the IBM TRIRIGA report or form. For example, a data set that models the report triFiscalPeriods_-_Find_-_Years is named
[v2QRY]Classification_triFiscalPeriods_triFiscalPeriods_-_Find_-_Years.
10
© Copyright IBM Corp. 2011, 2015
A starter report that is exported from an IBM TRIRIGA query has one data set. The data set has columns that correspond the columns in the IBM TRIRIGA query. For example, the IBM TRIRIGA report triFiscalPeriods - Find -Years queries has the following columns: Name, Start Date, End Date, and Hierarchy Path.
A starter report that is exported from an IBM TRIRIGA form can have multiple data sets. One data set that has the prefix [v2BO] exists in the starter report. The data set represents the top-level data of the form and has columns that correspond with the business object fields for the form's top-level business object.
Every Smart Section in the business object of a form is represented as a data set that has the prefix [v2SS]. These Smart Section data sets have columns that correspond the business object fields in those sections. The
system__parentRecordId
input parameter specifies the data to retrieve for this data set.
Every Query Section in the form is represented as a normal query data set and has the prefix [v2QRY]. The built-in system__parentRecordId input parameter specifies the data to retrieve for this data set.
In the starter report, the system__parentRecordId input parameters are not bound to the top-level business object data set. You must bind the parameters inside the report layout.
Data types
To preserve data that is from IBM TRIRIGA, the system returns all business object field data from IBM TRIRIGA in the form of Java Objects. All starter reports have output columns that are modeled as Java Objects.
Use the following guidelines for Java objects: v When you use a value in the report, you must know the BIRT Type to map it to.
v If you use values frequently, more scripting is required.
v When you drag an IBM TRIRIGA element directly onto a report, the element shows in the report.
To use the output column for something other than display, you can access the
SQL value from the output column in any BIRT expression by using the object's getNativeValue() method.
For example, in the Expression Builder, enter the following value: row["Classification_triFiscalPeriods_triStartDA"].getNativeValue()
.
If the Java object has additional methods, you can access them by using any BIRT expression. When binding one of these expressions results to a report element, select the appropriate BIRT type to access all the built-in BIRT functions.
When you put the output column on the report, BIRT automatically uses the toString() method. To access the value, use the following minor script:row["Classification_triFiscalPeriods_triStartDA"].getNativeValue().
When you export a starter report, all data is mapped to Java Objects inside BIRT.
Every Java Object minimally has the getNativeValue() and toString() methods.
Chapter 2. Advanced reporting in IBM TRIRIGA
11
Java objects:
When you export a starter report, all data is mapped to Java Objects inside BIRT.
Every Java Object has the getNativeValue() and the toString() methods.
The following table provides information for additional methods for Java object and the business object field type.
Table 1. Java objects
Business object field type
Text
Number
Financial rollup
getNativeValue() result
java.lang.String
Considerations for toString()
N/A java.math.Big Decimal UOM metadata and BO field masks
Additional methods
N/A getUom().getUom
TypeCode()
Suggested
BIRT binding if you use the native value
String
Decimal getUom.getUom
Value()
Classification Rollup
Date
DateTime
Time
Locator
Duration
Has Uom() returns false if there is no
UOM.
java.math.Big Decimal BO field masks N/A java.sql.Date
N/A java.sql.Date
java.sql.Time
User's timezone and preferred display format
User's timezone and preferred display format
Is displayed as hours/minutes/ seconds with no timezone considerations.
N/A
N/A
Decimal
Date
Date Time
Time for meaningful results from this value, use a GMT calendar.
String
Decimal
Classification
List
Boolean java.lang.String
java.lang.Long
A single value that encodes the Duration components into a single value. It is stored in the IBM
TRIRIGA database to represent a particular duration value. This value might not represent the total number of milliseconds for the particular duration.
java.lang.String
(nontranslated value) java.lang.String
(nontranslated java.lang.Boolean
N/A
Formats that use
IBM
TRIRIGApreferred format and considers the user's language.
BO field option full hierarchy path and user's language
N/A
User's language N/A
N/A
N/A
N/A
N/A
String
String
Boolean
12
© Copyright IBM Corp. 2011, 2015
Table 1. Java objects (continued)
Business object field type
Image
getNativeValue() result
byte[]
Binary
UOM byte[] java.lang.String
(Non-translated value)
Password
SystemField_Bo
RecordId
SystemField_
SystemField_
ModifiedDate Time java.lang.String
java.lang.Long
java.lang.Long
java.sql.Date
SystemField_
CreatedDate Time java.sql.Date
SystemField_ Modified
DateTimeNumber java.sql.Date
SystemField_ ProjectId java.lang.Long
SystemField_
BoTypeId java.lang.Long
SystemField_Parent java.lang.Long
Considerations for toString()
Returns path to image as stored in IBM TRIRIGA database
Additional methods
N/A
String representation of the content ID, the key of the
DM_CONTENT table getUomValue() translated to the current user's language
N/A getUom().getUom
TypeCode() getUom.getUom
Value()
N/A
N/A getUomValue() is
NULL if there is no value
N/A
N/A
Suggested
BIRT binding if you use the native value
Image
Blob
String
String
Decimal
Decimal
Date Time
N/A
User's timezone and preferred display format.
User's timezone and preferred display format
User's timezone and preferred display format
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A N/A
Date Time
Date Time
Decimal
Decimal
Decimal
Parameters
In IBM TRIRIGA, queries and reports have parameters that filter the data that is returned from queries. In the Report Manager, you use the filters to configure query and report filters.
If a BIRT data set use an IBM TRIRIGA query and that query has user input filters, each filter is shown in a starter report. The filters are show in the Data Explorer tab, as a top-level entry in the Report Parameters folder. This report parameter defines the user prompt that occurs prior to the report execution. The filters also are shown in the Parameters section, as a parameter of the data set that models the
IBM TRIRIGA query. The entry passes the report parameter value that you specify to the data set.
Chapter 2. Advanced reporting in IBM TRIRIGA
13
When a filter is required, the IBM TRIRIGA query with a user filter appears as a user prompt and filters the results based on the IBM TRIRIGA query definition.
The default label for a field is the Business Object field's label. You can add a custom label and help text for these report parameters.
If a report has multiple user filters on the same field, all filters are shown in the report. BIRT identifies parameters by using a suffix that corresponds to their positions in the query.
BIRT provides no means to differentiate between a filter to ignore and a NULL filter value. If you select NULL for a report parameter that maps to an IBM
TRIRIGA query filter, the filter is not used.
For parameter types that are text, you can specify a value of NULL, and the IBM
TRIRIGA query engine uses NULL as the filter value.
The IBM TRIRIGA BIRT integration processes the Time parameter filter correctly only when you use a String data type for the Time parameter. If you use a Time data type for the Time parameter filter, the TRIRIGA BIRT viewer does not display an error, but it does not filter the results properly.
The IBM TRIRIGA BIRT integration processes non-English date and date time formats on the Date and Date Time filter parameters only if they are set as a String data type.
Context for data requests
In IBM TRIRIGA, you must add context to data requests. Context is required for the current user, the record, and the project.
The BIRT preview environment provides the user context from the IBM TRIRIGA
BIRT preferences. The IBM TRIRIGA runtime environment gets data from users that are signed in.
In both the BIRT preview and IBM TRIRIGA runtime environments, record context passes through the BIRT report as a report parameter and down to the data sets.
A starter report for a query has a non-required, hidden system__parentRecordId report parameter. For the query data set, it has a system__parentRecordId input parameter. When the report runs, if a nonzero value is passed through the parameter to IBM TRIRIGA, it becomes the $$RECORDID$$ value when the IBM
TRIRIGA query runs.
In a starter report for a form, the system__recordIds parameter is a required report parameter. The system__recordIds parameter is a comma-delimited list of record
IDs that the form report renders. You can use multiple IDs for the bulk-reporting requirements.
In a BIRT preview environment, a prompt is used to collect for the
system__recordIds
value to preview the form report. The following
system__recordIds
is an example: system_recordIds 1590609, 1345105, 1295530.
In a report definition, even though the report has a parameter that is configured as not-hidden, the prompt is not shown inside an IBM TRIRIGA runtime environment, because the runtime environment provides the value.
14
© Copyright IBM Corp. 2011, 2015
In the BIRT preview environment, you can specify a project context in the IBM
TRIRIGA BIRT Preferences section by using the project ID input. The BIRT preview environment uses the project ID input to provide project context for any IBM
TRIRIGA requests.
System fields
Some fields that are built in to a BIRT report are not built into IBM TRIRIGA
Business Object fields.
The following table contains system fields with special names that have special meaning to the IBM TRIRIGA-BIRT integration.
Table 2. System fields
System field system__recordIds system__recordId system_parentRecordId
Usage
Data set input parameter for business object data sets.
Report Input Parameter for
Form Reports.
Data set Input Parameter for
Business Object data sets.
Data set Input Parameter for query data sets.
Description
Comma-delimited list of record IDs that control the records that are returned from Form reports. Required if you do not use the
system_recordId
input parameter.
Numeric value that represents a single record to return from a Business
Object data set. For a query report, this field is required.
For a form report, this field is required if you do not use the system_recordIds input parameter.
Provides record context to reports and data sets.
system__recordId
Data set Input Parameter for smart section data sets.
Report Input Parameter for
Query Report.
For smart sections,
system_parentRecordId
is a required value that controls which record's section data to return.
Output Column for all types of IBM TRIRIGA data sets.
For Query data sets, the
$$RECORDID$$ and
$$PARENT variables are used in an IBM TRIRIGA Query definition.
Every IBM TRIRIGA data set has an output column named
system_recordId
. The column contains the record
ID of the returned record.
The only case where this column is returned with a
NULL value is for a reference that will not pass through with smart section that is modified. In that case, there is no built in IBM
TRIRIGA record.
Chapter 2. Advanced reporting in IBM TRIRIGA
15
Table 2. System fields (continued)
System field system__sourceRecordId
Usage
Data set Output Column for smart section data sets.
Description
Every smart section data set has an output column that is named
system_sourceRecordId
. The value holds the data that a smart section record was initialized from, which is called the source record. The
system_sourceRecordId
helps to differentiate the section record from the source record.
Globalization
Starter reports and the IBM TRIRIGA-BIRT integration have features to assist with the globalization of reports. Before you export labels for BIRT reports, make sure that these reports are set up in IBM TRIRIGA.
The IBM TRIRIGA-BIRT integration to localize dates. The display string for any
IBM TRIRIGA Date or DateTime field is formatted in the user's preferred date format. In addition, the formatDate() custom function and the formatDateTime() custom present a BIRT Date or DateTime in the IBM TRIRIGA user's preferred date format.
IBM TRIRIGA translates all labels in the BIRT report. The starter report includes all the labels that are needed to translate the business object field labels in a report.
A starter report is associated to a resource properties file with an tririgalabels.properties
extension. You can view this association in the
Resources section in the Property Editor – Report tab. This report resource points to a properties file that contains label keys for every business object field that was built into the report.
In the starter report, each key is already associated to its corresponding data set output column in BIRT. If you use the Data Explorer as a canvas, you can drag elements onto the canvas without having to reassociate the display keys for those elements. If you do not drag elements onto the canvas, you can use all the labels in the properties file on any report element. You use the labels in the properties file when you select a report element in the layout and navigate to the Localization
Properties section in the Properties tab of the Property Editor – Label tab. At run time, text that uses these keys is translated based on the current user's language.
If you need a label in your report that is not available from the starter report properties file, you can add keys and labels to the file. Key name is that it cannot begin with the [FIELD] special prefix. IBM TRIRIGA can translate any label that you create.
A BIRT report library can house reusable report elements, including labels. You create a properties file with the tririgalabels.properties extension and refer to that properties file as a library resource. To view an properties file for a BIRT report library, select the library in the BIRT navigator, and view the properties in the Property Editor – Library tab. To read the library, each BIRT report must reference the library before you export and upload the report to IBM TRIRIGA.
16
© Copyright IBM Corp. 2011, 2015
Subreports
You can build subreports into the top level of a report or put them in separate
.rptdesign
files.
For example, a report might show purchase order headers. For each header, a report can show line items for that particular purchase order. In this case, the purchase order line items are shown as a subreport of the purchase order header data.
You can build subreports into the .rptdesign file as the main report. A single report might show fiscal years and fiscal quarters, where fiscal years are the parent records and the report displays the fiscal quarters for each fiscal year.
Use the following guidelines for single reports: v A record ID is returned for each result of a parent data set.
v The child IBM TRIRIGA query filters results based on the parent record.
v The child data set takes a parent ID as a parameter. If BIRT sends a
system_parentRecordId
with a default value of 0, the IBM TRIRIGA system ignores it.
v In the report layout's child table, the data set Parameter Binding binds the parent record's ID to the child data set's input parameter.
You can build subreports into different .rptdesign files. For example, you can show all fiscal years in a single list that uses a hyperlink to take the user to the quarters for the selected year. In this case, the fiscal quarters is a separate
.rptdesign
file.
Use the following guidelines for separate report files: v At the top level of any compressed file that you import into IBM TRIRIGA, there must be at least one .rptdesign file. Any subreports in other .rptdesign files must be in a child directory.
v When you configure a hyperlink, the system__recordId from the top-level report must be bound to the system__parentRecordId report parameter of the subreport. An example of this includes fiscal years and fiscal quarters.
Custom functions
Custom functions assist you with particular use cases. The custom functions are in the TRIRIGA category of the BIRT Expression Builder.
The following table describes the custom functions:
Chapter 2. Advanced reporting in IBM TRIRIGA
17
Table 3. Custom functions. Custom functions
Name
formatNumber
Description
Uses IBM TRIRIGA to format a number.
Inputs Return
number - BigDecimal:
Number value to format
String: the formatted number.
unitOfMeasure -
TriResultUom: Unit of Measure that is used for formatting the number. Can use a NULL value if no
UOM is available, but must use the encodedBoFieldName input.
formatDate formatDateTime getProjectIdFor-
Record encodedBoFieldName
- String [optional]:
BO field from which this number came.
Use where applicable, because a field metadata can affect number formatting.
date - java.util.Date:
Date to format
String: the formatted date.
Uses IBM TRIRIGA to format a date.
Uses your preferred format that is specified in the user profile record.
Uses IBM TRIRIGA to format a datetime.
Uses your preferred format that is specified in the user profile record.
dateTime java.util.Date:
DateTime to format
Returns the record ID of the project that the record is in. Returns
NULL if the record is not in a project.
ID of the record.
Typically the
system__recordId
value of an IBM
TRIRIGA result record.
String: the formatted
DateTime.
Decimal: the ID of the project that the record is in.
getRootOrganizationId
Returns the record ID of the root organization.
N/A
N/A getCompany-LogoId Returns the ID of the company logo document.
getProjectLogoId Returns the ID of the current project's logo document.
getUserId Returns the ID of the currently signed-in user.
N/A
N/A
Decimal: the ID of
IBM TRIRIGA's root organization record.
Decimal: the ID of the company logo document.
Decimal: the ID of current project's logo document.
Decimal: the ID of the current user.
18
© Copyright IBM Corp. 2011, 2015
Table 3. Custom functions (continued). Custom functions
Name
getProjectId
Description
Returns the ID of the current project.
Returns NULL if the user is not currently in a project.
Inputs
N/A
Return
Decimal: the ID of current project.
Preview BIRT reports
You preview reports by using the Preview tab in the BIRT Report Designer. In the
BIRT application, you set values in the IBM TRIRIGA BIRT Preferences section to pass context from IBM TRIRIGA to a BIRT report during preview execution. You set the preference values when you specify the connection information to the IBM
TRIRIGA server.
You can pass the following types of context:
Current user
Set when you specify the IBM TRIRIGA app server, user name, and password field values.
Active project
Set when you specify the record ID of a particular project. The active project causes the preview to simulate execution within the context of the specified Capital project.
Input parameters
Prompted by the BIRT application. When you preview the report, the BIRT application prompts you for any input parameters that are defined on the report. Those values also serve as context to the report execution.
Exporting BIRT reports
You export BIRT reports back to IBM TRIRIGA so that the IBM TRIRIGA environment can use the reports.
Packaging BIRT reports
Before you export the BIRT report back to IBM TRIRIGA, you package the report as a .zip file.
Procedure
1.
In BIRT, right-click the report project and select Export.
2.
Expand the general folder, select Archive File, and select Next.
3.
Select Report Building.
4.
Select the .rptdesign and tririgalabels.properties files.
5.
In the To Archive File field, name the new .zip file and select the upload location.
6.
Select the options that you want to use.
7.
Select Finish.
Uploading reports to IBM TRIRIGA
You use the Document Manager to upload the packaged .zip file to IBM TRIRIGA.
Chapter 2. Advanced reporting in IBM TRIRIGA
19
Procedure
1.
In IBM TRIRIGA, open the Document Manager.
2.
Expand the IBM TRIRIGA folder.
3.
Select or create the upload folder. You can use a folder name that corresponds to the module of the starter report and IBM TRIRIGA query.
4.
Select New Document, select Browse, and select the BIRT report file.
5.
Specify a document name.
6.
Optional: Specify field values.
7.
Select Upload and select OK.
Report libraries
A report library is a BIRT construct that holds reusable components that you share across multiple reports.
You upload a report library in the same way you upload a report.
You upload the report libraries to the IBM TRIRIGA Document Management system and to the \ROOT\TRIRIGA\BIRT Libraries folder. If this folder structure does not exist in your system, create the folder.
The report library can be uploaded either as a single .rptlibrary file or as a .zip
file.
The name of the IBM TRIRIGA document must be the same as the name of the
.rtplibrary
file.
If the report library contains labels, the .rptlibrary file can reference a tririgalabels.properties
file that can have translatable labels.
Associating documents to IBM TRIRIGA
To make a BIRT report usable, you associate the IBM TRIRIGA document to an
IBM TRIRIGA access point. Access points are either a query report or form report.
Associating documents to query reports
You create an IBM TRIRIGA query as an external query. The query acts as a link to the BIRT .rpt file that you uploaded to the Document Manager. In the Document
Manager, you select the BIRT report. You can use the report in many places throughout IBM TRIRIGA, such as form sections and portal sections.
Procedure
1.
In IBM TRIRIGA, open the Report Manager.
2.
Select System Reports > New.
3.
Specify the information.
4.
Select Save and Close.
Associating documents to forms
You can use reports in many places in IBM TRIRIGA, such as form sections, portal sections, and the Reports tab.
About this task
To use a BIRT report in a form section, add the report to the Layout tab and the
Includes/Forms
tab of a form. In the Includes/Forms tab, associate the BIRT report
20
© Copyright IBM Corp. 2011, 2015
to the IBM TRIRIGA form. As a result, all the labels on the BIRT report can be exported for translation from the globalization manager.
Procedure
1.
In IBM TRIRIGA, go to the Form Builder and select General.
2.
Open the form for which you developed the form report.
3.
Optional: Revise the form.
4.
Select Layout and select Show Reports to ensure that the report appears in the
Reports
tab of a form.
5.
Select the Includes/Forms and select Add.
6.
Select the report file that you uploaded into the Document Manager and select
OK
.
7.
In the forms section, select the report file.
8.
Select Layout and select Publish.
Configuring bulk print actions after object migration
In the IBM TRIRIGA application, bulk print report actions use URLs that have hardcoded numerical document IDs. After you apply an object migration package, the document ID of a document can change, and the bulk print action no longer works. You can manually update each document ID and associate each document with the related form.
Configuring bulk print actions in maintenance forms
You can configure actions in maintenance forms for a bulk print.
Procedure
1.
Sign in to IBM TRIRIGA as an administrator.
2.
In the Document Manager, select TRIRIGA > Task.
3.
Right-click one of the documents in the following table and select Properties to get the document ID. Repeat this step for each document in the following table:
Document Name
Condition Assessment Work Task Record
(BIRT)
Bulk Print Action
Print Condition Assessment Work Task
Contract Review Record (BIRT)
Inspection Task Record (BIRT)
Material Order Task Record (BIRT)
Print Contract Review
Print Inspection Task
Inventory Count Work Task Record (BIRT)
Print Inventory Count Work Task
Inventory Pick Work Task Record (BIRT)
Print Inventory Pick Work Task
Key Work Task Record (BIRT)
Print Key Work Task
Print Material Order Task
Punchlist Task Record (BIRT)
Reserve Work Task Record (BIRT)
Schedule Task Record (BIRT)
Submittal Task Record (BIRT)
Work Task Record (BIRT)
Print Punchlist Task
Print Reserve Work Task
Print Schedule Task
Print Submittal Task
Print Work Task
4.
From the Tools menu, select Builder Tools > Form Builder.
Chapter 2. Advanced reporting in IBM TRIRIGA
21
5.
Select the triMaintenance module, select the triMaintenanceManager form, and revise the form.
6.
In the form navigation, select triSchedule > Work > My Tasks.
7.
Select the bulk print action. In the action properties, replace the old document
ID with the new document ID. Repeat this step for each action in the previous table.
8.
After you update all of the document ID values, publish the form.
9.
From the Tools menu, and select Builder Tools > Form Builder.
10.
Select the triTask module. Open a task form from the following table and revise the form.
11.
Select Includes/Forms and in the forms section, select Add. Locate the document and publish the form. Repeat this step for each form in the following table.
Task Form triConditionAssessmentWorkTask triContractReviewTask triInventoryCountWorkTask triInventoryPickWorkTask triKeyWorkTask triMaterialOrderTask triPunchlistTask triReserveWorkTask triScheduleTask triSubmittalTask triWorkTask
Document Name
Condition Assessment Work Task Record
(BIRT)
Contract Review Record (BIRT)
Inventory Count Work Task Record (BIRT)
Inventory Pick Work Task Record (BIRT)
Key Work Task Record (BIRT)
Material Order Task Record (BIRT)
Punchlist Task Record (BIRT)
Reserve Work Task Record (BIRT)
Schedule Task Record (BIRT)
Submittal Task Record (BIRT)
Work Task Record (BIRT)
Configuring bulk print actions in invoice forms
You can manually configure bulk print actions in invoice forms.
Procedure
1.
Sign in to the IBM TRIRIGA application as an administrator.
2.
In the Document Manager, navigate to TRIRIGA > Contract.
3.
Right-click a document from the following table, and select Properties to get the document ID. Repeat this step for each document in the following table:
Document Name Bulk Print Action
Asset Invoice Summary Bulk Print (BIRT)
Bulk Print Asset Invoices
RE Invoice Summary Bulk Print (BIRT)
Bulk Print RE Invoices
4.
From the Tools menu, select Builder Tools > Form Builder.
5.
Go to the triPayment module, select the triProcessInvoices, and revise the form.
6.
In the form navigation, select triGeneral > AR Invoices.
7.
In the AR invoices properties, select one of the bulk print actions. In the action properties, replace the old document ID with the new document ID. Repeat this step for each action in the previous table.
22
© Copyright IBM Corp. 2011, 2015
8.
After you update all of the document ID values, publish the form.
9.
Go to the Tools menu and select Builder Tools > Form Builder.
10.
Select the triPayment module. Open an invoice form from the following table and revise the form.
11.
Select Includes/Forms and in the forms section, select Add. Locate the document and publish the form. Repeat this step for each form in the following table:
Invoice Form triAssetInvoice triREInvoice
Document Name
Asset Invoice Summary Bulk Print (BIRT)
RE Invoice Summary Bulk Print (BIRT)
Report maintenance
You can change existing reports that do not involve data sets and you can change existing reports that do involve data sets.
Modifying reports without data set changes
To modify a BIRT report that does not involve data set changes, you use the
Document Manager to retrieve the report file, change the file, and reimport the report file.
Procedure
1.
In the Document Manager, select the file, specify a comment, and select Check
Out
.
2.
Create a starter report in IBM TRIRIGA and import the starter report into BIRT.
3.
Make any needed changes to the report and save the file. If you change a standard BIRT report, rename the report before you load it into the Document
Manager to protect your customized version in the case of an IBM TRIRIGA upgrade.
4.
Upload the file back into the Document Manager.
Modifying reports with data set changes
Use the Document Manager to retrieve the report file, change the report file, and reimport the report file.
Procedure
1.
Generate a starter report that is based on the same model that you used for the existing BIRT report.
2.
Do one of the following options:
Options
Select updates from script-data-set elements
Replace the script-data-set elements
Modifying reports with data set changes
Select the updates to include from the script-data-set elements in the current BIRT report and in the new .rtpdesign file.
Replace the script-data-set elements of the current .rptdesign file with the new script-data-set elements that are generated in the new .rptdesign file. Import the starter report into a project, copy the data set from the new starter report, and paste it in the data sets of the existing .rptdesign file.
Chapter 2. Advanced reporting in IBM TRIRIGA
23
What to do next
If you add fields or user filters to the IBM TRIRIGA query, you must also change the report. After you update the data set, if that data set is used to join inside
BIRT, you must rejoin the data set, and rebind the elements in the BIRT report.
Filter operators
The values for filter operators depend on the field type of the selected field.
The following table lists and describes the values that you can use:
Table 4. Filter operators. Field operators
Operator
After
Before
Description
Available for date, date and time, and time fields. If the value of the specified field is after the specified value, it is true
Available for date, date and time, and time fields. If the value of the specified field is before the specified value, it is true,
Contains
Does Not Contain – Case
Sensitive
End With
Available for Text, UOM, and Boolean fields. If the value of the specified field contains the specified value, it is true.
Contains – Case Sensitive Available for Text, UOM, and Boolean fields. If the value of the specified field contains the specified value, case-sensitivity included, it is true.
Does Not Contain Available for Text, UOM, and Boolean fields. If the value of the specified field does not contain the specified value, it is true.
Available for Text, UOM, and Boolean fields. If the value of the specified field does not contain the specified value, case-sensitivity included, it is true
Available for Text, UOM, and Boolean fields. If the value of the specified field ends with the specified value, it is true.
End With - Case Sensitive Available for Text, UOM, and Boolean fields. If the value of the specified field ends with the specified value and it is case-sensitive, it is true.
Equals If the value of the specified field is equal to the specified value, it is true.
In
Less Than
If the value of the specified field is one of the specified values, it is true. For string and numeric values, the specified values should be comma-separated literal values that are wrapped in single quotation marks, for example: 'Tom','Jerry','Paul','1','2','3'.
Available for number fields. If the value of the specified field is less than the specified value, it is true.
Less Than or Equals
More Than
More Than or Equals
Not Equals
Available for number, date, date and time, and time fields. If the value of the specified field is less than or equal to the specified value, it is true.
Available for number fields. If the value of the specified field is greater than the specified value, it is true.
Available for number, date, date and time, and time fields. If the value of the specified field is greater than or equal to the specified value, it is true.
If the value of the specified field is not equal to the specified value, it is true.
24
© Copyright IBM Corp. 2011, 2015
Table 4. Filter operators (continued). Field operators
Operator
Not In
Description
If the value of the specified field is not one of the specified values, it is true. For string and numeric values, the specified values should be comma-separated literal values that are wrapped in single quotation marks. For example:
'Tom','Jerry','Paul','1','2','3'.
Start With Available for Text, UOM, and Boolean fields. If the value of the specified field begins with the specified value, it is true.
Start With - Case Sensitive Available for Text, UOM, and Boolean fields. If the value of the specified field begins with the specified value and it is case-sensitive, it is true.
If you have query that is used in a locator field or a smart section and you notice that autocomplete takes a long time to run, consider changing the filter Operator from contains to
starts with.
Special values
In addition to using numbers and text in the Value field, you can use special values.
The preceding special values can be followed by a + or - and a whole number. For example, $$TODAY$$+1 is tomorrow, $$THISWEEK$$-1 is last week, and
$$THISYEAR$$+5 is five years after the current year. The following table lists and describes the special values:
Table 5. Special values that can be followed by a + or a -.. Special values
Value
$$TODAY$$
Description
Used to compare a date to the current date.
For example, if you do not want to show training courses that were in the past, specify: General::Start Date After
$$TODAY$$
$$THISWEEK$$ Used to compare a date to the current week.
For example, to see training courses that start in the current week, specify:
$$THISMONTH$$
$$THISYEAR$$
General::Start Date Equals $$THISWEEK$$
Used to compare a date to the current month.
Used to compare a date to the current year.
The following table lists and describes more the special values:
Chapter 2. Advanced reporting in IBM TRIRIGA
25
Table 6. Special Values. Special values
Value
$$RUNTIME$$
$$USERID$$
$$USERID::SectionName::FieldName$$
$$PERSONID$$
$$PARENT::SectionName$$
Description
The $$RUNTIME$$ special value allows the user to specify a value for the filter when the report is run. If the user does not specify a value, the filter is ignored.
The $$RUNTIME$$ special value works well with most data types and comparison operators. However, for text data, the
$$RUNTIME$$ special value works with the
Contains operator.
Instead of using the $$RUNTIME$$ special value, you can identify fields for user input by selecting the User check box in the
Filters
tab.
The $$USERID$$ special value is a valid field filter in queries.
The $$USERID::SectionName::FieldName$$ special value is a valid filter in queries.
Setting the value field to the
$$USERID::SectionName::FieldName$$ special value indicates that a value is compared with the field name FieldName in the
SectionName section of the record.
The $$PERSONID$$ special value is a valid field filter in queries. When the
$$PERSONID$$ special value is used, it resolves to the smart object ID of the person that is associated to the current user. If the current user is not associated to a person, an error is displayed.
Similar to the $$USERID$$ special value, it supports section and field access. The following example is a valid notation to resolve the first name of the current person:
$$PERSONID::Detail::triFirstNameTX$$
.
The $$PARENT::SectionName$$ special value is a valid field filter in queries. Setting the
Value field to the $$PARENT::SectionName$$ special value indicates that a value is compared with the SectionName section of the record that contains the query section or smart section.
26
© Copyright IBM Corp. 2011, 2015
Table 6. Special Values (continued). Special values
Value
$$PARENT::SectionName ::FieldName$$
Description
You can indicate a filter that compares a value in the record that is filtered with a value in the record that contains the smart section.
To indicate that a value is compared with the FieldName field in the SectionName section of the record that contains the query section or smart section, use the following value field:
$$PARENT::SectionName::FieldName$$ .
If the value of the $$PARENT special value is empty, it resolves to an IS NULL criteria.
Special names in the record field
In the record field, you can use special names to filter for an association with special records.
The value of a record or query field must be the same as the name of the other query. If the value of the filter type field is query, set the appropriate record or query.
If the value of the filter type field is record, the value of the record or query field determines whether the association that the filter requires is directly with the context record, with another record that is associated with the context record, or an unassociated record.
The following table contains special names for the record field:
Table 7. Special names in the record field
Value
$$USERID$$
$$PERSONID$$
$$RECORDID$$
Description
When the query is run, the $$USERID$$ value resolves to the record ID of the user that started the query.
When the query is run, the $$PERSONID$$ value resolves to the record ID of the People record that is associated with the user who started the query.
Useful for queries that are used in the query sections and for the find action queries for data sections. Queries that are used in query sections and find queries are often required to return only records that are associated with the record that contains the section.
When you set the record field to the $$RECORDID$$ value, if the top-level records are associated directly with the context record, then the top-level records pass this filter.
Chapter 2. Advanced reporting in IBM TRIRIGA
27
Table 7. Special names in the record field (continued)
Value
$$GROUPID$$
Description
If you set the record field to the $$GROUPID$$ value, if the top-level records are associated with a record that represents a group that the user is a member of, then the top-level records pass the filter.
$$PROJECTID$$
$$PARENT$$
If the record field is set to the $$GROUPID$$ value, the Module field is set to Group and the Business
Object field is set to All.
When you set the record field to the
$$PROJECTID$$ value and if the top-level records are associated with a record that represents the active project, then the top-level records pass the filter.
If the record field is set to $$PROJECTID$$, the
Module field is set to triProject and the Business
Object field is set to All.
Projects in IBM TRIRIGA provide a way to classify data for relevance to the tasks on which people work.
Use $$PARENT$$ to specify that top-level records pass this filter if they are associated with a record that has a direct or indirect association with the context record. It works by specifying a path from the context record to another record through record sections or locator fields.
For example, if a context record is an employee record, the report should include employee records for employees who have the same supervisor as the context record.
To specify a filter, use the employee records that have a locator field that is named triReportsToTX that references the record that corresponds to an employee’s supervisor. If triReportsToTX is in the general section, the value of the record field is
$$PARENT::General::triReportsToTX$$
.
$$PARENT::SECTIONNAME$$
$$PARENT::SECTIONNAME::FIELDNAME$$
$$ORGANIZATIONID$$
If the reference was a smart section, the value of the record field would be
$$PARENT::triReportsTo$$ .
If the value of $$PARENT$$ is empty, it resolves to an IS NULL criteria.
Use to filter a find section based on values in another section. PARENT is always the word
PARENT. SECTIONNAME is the name of the section that contains the values that you want to filter.
Make sure that you use the name and not the label of the section.
Used to filter a find section based on the value of a field in another section. PARENT is always the word PARENT. SECTIONNAME is the name of the section that contains the field that you want to filter. FIELDNAME is the name of the field by which you want to filter. Make sure that you use the name and not the label of the section and field.
Used to filter a portal query section based on the organizations of the user who is logged in.
28
© Copyright IBM Corp. 2011, 2015
Table 7. Special names in the record field (continued)
Value
$$ORGANIZATIONIDWITHCHILDREN$$
$$GEOGRAPHYID$$
$$GEOGRAPHYIDWITHCHILDREN$$
Description
Used to filter a portal query section based on the organizations, including all dependent child organizations, of the user who is logged in.
Used to filter a portal query section based on the geography of the user who is logged in.
Used to filter a portal query section based on the geography and all child geographies of the user who is logged in.
Chapter 2. Advanced reporting in IBM TRIRIGA
29
30
© Copyright IBM Corp. 2011, 2015
Λήψη
Διαφήμιση