Home > Cloud Cruiser 4 > Administering > Managing reports > Creating custom reports > Report properties and parameters

Report properties and parameters

Report properties

You can define the following properties in the .jrxml file of your report. All property names are prefaced with com.cloudcruiser.report.

Property name Description
call_procedure

Use the call_procedure property to call a Cloud Cruiser stored procedure, which retrieves data from the Cloud Cruiser database. The expected format of this value is procedure_name:param1 , param2 , paramN. For example, the following property declaration indicates that the report will use the sp_test stored procedure with values from the resourceGroupID and resourceID parameters:

<property name="com.cloudcruiser.report.call_procedure" value="sp_test:resourceGroupID,resourceID"/>

Note that for these values to be supplied to the report server and the report, and for the user to be prompted for values, you must also add properties to the specified parameters themselves.

collect_standard_params

Indicates that the initial report launch page should collect some input values from the user and provide one or more values for each known parameter to the report server for generation. The value of this property should specify the name of a predefined set of standard parameters. Currently, only one such set has been defined which provides the UserGroupID parameter: standard_set_1.

<property name="com.cloudcruiser.report.collect_standard_params" value="standard_set_1"/>
group

Defines the report group in which the report should be listed. The value should be the group name (key) not the title of a group in the system.

<property name="com.cloudcruiser.report.group" value="Invoices"/>

If this property is not included, or the value does not refer to a valid group name, when imported the report will be filed under the default group. (The report group definition table contains a default_flag column which defines which group in the system is default.)

is_drilldown

Indicates that the report is only actually referenced by other reports and should not be displayed as a top-level report in the Reports tree.

<property name="com.cloudcruiser.report.is_drilldown" value="true"/>

If this property is not included, or the value is not true, Cloud Cruiser assumes that the report is a top-level report and should be displayed in the reports tree.

restricted

By default, all reports are loaded for the administrator role only. This is a precaution intended to prevent accidental distribution of potentially sensitive information to non-administrator users. When an administrator determines that the report is safe for non-administrators to view, they may change this property to the report with a value of false and reload the report. It will then be visible to all users to run.

<property name="com.cloudcruiser.report.restricted" value="true"/>

Note that a value of true is same as the default behavior of not supplying the property at all: it is loaded for administrators only.

view_type

This defines the designed report type. Some reports are intended to be exported/viewed to a specific format, as opposed to being viewed in Cloud Cruiser, and then exported to some file type determined by the user.

<property name="com.cloudcruiser.report.view_type" value="HTML"/>

If this property is not included, or the value is not XLS, PDF, or HTML when imported, the report is defined as HTML.

Parameter properties

Parameter names are referenced in the report .properties file to give the parameter a field label and a description (when the user mouses over the field). Those lines are formatted as:

com.cloudcruiser.param.<parameter_name>.label=<label>
com.cloudcruiser.param.<parameter_name>.description=<description>

For simplicity, when defining a parameter property in the report's .jrxml file, use the syntax shown in the table. For example, the syntax example for the account_level property shows that it is embedded in a parameter named inAccountLevel. That parameter is referenced by name in the reports .properties file in the following lines:

com.cloudcruiser.param.inAccountLevel.label=Account Level
com.cloudcruiser.param.inAccountLevel.description=Select the account level you wish to use for this report

If you want to use a different value for a parameter's name attribute, note that the name must begin with in, and it must be referenced properly in the report's .properties file. 

The following table describes the parameter properties you can define in the .jrxml file of your report. All parameter property names are prefaced with com.cloudcruiser.param.

Property name Description
account

The account property loads a dropdown list box with valid accounts based on the account selection level for the group of the currently logged in user. The value of the selection is the account ID of the selected account.

<parameter name="inAccountID" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.account" value=""/>
</parameter>
account_level

The account_level property loads a drop-down list box with valid account levels based on the current account structure selection. The value of the selection is the numeric ID of the selected account level.

<parameter name="inAccountLevel" class="java.lang.String">
   <property name="com.cloudcruiser.param.account_level" value="All=0"/>
</parameter>
account_structure

The account_structure property loads a drop-down list box with all account structures. The value of the selection is the numeric ID of the selected account structure. Note that if there is only one account structure configured in the system, the drop-down list box does not appear at all. However, the ID of the sole account structure is used as the value for this property.

<parameter name="inAccountStructure" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.account_structure" value=""/>
</parameter>
accounting_day

The accounting_day property loads a dropdown list box populated with 1-31. The value of the selected day is formatted as displayed.

<parameter name="inAccountingDay" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.accounting_day" value=""/>
</parameter>
accounting_period

The accounting_period property loads a dropdown list box populated with 12 numbered periods for the year (1-12). The value of the selected period is as displayed.

<parameter name="inAccountingPeriod" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.accounting_period" value=""/>
</parameter>
accounting_year

The accounting_year property loads a dropdown list box populated with the last 25 years. The value of the selected year is formatted as displayed.

<parameter name="inAccountingYear" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.accounting_year" value=""/>
</parameter>
checkbox

