Tuesday, April 10, 2012

BIRT: Dynamically Hiding/Showing Table Columns in a Report Design

This question gets asked quite often in the BIRT Exchange Forums. How can I dynamically show/hide columns in a table based on user input/some object property.

The first inclination is to try to dynamically build the table on the fly. This is an often time consuming and cumbersome way of approaching the problem, and will more often than not cause unforeseen errors. The easiest approach is to just have the table display normally, and hide the column using Visibility Expressions.

So for example, I have a table that displays Customer information. I want to give the user the ability to show/hide columns that they want displayed in their reports.

1. Select the table in the report

2. Select a column

3. In the Property Editor, select Visibility Expression.

4. Check the Hide Element option.
5. Enter an expression that will return True when the column should be hidden.


In my case, I have a function defined globally that will check for the existence of a keyed value in a global map. This map gets set in the reports beforeFactory event. Realistically, you would just test the report parameters value, but I am demonstrating this from objects instead of report parameters.

The example report is below. In it, if you check/uncheck a parameter, it will show or hide that field in the table.

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 3.7.1.v20110905 Build &lt;3.7.1.v20110905-1820></property>
<property name="units">in</property>
<method name="initialize"><![CDATA[//
//Predefined function to help check if a field is set to be hidden in the map
//
function checkField(fieldToCheck)
{
//make sure the global variable is not null
if (reportContext.getGlobalVariable("hideMap") != null)
{
//get the appropriate field. If this is set, then we know this is set and
//we can return true. Otherwise return false, meaning we want to show the field.
if (reportContext.getGlobalVariable("hideMap").get(fieldToCheck) != null)
{
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}

]]></method>
<method name="beforeFactory"><![CDATA[//initialize the global variable
reportContext.setGlobalVariable("hideMap", new Packages.java.util.HashMap());

//set the appropriate values in the global HashMap based on if it is set in the report parameter
if (params["ShowCustomerNumber"].value == false)
{
reportContext.getGlobalVariable("hideMap").put("CUSTOMERNUMBER", Boolean.TRUE);
}

if (params["ShowCustomerName"].value == false)
{
reportContext.getGlobalVariable("hideMap").put("CUSTOMERNAME", Boolean.TRUE);
}

if (params["ShowCONTACTLASTNAME"].value == false)
{
reportContext.getGlobalVariable("hideMap").put("CONTACTLASTNAME", Boolean.TRUE);
}

if (params["ShowCONTACTFIRSTNAME"].value == false)
{
reportContext.getGlobalVariable("hideMap").put("CONTACTFIRSTNAME", Boolean.TRUE);
}

if (params["ShowPHONE"].value == false)
{
reportContext.getGlobalVariable("hideMap").put("PHONE", Boolean.TRUE);
}

if (params["ShowADDRESSLINE1"].value == false)
{
reportContext.getGlobalVariable("hideMap").put("ADDRESSLINE1", Boolean.TRUE);
}

if (params["ShowCITY"].value == false)
{
reportContext.getGlobalVariable("hideMap").put("CITY", Boolean.TRUE);
}

if (params["ShowSTATE"].value == false)
{
reportContext.getGlobalVariable("hideMap").put("STATE", Boolean.TRUE);
}

if (params["ShowPOSTALCODE"].value == false)
{
reportContext.getGlobalVariable("hideMap").put("POSTALCODE", Boolean.TRUE);
}]]></method>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<parameters>
<scalar-parameter name="ShowCustomerNumber" id="91">
<text-property name="promptText">Uncheck to hide field CustomerNumber</text-property>
<property name="valueType">static</property>
<property name="dataType">boolean</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">True</value>
</simple-property-list>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">check-box</property>
<structure name="format"/>
</scalar-parameter>
<scalar-parameter name="ShowCustomerName" id="92">
<text-property name="promptText">Uncheck to hide field CustomerName</text-property>
<property name="valueType">static</property>
<property name="dataType">boolean</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">True</value>
</simple-property-list>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">check-box</property>
<structure name="format"/>
</scalar-parameter>
<scalar-parameter name="ShowCONTACTLASTNAME" id="93">
<text-property name="promptText">Uncheck to hide field CONTACTLASTNAME</text-property>
<property name="valueType">static</property>
<property name="dataType">boolean</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">True</value>
</simple-property-list>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">check-box</property>
<structure name="format"/>
</scalar-parameter>
<scalar-parameter name="ShowCONTACTFIRSTNAME" id="94">
<text-property name="promptText">Uncheck to hide field CONTACTFIRSTNAME</text-property>
<property name="valueType">static</property>
<property name="dataType">boolean</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">True</value>
</simple-property-list>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">check-box</property>
<structure name="format"/>
</scalar-parameter>
<scalar-parameter name="ShowPHONE" id="95">
<text-property name="promptText">Uncheck to hide field PHONE</text-property>
<property name="valueType">static</property>
<property name="dataType">boolean</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">True</value>
</simple-property-list>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">check-box</property>
<structure name="format"/>
</scalar-parameter>
<scalar-parameter name="ShowADDRESSLINE1" id="96">
<text-property name="promptText">Uncheck to hide field ADDRESSLINE1</text-property>
<property name="valueType">static</property>
<property name="dataType">boolean</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">True</value>
</simple-property-list>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">check-box</property>
<structure name="format"/>
</scalar-parameter>
<scalar-parameter name="ShowCITY" id="97">
<text-property name="promptText">Uncheck to hide field CITY</text-property>
<property name="valueType">static</property>
<property name="dataType">boolean</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">True</value>
</simple-property-list>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">check-box</property>
<structure name="format"/>
</scalar-parameter>
<scalar-parameter name="ShowSTATE" id="98">
<text-property name="promptText">Uncheck to hide field STATE</text-property>
<property name="valueType">static</property>
<property name="dataType">boolean</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">True</value>
</simple-property-list>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">check-box</property>
<structure name="format"/>
</scalar-parameter>
<scalar-parameter name="ShowPOSTALCODE" id="99">
<text-property name="promptText">Uncheck to hide field POSTALCODE</text-property>
<property name="valueType">static</property>
<property name="dataType">boolean</property>
<property name="distinct">true</property>
<simple-property-list name="defaultValue">
<value type="constant">True</value>
</simple-property-list>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">check-box</property>
<structure name="format"/>
</scalar-parameter>
</parameters>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source" id="7">
<list-property name="privateDriverProperties">
<ex-property>
<name>contentBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
<ex-property>
<name>metadataBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
</list-property>
<property name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver</property>
<property name="odaURL">jdbc:classicmodels:sampledb</property>
<property name="odaUser">ClassicModels</property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="setGetCustomers" id="8">
<list-property name="columnHints">
<structure>
<property name="columnName">CUSTOMERNUMBER</property>
<property name="analysis">measure</property>
<text-property name="displayName">CUSTOMERNUMBER</text-property>
<text-property name="heading">CUSTOMERNUMBER</text-property>
</structure>
<structure>
<property name="columnName">CUSTOMERNAME</property>
<property name="analysis">attribute</property>
<text-property name="displayName">CUSTOMERNAME</text-property>
<text-property name="heading">CUSTOMERNAME</text-property>
</structure>
<structure>
<property name="columnName">CONTACTLASTNAME</property>
<property name="analysis">attribute</property>
<text-property name="displayName">CONTACTLASTNAME</text-property>
<text-property name="heading">CONTACTLASTNAME</text-property>
</structure>
<structure>
<property name="columnName">CONTACTFIRSTNAME</property>
<property name="analysis">attribute</property>
<text-property name="displayName">CONTACTFIRSTNAME</text-property>
<text-property name="heading">CONTACTFIRSTNAME</text-property>
</structure>
<structure>
<property name="columnName">PHONE</property>
<property name="analysis">attribute</property>
<text-property name="displayName">PHONE</text-property>
<text-property name="heading">PHONE</text-property>
</structure>
<structure>
<property name="columnName">ADDRESSLINE1</property>
<property name="analysis">attribute</property>
<text-property name="displayName">ADDRESSLINE1</text-property>
<text-property name="heading">ADDRESSLINE1</text-property>
</structure>
<structure>
<property name="columnName">ADDRESSLINE2</property>
<property name="analysis">attribute</property>
<text-property name="displayName">ADDRESSLINE2</text-property>
<text-property name="heading">ADDRESSLINE2</text-property>
</structure>
<structure>
<property name="columnName">CITY</property>
<property name="analysis">attribute</property>
<text-property name="displayName">CITY</text-property>
<text-property name="heading">CITY</text-property>
</structure>
<structure>
<property name="columnName">STATE</property>
<property name="analysis">attribute</property>
<text-property name="displayName">STATE</text-property>
<text-property name="heading">STATE</text-property>
</structure>
<structure>
<property name="columnName">POSTALCODE</property>
<property name="analysis">attribute</property>
<text-property name="displayName">POSTALCODE</text-property>
<text-property name="heading">POSTALCODE</text-property>
</structure>
<structure>
<property name="columnName">COUNTRY</property>
<property name="analysis">attribute</property>
<text-property name="displayName">COUNTRY</text-property>
<text-property name="heading">COUNTRY</text-property>
</structure>
<structure>
<property name="columnName">SALESREPEMPLOYEENUMBER</property>
<property name="analysis">measure</property>
<text-property name="displayName">SALESREPEMPLOYEENUMBER</text-property>
<text-property name="heading">SALESREPEMPLOYEENUMBER</text-property>
</structure>
<structure>
<property name="columnName">CREDITLIMIT</property>
<property name="analysis">measure</property>
<text-property name="displayName">CREDITLIMIT</text-property>
<text-property name="heading">CREDITLIMIT</text-property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">CUSTOMERNAME</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">CONTACTLASTNAME</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">CONTACTFIRSTNAME</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">PHONE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">ADDRESSLINE1</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">ADDRESSLINE2</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">8</property>
<property name="name">CITY</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">9</property>
<property name="name">STATE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">10</property>
<property name="name">POSTALCODE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">11</property>
<property name="name">COUNTRY</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">12</property>
<property name="name">SALESREPEMPLOYEENUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">13</property>
<property name="name">CREDITLIMIT</property>
<property name="dataType">float</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="nativeName">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">CUSTOMERNAME</property>
<property name="nativeName">CUSTOMERNAME</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">CONTACTLASTNAME</property>
<property name="nativeName">CONTACTLASTNAME</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">CONTACTFIRSTNAME</property>
<property name="nativeName">CONTACTFIRSTNAME</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">PHONE</property>
<property name="nativeName">PHONE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">ADDRESSLINE1</property>
<property name="nativeName">ADDRESSLINE1</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">ADDRESSLINE2</property>
<property name="nativeName">ADDRESSLINE2</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">8</property>
<property name="name">CITY</property>
<property name="nativeName">CITY</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">9</property>
<property name="name">STATE</property>
<property name="nativeName">STATE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">10</property>
<property name="name">POSTALCODE</property>
<property name="nativeName">POSTALCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">11</property>
<property name="name">COUNTRY</property>
<property name="nativeName">COUNTRY</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">12</property>
<property name="name">SALESREPEMPLOYEENUMBER</property>
<property name="nativeName">SALESREPEMPLOYEENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">13</property>
<property name="name">CREDITLIMIT</property>
<property name="nativeName">CREDITLIMIT</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select *
from CLASSICMODELS.CUSTOMERS]]></xml-property>
<xml-property name="designerValues"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<model:DesignValues xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design" xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel">
<Version>2.0</Version>
<design:ResultSets derivedMetaData="true">
<design:resultSetDefinitions>
<design:resultSetColumns>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>CUSTOMERNUMBER</design:name>
<design:position>1</design:position>
</design:identifier>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>CUSTOMERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>CUSTOMERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>CUSTOMERNAME</design:name>
<design:position>2</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>50</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>CUSTOMERNAME</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>CUSTOMERNAME</design:label>
<design:formattingHints>
<design:displaySize>50</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>CONTACTLASTNAME</design:name>
<design:position>3</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>50</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>CONTACTLASTNAME</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>CONTACTLASTNAME</design:label>
<design:formattingHints>
<design:displaySize>50</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>CONTACTFIRSTNAME</design:name>
<design:position>4</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>50</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>CONTACTFIRSTNAME</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>CONTACTFIRSTNAME</design:label>
<design:formattingHints>
<design:displaySize>50</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>PHONE</design:name>
<design:position>5</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>50</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PHONE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PHONE</design:label>
<design:formattingHints>
<design:displaySize>50</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>ADDRESSLINE1</design:name>
<design:position>6</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>50</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ADDRESSLINE1</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ADDRESSLINE1</design:label>
<design:formattingHints>
<design:displaySize>50</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>ADDRESSLINE2</design:name>
<design:position>7</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>50</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ADDRESSLINE2</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ADDRESSLINE2</design:label>
<design:formattingHints>
<design:displaySize>50</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>CITY</design:name>
<design:position>8</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>50</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>CITY</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>CITY</design:label>
<design:formattingHints>
<design:displaySize>50</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>STATE</design:name>
<design:position>9</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>50</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>STATE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>STATE</design:label>
<design:formattingHints>
<design:displaySize>50</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>POSTALCODE</design:name>
<design:position>10</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>POSTALCODE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>POSTALCODE</design:label>
<design:formattingHints>
<design:displaySize>15</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>COUNTRY</design:name>
<design:position>11</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>50</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>COUNTRY</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>COUNTRY</design:label>
<design:formattingHints>
<design:displaySize>50</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>SALESREPEMPLOYEENUMBER</design:name>
<design:position>12</design:position>
</design:identifier>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>SALESREPEMPLOYEENUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>SALESREPEMPLOYEENUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>CREDITLIMIT</design:name>
<design:position>13</design:position>
</design:identifier>
<design:nativeDataTypeCode>8</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>CREDITLIMIT</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>CREDITLIMIT</design:label>
<design:formattingHints>
<design:displaySize>22</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
<design:criteria/>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="6">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<table id="9">
<property name="dataSet">setGetCustomers</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">CUSTOMERNUMBER</property>
<text-property name="displayName">CUSTOMERNUMBER</text-property>
<expression name="expression" type="javascript">dataSetRow["CUSTOMERNUMBER"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">CUSTOMERNAME</property>
<text-property name="displayName">CUSTOMERNAME</text-property>
<expression name="expression" type="javascript">dataSetRow["CUSTOMERNAME"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">CONTACTLASTNAME</property>
<text-property name="displayName">CONTACTLASTNAME</text-property>
<expression name="expression" type="javascript">dataSetRow["CONTACTLASTNAME"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">CONTACTFIRSTNAME</property>
<text-property name="displayName">CONTACTFIRSTNAME</text-property>
<expression name="expression" type="javascript">dataSetRow["CONTACTFIRSTNAME"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PHONE</property>
<text-property name="displayName">PHONE</text-property>
<expression name="expression" type="javascript">dataSetRow["PHONE"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">ADDRESSLINE1</property>
<text-property name="displayName">ADDRESSLINE1</text-property>
<expression name="expression" type="javascript">dataSetRow["ADDRESSLINE1"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">ADDRESSLINE2</property>
<text-property name="displayName">ADDRESSLINE2</text-property>
<expression name="expression" type="javascript">dataSetRow["ADDRESSLINE2"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">CITY</property>
<text-property name="displayName">CITY</text-property>
<expression name="expression" type="javascript">dataSetRow["CITY"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">STATE</property>
<text-property name="displayName">STATE</text-property>
<expression name="expression" type="javascript">dataSetRow["STATE"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">POSTALCODE</property>
<text-property name="displayName">POSTALCODE</text-property>
<expression name="expression" type="javascript">dataSetRow["POSTALCODE"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">COUNTRY</property>
<text-property name="displayName">COUNTRY</text-property>
<expression name="expression" type="javascript">dataSetRow["COUNTRY"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">SALESREPEMPLOYEENUMBER</property>
<text-property name="displayName">SALESREPEMPLOYEENUMBER</text-property>
<expression name="expression" type="javascript">dataSetRow["SALESREPEMPLOYEENUMBER"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">CREDITLIMIT</property>
<text-property name="displayName">CREDITLIMIT</text-property>
<expression name="expression" type="javascript">dataSetRow["CREDITLIMIT"]</expression>
<property name="dataType">float</property>
</structure>
</list-property>
<column id="78">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr" type="javascript">checkField("CUSTOMERNUMBER");</expression>
</structure>
</list-property>
</column>
<column id="79">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr" type="javascript">checkField("CUSTOMERNAME")</expression>
</structure>
</list-property>
</column>
<column id="80">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr" type="javascript">checkField("CONTACTLASTNAME")</expression>
</structure>
</list-property>
</column>
<column id="81">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr" type="javascript">checkField("CONTACTFIRSTNAME")</expression>
</structure>
</list-property>
</column>
<column id="82">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr" type="javascript">checkField("PHONE")</expression>
</structure>
</list-property>
</column>
<column id="83">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr" type="javascript">checkField("ADDRESSLINE1")</expression>
</structure>
</list-property>
</column>
<column id="85">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr" type="javascript">checkField("CITY")</expression>
</structure>
</list-property>
</column>
<column id="86">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr" type="javascript">checkField("STATE")</expression>
</structure>
</list-property>
</column>
<column id="87">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr" type="javascript">checkField("POSTALCODE")</expression>
</structure>
</list-property>
</column>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property name="text">CUSTOMERNUMBER</text-property>
</label>
</cell>
<cell id="13">
<label id="14">
<text-property name="text">CUSTOMERNAME</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property name="text">CONTACTLASTNAME</text-property>
</label>
</cell>
<cell id="17">
<label id="18">
<text-property name="text">CONTACTFIRSTNAME</text-property>
</label>
</cell>
<cell id="19">
<label id="20">
<text-property name="text">PHONE</text-property>
</label>
</cell>
<cell id="21">
<label id="22">
<text-property name="text">ADDRESSLINE1</text-property>
</label>
</cell>
<cell id="25">
<label id="26">
<text-property name="text">CITY</text-property>
</label>
</cell>
<cell id="27">
<label id="28">
<text-property name="text">STATE</text-property>
</label>
</cell>
<cell id="29">
<label id="30">
<text-property name="text">POSTALCODE</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="37">
<cell id="38">
<data id="39">
<property name="resultSetColumn">CUSTOMERNUMBER</property>
</data>
</cell>
<cell id="40">
<data id="41">
<property name="resultSetColumn">CUSTOMERNAME</property>
</data>
</cell>
<cell id="42">
<data id="43">
<property name="resultSetColumn">CONTACTLASTNAME</property>
</data>
</cell>
<cell id="44">
<data id="45">
<property name="resultSetColumn">CONTACTFIRSTNAME</property>
</data>
</cell>
<cell id="46">
<data id="47">
<property name="resultSetColumn">PHONE</property>
</data>
</cell>
<cell id="48">
<data id="49">
<property name="resultSetColumn">ADDRESSLINE1</property>
</data>
</cell>
<cell id="52">
<data id="53">
<property name="resultSetColumn">CITY</property>
</data>
</cell>
<cell id="54">
<data id="55">
<property name="resultSetColumn">STATE</property>
</data>
</cell>
<cell id="56">
<data id="57">
<property name="resultSetColumn">POSTALCODE</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="64">
<cell id="65"/>
<cell id="66"/>
<cell id="67"/>
<cell id="68"/>
<cell id="69"/>
<cell id="70"/>
<cell id="72"/>
<cell id="73"/>
<cell id="74"/>
</row>
</footer>
</table>
</body>
</report>

1 comment:

Vipin Chaudhary said...

Hi,
Currently I am working on IBM-TRIRIGA, Want to use BIRT reporting in TRIRIGA,
I start work with BIRT but get some ploblem in configuration.
when I export report from tririga it will not run into BIRT designer.

If you have any idea, Please help me ASAP.

contact me on vipinchaudhary777@gmail.com