Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » simple cascading parameter question
simple cascading parameter question [message #250521] Tue, 31 July 2007 09:42 Go to next message
Eclipse UserFriend
Originally posted by: marcin.kierdelewicz.sitelynx.com

Hi BIRT specialists!
I have one question how not to display "NULL" value (as first) in
cascading parameters in BIRT?

Everytime I set it I receive NULL value as first entry.

Thank you for your help.

Best regards
Marcin Kierdelewicz
Re: simple cascading parameter question [message #250524 is a reply to message #250521] Tue, 31 July 2007 09:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marcin.kierdelewicz.sitelynx.com

It is set to "is required" but fist position is allways empty with no
value (maybe it is something different than NULL in SQL"

Thank you for your help.

Best regards
Marcin Kierdelewicz


Marcin Kierdelewicz wrote:
> Hi BIRT specialists!
> I have one question how not to display "NULL" value (as first) in
> cascading parameters in BIRT?
>
> Everytime I set it I receive NULL value as first entry.
>
> Thank you for your help.
>
> Best regards
> Marcin Kierdelewicz
Re: simple cascading parameter question [message #250630 is a reply to message #250524] Tue, 31 July 2007 20:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Marcin,

You need to set a default value if you do not want the first entry to
show blank.

Take a look at this simple report and notice the first one does have a
default value and the second does not.

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.14"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.2.0.v20070620 Build &lt;2.2.0.v20070626-1003></property>
<property name="units">in</property>
<property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
Name here>></property>
<html-property name="description">Creates a blank report with no
predefined content.</html-property>
<text-property name="displayName">Blank Report</text-property>
<property name="iconFile">/templates/blank_report.gif</property>
<parameters>
<cascading-parameter-group name="NewCascadingParameterGroup"
id="9">
<property name="dataSetMode">multiple</property>
<parameters>
<scalar-parameter name="ordernum" id="10">
<property name="valueType">dynamic</property>
<property name="isRequired">true</property>
<property name="controlType">list-box</property>
<property name="dataSetName">orders</property>
<expression
name="valueExpr">row["ORDERNUMBER"]</expression>
<property name="defaultValue">10101</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
<scalar-parameter name="prodcode" id="11">
<property name="valueType">dynamic</property>
<property name="isRequired">true</property>
<property name="controlType">list-box</property>
<property name="dataSetName">orderdetails</property>
<expression
name="valueExpr">row["PRODUCTCODE"]</expression>
<property name="defaultValue"></property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
</parameters>
</cascading-parameter-group>
</parameters>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="6">
<text-property name="displayName"></text-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="orders" id="7">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">ORDERDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">ORDERDATE</property>
<property name="nativeName">ORDERDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="nativeName">REQUIREDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="nativeName">SHIPPEDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="nativeName">STATUS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="nativeName">COMMENTS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="nativeName">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
</list-property>
<property name="queryText">select *
from orders</property>
</oda-data-set>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="orderdetails" id="8">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="parameters">
<structure>
<property name="name">param_1</property>
<property name="paramName">ordernum</property>
<property name="nativeName"></property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
<property name="position">1</property>
<expression name="defaultValue">10100</expression>
<property name="isOptional">false</property>
<property name="isInput">true</property>
<property name="isOutput">false</property>
</structure>
</list-property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="nativeName">PRODUCTCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="nativeName">QUANTITYORDERED</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="nativeName">PRICEEACH</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="nativeName">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">5</property>
</structure>
</list-property>
<property name="queryText">select *
from orderdetails
where ordernumber = ?</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>1.0</Version>
<design:DataSetParameters>
<design:parameterDefinitions>
<design:inOutMode>In</design:inOutMode>
<design:attributes>
<design:name></design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:nullability>Unknown</design:nullability>
<design:uiHints/>
</design:attributes>
<design:inputAttributes>
<design:elementAttributes>
<design:defaultScalarValue></design:defaultScalarValue>
<design:optional>false</design:optional>
<design:masksValue>false</design:masksValue>
<design:dynamicValueChoices>
<design:dataSetDesign>
<design:name>orders</design:name>

<design:odaExtensionDataSetId>org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet </design:odaExtensionDataSetId>
<design:dataSourceDesign>
<design:name>Data Source</design:name>

<design:odaExtensionId>org.eclipse.birt.report.data.oda.jdbc </design:odaExtensionId>
<design:displayName></design:displayName>
<design:publicProperties>
<design:properties>
<design:nameValue>
<design:name>odaDriverClass</design:name>

<design:value>org.eclipse.birt.report.data.oda.sampledb.Driver </design:value>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>odaURL</design:name>

<design:value>jdbc:classicmodels:sampledb</design:value>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>odaUser</design:name>
<design:value>ClassicModels</design:value>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>odaPassword</design:name>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>odaJndiName</design:name>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>OdaConnProfileName</design:name>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>OdaConnProfileStorePath</design:name>
</design:nameValue>
</design:properties>
</design:publicProperties>
</design:dataSourceDesign>
<design:query>
<design:queryText>select *
from orders</design:queryText>
</design:query>
<design:publicProperties>
<design:properties>
<design:nameValue>
<design:name>queryTimeOut</design:name>
</design:nameValue>
</design:properties>
</design:publicProperties>
<design:resultSets>
<design:resultSetDefinitions>
<design:resultSetColumns>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERNUMBER</design:name>
<design:position>1</design:position>

<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERDATE</design:name>
<design:position>2</design:position>

<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>REQUIREDDATE</design:name>
<design:position>3</design:position>

<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>SHIPPEDDATE</design:name>
<design:position>4</design:position>

<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>STATUS</design:name>
<design:position>5</design:position>

<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>COMMENTS</design:name>
<design:position>6</design:position>

<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>CUSTOMERNUMBER</design:name>
<design:position>7</design:position>

<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
</design:resultSetColumns>
</design:resultSetDefinitions>
</design:resultSets>
</design:dataSetDesign>
<design:enabled>true</design:enabled>

<design:valueColumn>row[&quot;ORDERNUMBER&quot;]</design:valueColumn >
</design:dynamicValueChoices>
<design:uiHints>
<design:promptStyle>SelectableList</design:promptStyle>
</design:uiHints>
</design:elementAttributes>
<design:uiHints/>
</design:inputAttributes>
</design:parameterDefinitions>
</design:DataSetParameters>
</model:DesignValues>]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="crosstab" id="4">
<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-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>
</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>
<data id="12">
<list-property name="boundDataColumns">
<structure>
<property name="name">prodcode</property>
<expression
name="expression">params["prodcode"]</expression>
</structure>
</list-property>
<property name="resultSetColumn">prodcode</property>
</data>
</body>
</report>


Marcin Kierdelewicz wrote:
> It is set to "is required" but fist position is allways empty with no
> value (maybe it is something different than NULL in SQL"
>
> Thank you for your help.
>
> Best regards
> Marcin Kierdelewicz
>
>
> Marcin Kierdelewicz wrote:
>> Hi BIRT specialists!
>> I have one question how not to display "NULL" value (as first) in
>> cascading parameters in BIRT?
>>
>> Everytime I set it I receive NULL value as first entry.
>>
>> Thank you for your help.
>>
>> Best regards
>> Marcin Kierdelewicz
Re: simple cascading parameter question [message #250696 is a reply to message #250630] Wed, 01 August 2007 08:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marcin.kierdelewicz.sitelynx.com

Dear Jason,
thank you for you answer.
I can't relly use default value in my case because I need to hide
somehow empty value not from the first parameter in cascading only in
others and I don't know what value they have because they are based on
first parameter value.

With reference to your example I would like to hide first empty position
in prodcode parameter.
Is it possible to enter in default value any expression or function that
displays first entry instead of empty row maybe?
Could you help me with this, please?

Thank you very much. I am really impressed with your knowledge. Every
solution you give always works!

Best regards
Marcin Kierdelewicz


Jason Weathersby wrote:
> Marcin,
>
> You need to set a default value if you do not want the first entry to
> show blank.
>
> Take a look at this simple report and notice the first one does have a
> default value and the second does not.
>
> Jason
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.14"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.2.0.v20070620 Build &lt;2.2.0.v20070626-1003></property>
> <property name="units">in</property>
> <property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
> Name here>></property>
> <html-property name="description">Creates a blank report with no
> predefined content.</html-property>
> <text-property name="displayName">Blank Report</text-property>
> <property name="iconFile">/templates/blank_report.gif</property>
> <parameters>
> <cascading-parameter-group name="NewCascadingParameterGroup"
> id="9">
> <property name="dataSetMode">multiple</property>
> <parameters>
> <scalar-parameter name="ordernum" id="10">
> <property name="valueType">dynamic</property>
> <property name="isRequired">true</property>
> <property name="controlType">list-box</property>
> <property name="dataSetName">orders</property>
> <expression
> name="valueExpr">row["ORDERNUMBER"]</expression>
> <property name="defaultValue">10101</property>
> <structure name="format">
> <property name="category">Unformatted</property>
> </structure>
> </scalar-parameter>
> <scalar-parameter name="prodcode" id="11">
> <property name="valueType">dynamic</property>
> <property name="isRequired">true</property>
> <property name="controlType">list-box</property>
> <property name="dataSetName">orderdetails</property>
> <expression
> name="valueExpr">row["PRODUCTCODE"]</expression>
> <property name="defaultValue"></property>
> <structure name="format">
> <property name="category">Unformatted</property>
> </structure>
> </scalar-parameter>
> </parameters>
> </cascading-parameter-group>
> </parameters>
> <data-sources>
> <oda-data-source
> extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
> id="6">
> <text-property name="displayName"></text-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="orders" id="7">
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">ORDERNUMBER</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">ORDERDATE</property>
> <property name="dataType">date</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">REQUIREDDATE</property>
> <property name="dataType">date</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">SHIPPEDDATE</property>
> <property name="dataType">date</property>
> </structure>
> <structure>
> <property name="position">5</property>
> <property name="name">STATUS</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">6</property>
> <property name="name">COMMENTS</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">7</property>
> <property name="name">CUSTOMERNUMBER</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">Data Source</property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">ORDERNUMBER</property>
> <property name="nativeName">ORDERNUMBER</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">ORDERDATE</property>
> <property name="nativeName">ORDERDATE</property>
> <property name="dataType">date</property>
> <property name="nativeDataType">91</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">REQUIREDDATE</property>
> <property name="nativeName">REQUIREDDATE</property>
> <property name="dataType">date</property>
> <property name="nativeDataType">91</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">SHIPPEDDATE</property>
> <property name="nativeName">SHIPPEDDATE</property>
> <property name="dataType">date</property>
> <property name="nativeDataType">91</property>
> </structure>
> <structure>
> <property name="position">5</property>
> <property name="name">STATUS</property>
> <property name="nativeName">STATUS</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">6</property>
> <property name="name">COMMENTS</property>
> <property name="nativeName">COMMENTS</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">7</property>
> <property name="name">CUSTOMERNUMBER</property>
> <property name="nativeName">CUSTOMERNUMBER</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> </list-property>
> <property name="queryText">select *
> from orders</property>
> </oda-data-set>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="orderdetails" id="8">
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">ORDERNUMBER</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRODUCTCODE</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">QUANTITYORDERED</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">PRICEEACH</property>
> <property name="dataType">float</property>
> </structure>
> <structure>
> <property name="position">5</property>
> <property name="name">ORDERLINENUMBER</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">Data Source</property>
> <list-property name="parameters">
> <structure>
> <property name="name">param_1</property>
> <property name="paramName">ordernum</property>
> <property name="nativeName"></property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> <property name="position">1</property>
> <expression name="defaultValue">10100</expression>
> <property name="isOptional">false</property>
> <property name="isInput">true</property>
> <property name="isOutput">false</property>
> </structure>
> </list-property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">ORDERNUMBER</property>
> <property name="nativeName">ORDERNUMBER</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRODUCTCODE</property>
> <property name="nativeName">PRODUCTCODE</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">QUANTITYORDERED</property>
> <property name="nativeName">QUANTITYORDERED</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">PRICEEACH</property>
> <property name="nativeName">PRICEEACH</property>
> <property name="dataType">float</property>
> <property name="nativeDataType">8</property>
> </structure>
> <structure>
> <property name="position">5</property>
> <property name="name">ORDERLINENUMBER</property>
> <property name="nativeName">ORDERLINENUMBER</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">5</property>
> </structure>
> </list-property>
> <property name="queryText">select *
> from orderdetails
> where ordernumber = ?</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>1.0</Version>
> <design:DataSetParameters>
> <design:parameterDefinitions>
> <design:inOutMode>In</design:inOutMode>
> <design:attributes>
> <design:name></design:name>
> <design:position>1</design:position>
> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
> <design:nullability>Unknown</design:nullability>
> <design:uiHints/>
> </design:attributes>
> <design:inputAttributes>
> <design:elementAttributes>
> <design:defaultScalarValue></design:defaultScalarValue>
> <design:optional>false</design:optional>
> <design:masksValue>false</design:masksValue>
> <design:dynamicValueChoices>
> <design:dataSetDesign>
> <design:name>orders</design:name>
>
> <design:odaExtensionDataSetId>org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet </design:odaExtensionDataSetId>
>
> <design:dataSourceDesign>
> <design:name>Data Source</design:name>
>
> <design:odaExtensionId>org.eclipse.birt.report.data.oda.jdbc </design:odaExtensionId>
>
> <design:displayName></design:displayName>
> <design:publicProperties>
> <design:properties>
> <design:nameValue>
> <design:name>odaDriverClass</design:name>
>
> <design:value>org.eclipse.birt.report.data.oda.sampledb.Driver </design:value>
>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>odaURL</design:name>
>
> <design:value>jdbc:classicmodels:sampledb</design:value>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>odaUser</design:name>
> <design:value>ClassicModels</design:value>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>odaPassword</design:name>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>odaJndiName</design:name>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>OdaConnProfileName</design:name>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>OdaConnProfileStorePath</design:name>
> </design:nameValue>
> </design:properties>
> </design:publicProperties>
> </design:dataSourceDesign>
> <design:query>
> <design:queryText>select *
> from orders</design:queryText>
> </design:query>
> <design:publicProperties>
> <design:properties>
> <design:nameValue>
> <design:name>queryTimeOut</design:name>
> </design:nameValue>
> </design:properties>
> </design:publicProperties>
> <design:resultSets>
> <design:resultSetDefinitions>
> <design:resultSetColumns>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>ORDERNUMBER</design:name>
> <design:position>1</design:position>
>
> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>ORDERDATE</design:name>
> <design:position>2</design:position>
>
> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>REQUIREDDATE</design:name>
> <design:position>3</design:position>
>
> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>SHIPPEDDATE</design:name>
> <design:position>4</design:position>
>
> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>STATUS</design:name>
> <design:position>5</design:position>
>
> <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>COMMENTS</design:name>
> <design:position>6</design:position>
>
> <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>CUSTOMERNUMBER</design:name>
> <design:position>7</design:position>
>
> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> </design:resultSetColumns>
> </design:resultSetDefinitions>
> </design:resultSets>
> </design:dataSetDesign>
> <design:enabled>true</design:enabled>
>
> <design:valueColumn>row[&quot;ORDERNUMBER&quot;]</design:valueColumn >
> </design:dynamicValueChoices>
> <design:uiHints>
> <design:promptStyle>SelectableList</design:promptStyle>
> </design:uiHints>
> </design:elementAttributes>
> <design:uiHints/>
> </design:inputAttributes>
> </design:parameterDefinitions>
> </design:DataSetParameters>
> </model:DesignValues>]]></xml-property>
> </oda-data-set>
> </data-sets>
> <styles>
> <style name="crosstab" id="4">
> <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-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>
> </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>
> <data id="12">
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">prodcode</property>
> <expression
> name="expression">params["prodcode"]</expression>
> </structure>
> </list-property>
> <property name="resultSetColumn">prodcode</property>
> </data>
> </body>
> </report>
>
>
> Marcin Kierdelewicz wrote:
>> It is set to "is required" but fist position is allways empty with no
>> value (maybe it is something different than NULL in SQL"
>>
>> Thank you for your help.
>>
>> Best regards
>> Marcin Kierdelewicz
>>
>>
>> Marcin Kierdelewicz wrote:
>>> Hi BIRT specialists!
>>> I have one question how not to display "NULL" value (as first) in
>>> cascading parameters in BIRT?
>>>
>>> Everytime I set it I receive NULL value as first entry.
>>>
>>> Thank you for your help.
>>>
>>> Best regards
>>> Marcin Kierdelewicz
Re: simple cascading parameter question [message #250753 is a reply to message #250696] Wed, 01 August 2007 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Marcin,

Take a look at this modified example.
Both parameters start with a default value.

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.14"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.2.0.v20070620 Build &lt;2.2.0.v20070626-1003></property>
<property name="units">in</property>
<property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
Name here>></property>
<html-property name="description">Creates a blank report with no
predefined content.</html-property>
<text-property name="displayName">Blank Report</text-property>
<property name="iconFile">/templates/blank_report.gif</property>
<parameters>
<cascading-parameter-group name="NewCascadingParameterGroup"
id="9">
<property name="dataSetMode">multiple</property>
<parameters>
<scalar-parameter name="ordernum" id="10">
<property name="valueType">dynamic</property>
<property name="isRequired">true</property>
<property name="controlType">list-box</property>
<property name="dataSetName">orders</property>
<expression
name="valueExpr">row["ORDERNUMBER"]</expression>
<property
name="defaultValue">firstparmdefault</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
<scalar-parameter name="prodcode" id="11">
<property name="valueType">dynamic</property>
<property name="isRequired">true</property>
<property name="controlType">list-box</property>
<property name="dataSetName">orderdetails</property>
<expression
name="valueExpr">row["PRODUCTCODE"]</expression>
<property
name="defaultValue">secondparmdefault</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
</parameters>
</cascading-parameter-group>
</parameters>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="6">
<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="orders" id="7">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">ORDERDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">ORDERDATE</property>
<property name="nativeName">ORDERDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="nativeName">REQUIREDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="nativeName">SHIPPEDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="nativeName">STATUS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="nativeName">COMMENTS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="nativeName">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
</list-property>
<property name="queryText">select *
from orders</property>
</oda-data-set>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="orderdetails" id="8">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="parameters">
<structure>
<property name="name">param_1</property>
<property name="paramName">ordernum</property>
<property name="nativeName"></property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
<property name="position">1</property>
<expression name="defaultValue">10100</expression>
<property name="isOptional">false</property>
<property name="isInput">true</property>
<property name="isOutput">false</property>
</structure>
</list-property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="nativeName">PRODUCTCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="nativeName">QUANTITYORDERED</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="nativeName">PRICEEACH</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="nativeName">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">5</property>
</structure>
</list-property>
<property name="queryText">select *
from orderdetails
where ordernumber = ?</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>1.0</Version>
<design:DataSetParameters>
<design:parameterDefinitions>
<design:inOutMode>In</design:inOutMode>
<design:attributes>
<design:name></design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:nullability>Unknown</design:nullability>
<design:uiHints/>
</design:attributes>
<design:inputAttributes>
<design:elementAttributes>
<design:defaultScalarValue></design:defaultScalarValue>
<design:optional>false</design:optional>
<design:masksValue>false</design:masksValue>
<design:dynamicValueChoices>
<design:dataSetDesign>
<design:name>orders</design:name>

<design:odaExtensionDataSetId>org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet </design:odaExtensionDataSetId>
<design:dataSourceDesign>
<design:name>Data Source</design:name>

<design:odaExtensionId>org.eclipse.birt.report.data.oda.jdbc </design:odaExtensionId>
<design:displayName></design:displayName>
<design:publicProperties>
<design:properties>
<design:nameValue>
<design:name>odaDriverClass</design:name>

<design:value>org.eclipse.birt.report.data.oda.sampledb.Driver </design:value>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>odaURL</design:name>

<design:value>jdbc:classicmodels:sampledb</design:value>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>odaUser</design:name>
<design:value>ClassicModels</design:value>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>odaPassword</design:name>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>odaJndiName</design:name>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>OdaConnProfileName</design:name>
</design:nameValue>
</design:properties>
<design:properties>
<design:nameValue>
<design:name>OdaConnProfileStorePath</design:name>
</design:nameValue>
</design:properties>
</design:publicProperties>
</design:dataSourceDesign>
<design:query>
<design:queryText>select *
from orders</design:queryText>
</design:query>
<design:publicProperties>
<design:properties>
<design:nameValue>
<design:name>queryTimeOut</design:name>
</design:nameValue>
</design:properties>
</design:publicProperties>
<design:resultSets>
<design:resultSetDefinitions>
<design:resultSetColumns>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERNUMBER</design:name>
<design:position>1</design:position>

<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERDATE</design:name>
<design:position>2</design:position>

<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>REQUIREDDATE</design:name>
<design:position>3</design:position>

<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>SHIPPEDDATE</design:name>
<design:position>4</design:position>

<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>STATUS</design:name>
<design:position>5</design:position>

<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>COMMENTS</design:name>
<design:position>6</design:position>

<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>CUSTOMERNUMBER</design:name>
<design:position>7</design:position>

<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
</design:attributes>
</design:resultColumnDefinitions>
</design:resultSetColumns>
</design:resultSetDefinitions>
</design:resultSets>
</design:dataSetDesign>
<design:enabled>true</design:enabled>

<design:valueColumn>row[&quot;ORDERNUMBER&quot;]</design:valueColumn >
</design:dynamicValueChoices>
<design:uiHints>
<design:promptStyle>SelectableList</design:promptStyle>
</design:uiHints>
</design:elementAttributes>
<design:uiHints/>
</design:inputAttributes>
</design:parameterDefinitions>
</design:DataSetParameters>
</model:DesignValues>]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="crosstab" id="4">
<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-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>
</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>
<data id="12">
<list-property name="boundDataColumns">
<structure>
<property name="name">prodcode</property>
<expression
name="expression">params["prodcode"]</expression>
</structure>
</list-property>
<property name="resultSetColumn">prodcode</property>
</data>
</body>
</report>


Marcin Kierdelewicz wrote:
> Dear Jason,
> thank you for you answer.
> I can't relly use default value in my case because I need to hide
> somehow empty value not from the first parameter in cascading only in
> others and I don't know what value they have because they are based on
> first parameter value.
>
> With reference to your example I would like to hide first empty position
> in prodcode parameter.
> Is it possible to enter in default value any expression or function that
> displays first entry instead of empty row maybe?
> Could you help me with this, please?
>
> Thank you very much. I am really impressed with your knowledge. Every
> solution you give always works!
>
> Best regards
> Marcin Kierdelewicz
>
>
> Jason Weathersby wrote:
>> Marcin,
>>
>> You need to set a default value if you do not want the first entry to
>> show blank.
>>
>> Take a look at this simple report and notice the first one does have a
>> default value and the second does not.
>>
>> Jason
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <report xmlns="http://www.eclipse.org/birt/2005/design"
>> version="3.2.14" id="1">
>> <property name="createdBy">Eclipse BIRT Designer Version
>> 2.2.0.v20070620 Build &lt;2.2.0.v20070626-1003></property>
>> <property name="units">in</property>
>> <property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
>> Name here>></property>
>> <html-property name="description">Creates a blank report with no
>> predefined content.</html-property>
>> <text-property name="displayName">Blank Report</text-property>
>> <property name="iconFile">/templates/blank_report.gif</property>
>> <parameters>
>> <cascading-parameter-group name="NewCascadingParameterGroup"
>> id="9">
>> <property name="dataSetMode">multiple</property>
>> <parameters>
>> <scalar-parameter name="ordernum" id="10">
>> <property name="valueType">dynamic</property>
>> <property name="isRequired">true</property>
>> <property name="controlType">list-box</property>
>> <property name="dataSetName">orders</property>
>> <expression
>> name="valueExpr">row["ORDERNUMBER"]</expression>
>> <property name="defaultValue">10101</property>
>> <structure name="format">
>> <property name="category">Unformatted</property>
>> </structure>
>> </scalar-parameter>
>> <scalar-parameter name="prodcode" id="11">
>> <property name="valueType">dynamic</property>
>> <property name="isRequired">true</property>
>> <property name="controlType">list-box</property>
>> <property name="dataSetName">orderdetails</property>
>> <expression
>> name="valueExpr">row["PRODUCTCODE"]</expression>
>> <property name="defaultValue"></property>
>> <structure name="format">
>> <property name="category">Unformatted</property>
>> </structure>
>> </scalar-parameter>
>> </parameters>
>> </cascading-parameter-group>
>> </parameters>
>> <data-sources>
>> <oda-data-source
>> extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
>> id="6">
>> <text-property name="displayName"></text-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="orders" id="7">
>> <structure name="cachedMetaData">
>> <list-property name="resultSet">
>> <structure>
>> <property name="position">1</property>
>> <property name="name">ORDERNUMBER</property>
>> <property name="dataType">integer</property>
>> </structure>
>> <structure>
>> <property name="position">2</property>
>> <property name="name">ORDERDATE</property>
>> <property name="dataType">date</property>
>> </structure>
>> <structure>
>> <property name="position">3</property>
>> <property name="name">REQUIREDDATE</property>
>> <property name="dataType">date</property>
>> </structure>
>> <structure>
>> <property name="position">4</property>
>> <property name="name">SHIPPEDDATE</property>
>> <property name="dataType">date</property>
>> </structure>
>> <structure>
>> <property name="position">5</property>
>> <property name="name">STATUS</property>
>> <property name="dataType">string</property>
>> </structure>
>> <structure>
>> <property name="position">6</property>
>> <property name="name">COMMENTS</property>
>> <property name="dataType">string</property>
>> </structure>
>> <structure>
>> <property name="position">7</property>
>> <property name="name">CUSTOMERNUMBER</property>
>> <property name="dataType">integer</property>
>> </structure>
>> </list-property>
>> </structure>
>> <property name="dataSource">Data Source</property>
>> <list-property name="resultSet">
>> <structure>
>> <property name="position">1</property>
>> <property name="name">ORDERNUMBER</property>
>> <property name="nativeName">ORDERNUMBER</property>
>> <property name="dataType">integer</property>
>> <property name="nativeDataType">4</property>
>> </structure>
>> <structure>
>> <property name="position">2</property>
>> <property name="name">ORDERDATE</property>
>> <property name="nativeName">ORDERDATE</property>
>> <property name="dataType">date</property>
>> <property name="nativeDataType">91</property>
>> </structure>
>> <structure>
>> <property name="position">3</property>
>> <property name="name">REQUIREDDATE</property>
>> <property name="nativeName">REQUIREDDATE</property>
>> <property name="dataType">date</property>
>> <property name="nativeDataType">91</property>
>> </structure>
>> <structure>
>> <property name="position">4</property>
>> <property name="name">SHIPPEDDATE</property>
>> <property name="nativeName">SHIPPEDDATE</property>
>> <property name="dataType">date</property>
>> <property name="nativeDataType">91</property>
>> </structure>
>> <structure>
>> <property name="position">5</property>
>> <property name="name">STATUS</property>
>> <property name="nativeName">STATUS</property>
>> <property name="dataType">string</property>
>> <property name="nativeDataType">12</property>
>> </structure>
>> <structure>
>> <property name="position">6</property>
>> <property name="name">COMMENTS</property>
>> <property name="nativeName">COMMENTS</property>
>> <property name="dataType">string</property>
>> <property name="nativeDataType">12</property>
>> </structure>
>> <structure>
>> <property name="position">7</property>
>> <property name="name">CUSTOMERNUMBER</property>
>> <property name="nativeName">CUSTOMERNUMBER</property>
>> <property name="dataType">integer</property>
>> <property name="nativeDataType">4</property>
>> </structure>
>> </list-property>
>> <property name="queryText">select *
>> from orders</property>
>> </oda-data-set>
>> <oda-data-set
>> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
>> name="orderdetails" id="8">
>> <structure name="cachedMetaData">
>> <list-property name="resultSet">
>> <structure>
>> <property name="position">1</property>
>> <property name="name">ORDERNUMBER</property>
>> <property name="dataType">integer</property>
>> </structure>
>> <structure>
>> <property name="position">2</property>
>> <property name="name">PRODUCTCODE</property>
>> <property name="dataType">string</property>
>> </structure>
>> <structure>
>> <property name="position">3</property>
>> <property name="name">QUANTITYORDERED</property>
>> <property name="dataType">integer</property>
>> </structure>
>> <structure>
>> <property name="position">4</property>
>> <property name="name">PRICEEACH</property>
>> <property name="dataType">float</property>
>> </structure>
>> <structure>
>> <property name="position">5</property>
>> <property name="name">ORDERLINENUMBER</property>
>> <property name="dataType">integer</property>
>> </structure>
>> </list-property>
>> </structure>
>> <property name="dataSource">Data Source</property>
>> <list-property name="parameters">
>> <structure>
>> <property name="name">param_1</property>
>> <property name="paramName">ordernum</property>
>> <property name="nativeName"></property>
>> <property name="dataType">integer</property>
>> <property name="nativeDataType">4</property>
>> <property name="position">1</property>
>> <expression name="defaultValue">10100</expression>
>> <property name="isOptional">false</property>
>> <property name="isInput">true</property>
>> <property name="isOutput">false</property>
>> </structure>
>> </list-property>
>> <list-property name="resultSet">
>> <structure>
>> <property name="position">1</property>
>> <property name="name">ORDERNUMBER</property>
>> <property name="nativeName">ORDERNUMBER</property>
>> <property name="dataType">integer</property>
>> <property name="nativeDataType">4</property>
>> </structure>
>> <structure>
>> <property name="position">2</property>
>> <property name="name">PRODUCTCODE</property>
>> <property name="nativeName">PRODUCTCODE</property>
>> <property name="dataType">string</property>
>> <property name="nativeDataType">12</property>
>> </structure>
>> <structure>
>> <property name="position">3</property>
>> <property name="name">QUANTITYORDERED</property>
>> <property
>> name="nativeName">QUANTITYORDERED</property>
>> <property name="dataType">integer</property>
>> <property name="nativeDataType">4</property>
>> </structure>
>> <structure>
>> <property name="position">4</property>
>> <property name="name">PRICEEACH</property>
>> <property name="nativeName">PRICEEACH</property>
>> <property name="dataType">float</property>
>> <property name="nativeDataType">8</property>
>> </structure>
>> <structure>
>> <property name="position">5</property>
>> <property name="name">ORDERLINENUMBER</property>
>> <property
>> name="nativeName">ORDERLINENUMBER</property>
>> <property name="dataType">integer</property>
>> <property name="nativeDataType">5</property>
>> </structure>
>> </list-property>
>> <property name="queryText">select *
>> from orderdetails
>> where ordernumber = ?</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>1.0</Version>
>> <design:DataSetParameters>
>> <design:parameterDefinitions>
>> <design:inOutMode>In</design:inOutMode>
>> <design:attributes>
>> <design:name></design:name>
>> <design:position>1</design:position>
>> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
>> <design:nullability>Unknown</design:nullability>
>> <design:uiHints/>
>> </design:attributes>
>> <design:inputAttributes>
>> <design:elementAttributes>
>> <design:defaultScalarValue></design:defaultScalarValue>
>> <design:optional>false</design:optional>
>> <design:masksValue>false</design:masksValue>
>> <design:dynamicValueChoices>
>> <design:dataSetDesign>
>> <design:name>orders</design:name>
>>
>> <design:odaExtensionDataSetId>org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet </design:odaExtensionDataSetId>
>>
>> <design:dataSourceDesign>
>> <design:name>Data Source</design:name>
>>
>> <design:odaExtensionId>org.eclipse.birt.report.data.oda.jdbc </design:odaExtensionId>
>>
>> <design:displayName></design:displayName>
>> <design:publicProperties>
>> <design:properties>
>> <design:nameValue>
>> <design:name>odaDriverClass</design:name>
>>
>> <design:value>org.eclipse.birt.report.data.oda.sampledb.Driver </design:value>
>>
>> </design:nameValue>
>> </design:properties>
>> <design:properties>
>> <design:nameValue>
>> <design:name>odaURL</design:name>
>>
>> <design:value>jdbc:classicmodels:sampledb</design:value>
>> </design:nameValue>
>> </design:properties>
>> <design:properties>
>> <design:nameValue>
>> <design:name>odaUser</design:name>
>> <design:value>ClassicModels</design:value>
>> </design:nameValue>
>> </design:properties>
>> <design:properties>
>> <design:nameValue>
>> <design:name>odaPassword</design:name>
>> </design:nameValue>
>> </design:properties>
>> <design:properties>
>> <design:nameValue>
>> <design:name>odaJndiName</design:name>
>> </design:nameValue>
>> </design:properties>
>> <design:properties>
>> <design:nameValue>
>> <design:name>OdaConnProfileName</design:name>
>> </design:nameValue>
>> </design:properties>
>> <design:properties>
>> <design:nameValue>
>> <design:name>OdaConnProfileStorePath</design:name>
>> </design:nameValue>
>> </design:properties>
>> </design:publicProperties>
>> </design:dataSourceDesign>
>> <design:query>
>> <design:queryText>select *
>> from orders</design:queryText>
>> </design:query>
>> <design:publicProperties>
>> <design:properties>
>> <design:nameValue>
>> <design:name>queryTimeOut</design:name>
>> </design:nameValue>
>> </design:properties>
>> </design:publicProperties>
>> <design:resultSets>
>> <design:resultSetDefinitions>
>> <design:resultSetColumns>
>> <design:resultColumnDefinitions>
>> <design:attributes>
>> <design:name>ORDERNUMBER</design:name>
>> <design:position>1</design:position>
>>
>> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
>> </design:attributes>
>> </design:resultColumnDefinitions>
>> <design:resultColumnDefinitions>
>> <design:attributes>
>> <design:name>ORDERDATE</design:name>
>> <design:position>2</design:position>
>>
>> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
>> </design:attributes>
>> </design:resultColumnDefinitions>
>> <design:resultColumnDefinitions>
>> <design:attributes>
>> <design:name>REQUIREDDATE</design:name>
>> <design:position>3</design:position>
>>
>> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
>> </design:attributes>
>> </design:resultColumnDefinitions>
>> <design:resultColumnDefinitions>
>> <design:attributes>
>> <design:name>SHIPPEDDATE</design:name>
>> <design:position>4</design:position>
>>
>> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
>> </design:attributes>
>> </design:resultColumnDefinitions>
>> <design:resultColumnDefinitions>
>> <design:attributes>
>> <design:name>STATUS</design:name>
>> <design:position>5</design:position>
>>
>> <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
>> </design:attributes>
>> </design:resultColumnDefinitions>
>> <design:resultColumnDefinitions>
>> <design:attributes>
>> <design:name>COMMENTS</design:name>
>> <design:position>6</design:position>
>>
>> <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
>> </design:attributes>
>> </design:resultColumnDefinitions>
>> <design:resultColumnDefinitions>
>> <design:attributes>
>> <design:name>CUSTOMERNUMBER</design:name>
>> <design:position>7</design:position>
>>
>> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
>> </design:attributes>
>> </design:resultColumnDefinitions>
>> </design:resultSetColumns>
>> </design:resultSetDefinitions>
>> </design:resultSets>
>> </design:dataSetDesign>
>> <design:enabled>true</design:enabled>
>>
>> <design:valueColumn>row[&quot;ORDERNUMBER&quot;]</design:valueColumn >
>> </design:dynamicValueChoices>
>> <design:uiHints>
>> <design:promptStyle>SelectableList</design:promptStyle>
>> </design:uiHints>
>> </design:elementAttributes>
>> <design:uiHints/>
>> </design:inputAttributes>
>> </design:parameterDefinitions>
>> </design:DataSetParameters>
>> </model:DesignValues>]]></xml-property>
>> </oda-data-set>
>> </data-sets>
>> <styles>
>> <style name="crosstab" id="4">
>> <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</
Re: simple cascading parameter question [message #250757 is a reply to message #250753] Wed, 01 August 2007 17:03 Go to previous message
Eclipse UserFriend
Originally posted by: marcin.kierdelewicz.sitelynx.com

Dear Jason,
thank you for your example.
This is really what I was looking for.
You are the best BIRT expert!!!

Best regards
Marcin Kierdelewicz


Jason Weathersby wrote:
> Marcin,
>
> Take a look at this modified example.
> Both parameters start with a default value.
>
> Jason
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.14"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.2.0.v20070620 Build &lt;2.2.0.v20070626-1003></property>
> <property name="units">in</property>
> <property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
> Name here>></property>
> <html-property name="description">Creates a blank report with no
> predefined content.</html-property>
> <text-property name="displayName">Blank Report</text-property>
> <property name="iconFile">/templates/blank_report.gif</property>
> <parameters>
> <cascading-parameter-group name="NewCascadingParameterGroup"
> id="9">
> <property name="dataSetMode">multiple</property>
> <parameters>
> <scalar-parameter name="ordernum" id="10">
> <property name="valueType">dynamic</property>
> <property name="isRequired">true</property>
> <property name="controlType">list-box</property>
> <property name="dataSetName">orders</property>
> <expression
> name="valueExpr">row["ORDERNUMBER"]</expression>
> <property
> name="defaultValue">firstparmdefault</property>
> <structure name="format">
> <property name="category">Unformatted</property>
> </structure>
> </scalar-parameter>
> <scalar-parameter name="prodcode" id="11">
> <property name="valueType">dynamic</property>
> <property name="isRequired">true</property>
> <property name="controlType">list-box</property>
> <property name="dataSetName">orderdetails</property>
> <expression
> name="valueExpr">row["PRODUCTCODE"]</expression>
> <property
> name="defaultValue">secondparmdefault</property>
> <structure name="format">
> <property name="category">Unformatted</property>
> </structure>
> </scalar-parameter>
> </parameters>
> </cascading-parameter-group>
> </parameters>
> <data-sources>
> <oda-data-source
> extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
> id="6">
> <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="orders" id="7">
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">ORDERNUMBER</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">ORDERDATE</property>
> <property name="dataType">date</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">REQUIREDDATE</property>
> <property name="dataType">date</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">SHIPPEDDATE</property>
> <property name="dataType">date</property>
> </structure>
> <structure>
> <property name="position">5</property>
> <property name="name">STATUS</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">6</property>
> <property name="name">COMMENTS</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">7</property>
> <property name="name">CUSTOMERNUMBER</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">Data Source</property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">ORDERNUMBER</property>
> <property name="nativeName">ORDERNUMBER</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">ORDERDATE</property>
> <property name="nativeName">ORDERDATE</property>
> <property name="dataType">date</property>
> <property name="nativeDataType">91</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">REQUIREDDATE</property>
> <property name="nativeName">REQUIREDDATE</property>
> <property name="dataType">date</property>
> <property name="nativeDataType">91</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">SHIPPEDDATE</property>
> <property name="nativeName">SHIPPEDDATE</property>
> <property name="dataType">date</property>
> <property name="nativeDataType">91</property>
> </structure>
> <structure>
> <property name="position">5</property>
> <property name="name">STATUS</property>
> <property name="nativeName">STATUS</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">6</property>
> <property name="name">COMMENTS</property>
> <property name="nativeName">COMMENTS</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">7</property>
> <property name="name">CUSTOMERNUMBER</property>
> <property name="nativeName">CUSTOMERNUMBER</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> </list-property>
> <property name="queryText">select *
> from orders</property>
> </oda-data-set>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="orderdetails" id="8">
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">ORDERNUMBER</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRODUCTCODE</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">QUANTITYORDERED</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">PRICEEACH</property>
> <property name="dataType">float</property>
> </structure>
> <structure>
> <property name="position">5</property>
> <property name="name">ORDERLINENUMBER</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">Data Source</property>
> <list-property name="parameters">
> <structure>
> <property name="name">param_1</property>
> <property name="paramName">ordernum</property>
> <property name="nativeName"></property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> <property name="position">1</property>
> <expression name="defaultValue">10100</expression>
> <property name="isOptional">false</property>
> <property name="isInput">true</property>
> <property name="isOutput">false</property>
> </structure>
> </list-property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">ORDERNUMBER</property>
> <property name="nativeName">ORDERNUMBER</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRODUCTCODE</property>
> <property name="nativeName">PRODUCTCODE</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">QUANTITYORDERED</property>
> <property name="nativeName">QUANTITYORDERED</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">PRICEEACH</property>
> <property name="nativeName">PRICEEACH</property>
> <property name="dataType">float</property>
> <property name="nativeDataType">8</property>
> </structure>
> <structure>
> <property name="position">5</property>
> <property name="name">ORDERLINENUMBER</property>
> <property name="nativeName">ORDERLINENUMBER</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">5</property>
> </structure>
> </list-property>
> <property name="queryText">select *
> from orderdetails
> where ordernumber = ?</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>1.0</Version>
> <design:DataSetParameters>
> <design:parameterDefinitions>
> <design:inOutMode>In</design:inOutMode>
> <design:attributes>
> <design:name></design:name>
> <design:position>1</design:position>
> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
> <design:nullability>Unknown</design:nullability>
> <design:uiHints/>
> </design:attributes>
> <design:inputAttributes>
> <design:elementAttributes>
> <design:defaultScalarValue></design:defaultScalarValue>
> <design:optional>false</design:optional>
> <design:masksValue>false</design:masksValue>
> <design:dynamicValueChoices>
> <design:dataSetDesign>
> <design:name>orders</design:name>
>
> <design:odaExtensionDataSetId>org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet </design:odaExtensionDataSetId>
>
> <design:dataSourceDesign>
> <design:name>Data Source</design:name>
>
> <design:odaExtensionId>org.eclipse.birt.report.data.oda.jdbc </design:odaExtensionId>
>
> <design:displayName></design:displayName>
> <design:publicProperties>
> <design:properties>
> <design:nameValue>
> <design:name>odaDriverClass</design:name>
>
> <design:value>org.eclipse.birt.report.data.oda.sampledb.Driver </design:value>
>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>odaURL</design:name>
>
> <design:value>jdbc:classicmodels:sampledb</design:value>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>odaUser</design:name>
> <design:value>ClassicModels</design:value>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>odaPassword</design:name>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>odaJndiName</design:name>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>OdaConnProfileName</design:name>
> </design:nameValue>
> </design:properties>
> <design:properties>
> <design:nameValue>
> <design:name>OdaConnProfileStorePath</design:name>
> </design:nameValue>
> </design:properties>
> </design:publicProperties>
> </design:dataSourceDesign>
> <design:query>
> <design:queryText>select *
> from orders</design:queryText>
> </design:query>
> <design:publicProperties>
> <design:properties>
> <design:nameValue>
> <design:name>queryTimeOut</design:name>
> </design:nameValue>
> </design:properties>
> </design:publicProperties>
> <design:resultSets>
> <design:resultSetDefinitions>
> <design:resultSetColumns>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>ORDERNUMBER</design:name>
> <design:position>1</design:position>
>
> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>ORDERDATE</design:name>
> <design:position>2</design:position>
>
> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>REQUIREDDATE</design:name>
> <design:position>3</design:position>
>
> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>SHIPPEDDATE</design:name>
> <design:position>4</design:position>
>
> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>STATUS</design:name>
> <design:position>5</design:position>
>
> <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>COMMENTS</design:name>
> <design:position>6</design:position>
>
> <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>CUSTOMERNUMBER</design:name>
> <design:position>7</design:position>
>
> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
> </design:attributes>
> </design:resultColumnDefinitions>
> </design:resultSetColumns>
> </design:resultSetDefinitions>
> </design:resultSets>
> </design:dataSetDesign>
> <design:enabled>true</design:enabled>
>
> <design:valueColumn>row[&quot;ORDERNUMBER&quot;]</design:valueColumn >
> </design:dynamicValueChoices>
> <design:uiHints>
> <design:promptStyle>SelectableList</design:promptStyle>
> </design:uiHints>
> </design:elementAttributes>
> <design:uiHints/>
> </design:inputAttributes>
> </design:parameterDefinitions>
> </design:DataSetParameters>
> </model:DesignValues>]]></xml-property>
> </oda-data-set>
> </data-sets>
> <styles>
> <style name="crosstab" id="4">
> <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-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>
> </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>
> <data id="12">
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">prodcode</property>
> <expression
> name="expression">params["prodcode"]</expression>
> </structure>
> </list-property>
> <property name="resultSetColumn">prodcode</property>
> </data>
> </body>
> </report>
>
>
> Marcin Kierdelewicz wrote:
>> Dear Jason,
>> thank you for you answer.
>> I can't relly use default value in my case because I need to hide
>> somehow empty value not from the first parameter in cascading only in
>> others and I don't know what value they have because they are based on
>> first parameter value.
>>
>> With reference to your example I would like to hide first empty
>> position in prodcode parameter.
>> Is it possible to enter in default value any expression or function
>> that displays first entry instead of empty row maybe?
>> Could you help me with this, please?
>>
>> Thank you very much. I am really impressed with your knowledge. Every
>> solution you give always works!
>>
>> Best regards
>> Marcin Kierdelewicz
>>
>>
>> Jason Weathersby wrote:
>>> Marcin,
>>>
>>> You need to set a default value if you do not want the first entry to
>>> show blank.
>>>
>>> Take a look at this simple report and notice the first one does have
>>> a default value and the second does not.
>>>
>>> Jason
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <report xmlns="http://www.eclipse.org/birt/2005/design"
>>> version="3.2.14" id="1">
>>> <property name="createdBy">Eclipse BIRT Designer Version
>>> 2.2.0.v20070620 Build &lt;2.2.0.v20070626-1003></property>
>>> <property name="units">in</property>
>>> <property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
>>> Name here>></property>
>>> <html-property name="description">Creates a blank report with no
>>> predefined content.</html-property>
>>> <text-property name="displayName">Blank Report</text-property>
>>> <property name="iconFile">/templates/blank_report.gif</property>
>>> <parameters>
>>> <cascading-parameter-group name="NewCascadingParameterGroup"
>>> id="9">
>>> <property name="dataSetMode">multiple</property>
>>> <parameters>
>>> <scalar-parameter name="ordernum" id="10">
>>> <property name="valueType">dynamic</property>
>>> <property name="isRequired">true</property>
>>> <property name="controlType">list-box</property>
>>> <property name="dataSetName">orders</property>
>>> <expression
>>> name="valueExpr">row["ORDERNUMBER"]</expression>
>>> <property name="defaultValue">10101</property>
>>> <structure name="format">
>>> <property name="category">Unformatted</property>
>>> </structure>
>>> </scalar-parameter>
>>> <scalar-parameter name="prodcode" id="11">
>>> <property name="valueType">dynamic</property>
>>> <property name="isRequired">true</property>
>>> <property name="controlType">list-box</property>
>>> <property name="dataSetName">orderdetails</property>
>>> <expression
>>> name="valueExpr">row["PRODUCTCODE"]</expression>
>>> <property name="defaultValue"></property>
>>> <structure name="format">
>>> <property name="category">Unformatted</property>
>>> </structure>
>>> </scalar-parameter>
>>> </parameters>
>>> </cascading-parameter-group>
>>> </parameters>
>>> <data-sources>
>>> <oda-data-source
>>> extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data
>>> Source" id="6">
>>> <text-property name="displayName"></text-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="orders" id="7">
>>> <structure name="cachedMetaData">
>>> <list-property name="resultSet">
>>> <structure>
>>> <property name="position">1</property>
>>> <property name="name">ORDERNUMBER</property>
>>> <property name="dataType">integer</property>
>>> </structure>
>>> <structure>
>>> <property name="position">2</property>
>>> <property name="name">ORDERDATE</property>
>>> <property name="dataType">date</property>
>>> </structure>
>>> <structure>
>>> <property name="position">3</property>
>>> <property name="name">REQUIREDDATE</property>
>>> <property name="dataType">date</property>
>>> </structure>
>>> <structure>
>>> <property name="position">4</property>
>>> <property name="name">SHIPPEDDATE</property>
>>> <property name="dataType">date</property>
>>> </structure>
>>> <structure>
>>> <property name="position">5</property>
>>> <property name="name">STATUS</property>
>>> <property name="dataType">string</property>
>>> </structure>
>>> <structure>
>>> <property name="position">6</property>
>>> <property name="name">COMMENTS</property>
>>> <property name="dataType">string</property>
>>> </structure>
>>> <structure>
>>> <property name="position">7</property>
>>> <property name="name">CUSTOMERNUMBER</property>
>>> <property name="dataType">integer</property>
>>> </structure>
>>> </list-property>
>>> </structure>
>>> <property name="dataSource">Data Source</property>
>>> <list-property name="resultSet">
>>> <structure>
>>> <property name="position">1</property>
>>> <property name="name">ORDERNUMBER</property>
>>> <property name="nativeName">ORDERNUMBER</property>
>>> <property name="dataType">integer</property>
>>> <property name="nativeDataType">4</property>
>>> </structure>
>>> <structure>
>>> <property name="position">2</property>
>>> <property name="name">ORDERDATE</property>
>>> <property name="nativeName">ORDERDATE</property>
>>> <property name="dataType">date</property>
>>> <property name="nativeDataType">91</property>
>>> </structure>
>>> <structure>
>>> <property name="position">3</property>
>>> <property name="name">REQUIREDDATE</property>
>>> <property name="nativeName">REQUIREDDATE</property>
>>> <property name="dataType">date</property>
>>> <property name="nativeDataType">91</property>
>>> </structure>
>>> <structure>
>>> <property name="position">4</property>
>>> <property name="name">SHIPPEDDATE</property>
>>> <property name="nativeName">SHIPPEDDATE</property>
>>> <property name="dataType">date</property>
>>> <property name="nativeDataType">91</property>
>>> </structure>
>>> <structure>
>>> <property name="position">5</property>
>>> <property name="name">STATUS</property>
>>> <property name="nativeName">STATUS</property>
>>> <property name="dataType">string</property>
>>> <property name="nativeDataType">12</property>
>>> </structure>
>>> <structure>
>>> <property name="position">6</property>
>>> <property name="name">COMMENTS</property>
>>> <property name="nativeName">COMMENTS</property>
>>> <property name="dataType">string</property>
>>> <property name="nativeDataType">12</property>
>>> </structure>
>>> <structure>
>>> <property name="position">7</property>
>>> <property name="name">CUSTOMERNUMBER</property>
>>> <property
>>> name="nativeName">CUSTOMERNUMBER</property>
>>> <property name="dataType">integer</property>
>>> <property name="nativeDataType">4</property>
>>> </structure>
>>> </list-property>
>>> <property name="queryText">select *
>>> from orders</property>
>>> </oda-data-set>
>>> <oda-data-set
>>> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
>>> name="orderdetails" id="8">
>>> <structure name="cachedMetaData">
>>> <list-property name="resultSet">
>>> <structure>
>>> <property name="position">1</property>
>>> <property name="name">ORDERNUMBER</property>
>>> <property name="dataType">integer</property>
>>> </structure>
>>> <structure>
>>> <property name="position">2</property>
>>> <property name="name">PRODUCTCODE</property>
>>> <property name="dataType">string</property>
>>> </structure>
>>> <structure>
>>> <property name="position">3</property>
>>> <property name="name">QUANTITYORDERED</property>
>>> <property name="dataType">integer</property>
>>> </structure>
>>> <structure>
>>> <property name="position">4</property>
>>> <property name="name">PRICEEACH</property>
>>> <property name="dataType">float</property>
>>> </structure>
>>> <structure>
>>> <property name="position">5</property>
>>> <property name="name">ORDERLINENUMBER</property>
>>> <property name="dataType">integer</property>
>>> </structure>
>>> </list-property>
>>> </structure>
>>> <property name="dataSource">Data Source</property>
>>> <list-property name="parameters">
>>> <structure>
>>> <property name="name">param_1</property>
>>> <property name="paramName">ordernum</property>
>>> <property name="nativeName"></property>
>>> <property name="dataType">integer</property>
>>> <property name="nativeDataType">4</property>
>>> <property name="position">1</property>
>>> <expression name="defaultValue">10100</expression>
>>> <property name="isOptional">false</property>
>>> <property name="isInput">true</property>
>>> <property name="isOutput">false</property>
>>> </structure>
>>> </list-property>
>>> <list-property name="resultSet">
>>> <structure>
>>> <property name="position">1</property>
>>> <property name="name">ORDERNUMBER</property>
>>> <property name="nativeName">ORDERNUMBER</property>
>>> <property name="dataType">integer</property>
>>> <property name="nativeDataType">4</property>
>>> </structure>
>>> <structure>
>>> <property name="position">2</property>
>>> <property name="name">PRODUCTCODE</property>
>>> <property name="nativeName">PRODUCTCODE</property>
>>> <property name="dataType">string</property>
>>> <property name="nativeDataType">12</property>
>>> </structure>
>>> <structure>
>>> <property name="position">3</property>
>>> <property name="name">QUANTITYORDERED</property>
>>> <property
>>> name="nativeName">QUANTITYORDERED</property>
>>> <property name="dataType">integer</property>
>>> <property name="nativeDataType">4</property>
>>> </structure>
>>> <structure>
>>> <property name="position">4</property>
>>> <property name="name">PRICEEACH</property>
>>> <property name="nativeName">PRICEEACH</property>
>>> <property name="dataType">float</property>
>>> <property name="nativeDataType">8</property>
>>> </structure>
>>> <structure>
>>> <property name="position">5</property>
>>> <property name="name">ORDERLINENUMBER</property>
>>> <property
>>> name="nativeName">ORDERLINENUMBER</property>
>>> <property name="dataType">integer</property>
>>> <property name="nativeDataType">5</property>
>>> </structure>
>>> </list-property>
>>> <property name="queryText">select *
>>> from orderdetails
>>> where ordernumber = ?</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>1.0</Version>
>>> <design:DataSetParameters>
>>> <design:parameterDefinitions>
>>> <design:inOutMode>In</design:inOutMode>
>>> <design:attributes>
>>> <design:name></design:name>
>>> <design:position>1</design:position>
>>> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
>>> <design:nullability>Unknown</design:nullability>
>>> <design:uiHints/>
>>> </design:attributes>
>>> <design:inputAttributes>
>>> <design:elementAttributes>
>>> <design:defaultScalarValue></design:defaultScalarValue>
>>> <design:optional>false</design:optional>
>>> <design:masksValue>false</design:masksValue>
>>> <design:dynamicValueChoices>
>>> <design:dataSetDesign>
>>> <design:name>orders</design:name>
>>>
>>> <design:odaExtensionDataSetId>org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet </design:odaExtensionDataSetId>
>>>
>>> <design:dataSourceDesign>
>>> <design:name>Data Source</design:name>
>>>
>>> <design:odaExtensionId>org.eclipse.birt.report.data.oda.jdbc </design:odaExtensionId>
>>>
>>> <design:displayName></design:displayName>
>>> <design:publicProperties>
>>> <design:properties>
>>> <design:nameValue>
>>> <design:name>odaDriverClass</design:name>
>>>
>>> <design:value>org.eclipse.birt.report.data.oda.sampledb.Driver </design:value>
>>>
>>> </design:nameValue>
>>> </design:properties>
>>> <design:properties>
>>> <design:nameValue>
>>> <design:name>odaURL</design:name>
>>>
>>> <design:value>jdbc:classicmodels:sampledb</design:value>
>>> </design:nameValue>
>>> </design:properties>
>>> <design:properties>
>>> <design:nameValue>
>>> <design:name>odaUser</design:name>
>>> <design:value>ClassicModels</design:value>
>>> </design:nameValue>
>>> </design:properties>
>>> <design:properties>
>>> <design:nameValue>
>>> <design:name>odaPassword</design:name>
>>> </design:nameValue>
>>> </design:properties>
>>> <design:properties>
>>> <design:nameValue>
>>> <design:name>odaJndiName</design:name>
>>> </design:nameValue>
>>> </design:properties>
>>> <design:properties>
>>> <design:nameValue>
>>> <design:name>OdaConnProfileName</design:name>
>>> </design:nameValue>
>>> </design:properties>
>>> <design:properties>
>>> <design:nameValue>
>>> <design:name>OdaConnProfileStorePath</design:name>
>>> </design:nameValue>
>>> </design:properties>
>>> </design:publicProperties>
>>> </design:dataSourceDesign>
>>> <design:query>
>>> <design:queryText>select *
>>> from orders</design:queryText>
>>> </design:query>
>>> <design:publicProperties>
>>> <design:properties>
>>> <design:nameValue>
>>> <design:name>queryTimeOut</design:name>
>>> </design:nameValue>
>>> </design:properties>
>>> </design:publicProperties>
>>> <design:resultSets>
>>> <design:resultSetDefinitions>
>>> <design:resultSetColumns>
>>> <design:resultColumnDefinitions>
>>> <design:attributes>
>>> <design:name>ORDERNUMBER</design:name>
>>> <design:position>1</design:position>
>>>
>>> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
>>> </design:attributes>
>>> </design:resultColumnDefinitions>
>>> <design:resultColumnDefinitions>
>>> <design:attributes>
>>> <design:name>ORDERDATE</design:name>
>>> <design:position>2</design:position>
>>>
>>> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
>>> </design:attributes>
>>> </design:resultColumnDefinitions>
>>> <design:resultColumnDefinitions>
>>> <design:attributes>
>>> <design:name>REQUIREDDATE</design:name>
>>> <design:position>3</design:position>
>>>
>>> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
>>> </design:attributes>
>>> </design:resultColumnDefinitions>
>>> <design:resultColumnDefinitions>
>>> <design:attributes>
>>> <design:name>SHIPPEDDATE</design:name>
>>> <design:position>4</design:position>
>>>
>>> <design:nativeDataTypeCode>91</design:nativeDataTypeCode>
>>> </design:attributes>
>>> </design:resultColumnDefinitions>
>>> <design:resultColumnDefinitions>
>&g
Previous Topic:only beautifying reports
Next Topic:What is minimized plug-in for pdf creation
Goto Forum:
  


Current Time: Sat Dec 21 14:33:10 GMT 2024

Powered by FUDForum. Page generated in 0.04040 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top