The checkbox property displays a checkbox. The value sent to the report is 1 if selected or 0 if not selected.

<parameter name="inBoolean" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.checkbox" value=""/>
</parameter>
date

The date property loads a date control for the user to specify a date. The value of the date is formatted as YYYY-MM-DD.

<parameter name="inDate" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.date" value=""/>
</parameter>
identifier

The identifier property loads a dropdown list box with valid identifiers for the user to select. The value of the selection is the identifier number of the selected identifier.

<parameter name="inIdentifier" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.identifier" value=""/>
</parameter>
list

The list property displays a dropdown list box loaded with values that the user specifies. The value attribute of this property should include a comma-delimited list of valid values with which to populate the list box. The value sent to the report is the text of the item selected, exactly as specified by the report designer.

<parameter name="inColor" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.list" value="Blue,Red,Green,Purple">
</parameter>
month

The month property loads a dropdown list box populated with each month of the year. The value of the selected month is formatted as MM.

<parameter name="inMonth" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.month" value=""/>
</parameter>
number

The number property displays a number entry box (spinner) for the user to specify a whole number. The value sent to the report is the number value specified by the user.

<parameter name="inNumber" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.number" value=""/>
</parameter>
resource

The resource property loads a dropdown list box with valid resources for the user to select. The value of the selection is the resource ID of the selected resource.

<parameter name="inResourceID" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.resource" value=""/>
</parameter>
resource_group

The resource_group property loads a dropdown list box with valid resource groups for the user to select. The value of the selection is the resource group ID of the selected group.

<parameter name="inResourceGroupID" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.resource_group" value=""/
</parameter>
text

The text property displays a text box for the user to enter in free-form text. The value sent to the report is the exact text value entered.

<parameter name="inText" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.text" value=""/>
</parameter>
year

The year property loads a dropdown list box populated with the last 25 years. The value of the selected year is formatted as YYYY.

<parameter name="inYear" class="java.lang.String" isForPrompting="true">
   <property name="com.cloudcruiser.param.year" value=""/>
</parameter>

Custom parameters

Some reports might require input for parameters that are not included in a standard set defined by Cloud Cruiser. In this case, Cloud Cruiser provides some properties which can be specified for parameters at report design time to collect input from the user when the report is launched. All custom properties supply a single, named parameter to the report server as defined by the user.

The attribute isForPrompting is a Jasper-defined attribute which must be set to true for Cloud Cruiser to inspect the parameter's properties.

<parameter name="TopN" class="java.lang.String" isForPrompting="true">
  <property name="com.cloudcruiser.param.text" value=""/>
</parameter>

If this value is not set is false , this parameter will not be scanned for inclusion in the list of parameters for which to prompt the user. Note that for every report parameter that specifies isForPrompting=true and a valid Cloud Cruiser parameter property, Cloud Cruiser looks for two specific entries in the .properties file for locale-based prompt label and description of that parameter:

com.cloudcruiser.param.<parameterName>.label
com.cloudcruiser.param.<parameterName>.description

If either resource is not found in the .properties file, the value defaults to the parameter name. For example, for the parameter declaration below:

<parameter name="MyString" class="java.lang.String" isForPrompting="true">
  <property name="com.cloudcruiser.param.text" value=""/>
</parameter>

Cloud Cruiser looks for the following keys in the .properties file:

com.cloudcruiser.param.MyString.label
com.cloudcruiser.param.MyString.description

If not found in the .properties file, Cloud Cruiser defaults each value to MyString.

Using properties for report localization

You can use .properties files to localize your reports. In addition to the primary .properties file, you can create locale-specific files that are used for locales and regions other than en-US.

You must always maintain the primary report .properties file, which is used by default when a locale-specific .properties file cannot be found.

Each report must have an associated .properties file with the following name, where <report_name> is the same name as the report .jrxml file, <locale> is the locale identifier, and <region> is the specific region for that locale: <report_name>_<locale>_<region>.properties.

The <report_name>.properties file can contain a multiple of entries used for strings used in the associated report. At minimum, you must set two properties to facilitate an localize-able reporting system:

  • com.cloudcruiser.report.default_title--The default title of the report. When the report is initially loaded, this title is set for the report.
  • com.cloudcruiser.report.description--The local string of the description of the report. This is shown in Cloud Cruiser as a tooltip, for example, when the user is choosing which report to run.

For example, if the name of the report is InvoiceDetail01 , and you want a Spanish localization for Mexico, you would create the following .properties files:

InvoiceDetail01.properties

com.cloudcruiser.report.title=Invoice Detail
com.cloudcruiser.report.description=This report shows all rate and cost data for a specified account number
rateString=Rate
costString=Cost

InvoiceDetail01_es_MX.properties

com.cloudcruiser.report.title=Detalle de factura
com.cloudcruiser.report.description=Este informe muestra todos los tipo de datos sobre el coste de una cuenta de un número especificado
costString=Costo
rateString=Tipo
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP