Implementation Guide for Oracle Billing Insight > Using the Reporting Engine > Components Used by the Reporting Engine >

Predefined Context Variables


When you call the IReportActionHelper.execute() method to generate reports, the Reporting Engine puts a list of predefined context variables into the report context, which are then available to the Velocity template.

Table 53 lists some of the variables that you can use. If the overwrite flag is Y, then you can pass a variable with the same name through ReportContext to overwrite the default values set by ReportActionHelper.

Table 53. Predefined Context Variables
Name
Type
Over write?
Description

form

Action Form

No

This is the struts Action Bean object currently being processed.

gifDir

String

Yes

The directory where the image files used by report are saved, for example, the paging arrow images. The default is _assets/images.

link

String

No

This is the URL link base of this page and it is equivalent to the html <base> tag. The default value is:

HttpServletRequest.getContextPath() + HttpServletRequest.getServletPath()

The URL is similar to

http://host:port/<web-root>/report.action

user

IUser of UMF

Yes

The current user logged in. The IUser object is passed as a session variable, USER_PROFILE. If the object is not in the session, then Oracle Billing Insight does not put it in the context. The user variable is for query purposes only and its absence does not affect the functionality of the reporting. For example, for some reason, you might not use UMF IUser and you can use your own user object.

NOTE:  Some templates, like report_header.vm, might expect IUser to get the user name and if you do not supply IUser, then the template might not display the user name properly.

contact Profile

IContactProfile of UMF

Yes

The contactProfile is a profile of IUser named as contact_profile. Oracle Billing Insight uses it to retrieve the user's first name and last name and is currently only used in report_header.vm. The absence of this information does not affect the function of Reporting Engine.

locale

String

Yes

The default value set by ReportActionHelper is the from http session: session.getAttribute("org.apache.struts.action.LOCALE").

NOTE:  This locale is put into session by the Struts framework.

reportId

String

No

The report ID of current report.

transformer

ITransformer

No

You can use transformer object to do work such as formatting data.

Never call ITransformer.writeTemplate() in the template.

reportConfig

IReportConfig

No

Represents the report configuration.

dataSourceConfig

IDataSourceConfig

No

Represents the data source configuration.

dataSource ColumnConfigs

A list of IDataSource ColumnConfig

No

Represents the list of data source column configurations.

transformerConfigs

ITransformerConfig

No

Represents the transformer configuration.

 

transformer ColumnConfigs

A list of ITransformer ColumnConfig

No

Represents the list of transformer column configurations.

operationGroup Configs

A list of IOperation GourpConfig

No

Represents the list of operation groups defined inside calculator for the transformer.

chartConfigs

A list of IChartConfig

No

Represents the list of chart configurations for the transformer.

templateConfigs

A list of ITemplateConfig

No

Represents the list of template configurations for the transformer.

rowlist

IReportList

No

Represents the original data retrieved from the data source. The data could be sorted and so the order could be changed. Though you cannot overwrite this variable, you can certainly change the content of the list.

groupSet

Set

No

To support grouping, the transformer maintains a Map of List objects. In the case of no grouping, there is only one entry in the map, the key is the report name, and the value is the List returned from data source. In the case of grouping, the original list from the data source is regrouped into multiple lists. Each list has the same group value, and the group value becomes the map key. This variable is looped through in report_body.vm to build the HTML table.

dataMap

Map

No

This is the map of group keys to the List as described previously.

reportContext

ReportContext

No

The ReportContext object used to generate reports.

NOTE:  Note: You cannot overwrite reportContext, but you can change the content.

URLEncoder

URLEncoder

No

This is a wrapper class around java.net.URLEncoder, because Velocity cannot invoke a static method directly through class name, and java.net.URLEncoder does not have a constructor. Use this class to encode the parameter values you passed through the URL.

Implementation Guide for Oracle Billing Insight Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.