Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » split() in a computed column preview different from displayed in report
split() in a computed column preview different from displayed in report [message #630314] Fri, 01 October 2010 14:57 Go to next message
Chris Chubb is currently offline Chris Chubb
Messages: 11
Registered: July 2009
Junior Member
I have a report with a number of computed columns, mostly the results of
splitting a single data field into many report fields. For example
Field3Test:
aField3 = row["Field3"].split("|");
aField3.join("*"); /*This is just to demonstrate the bug. Usually I return aField3[0] or something. */

The contents of Field3 are:
XSV||Mercedes-Benz|300M-V6|2006|WDBRF52H66A82XX|1741098|S560 590497XX|~XSV||Jeep|Wrangle|1997|1J4FY29P7PP23XX|6613725|S56 0590497XX|

When I "Preview Results" in the Data Source Editor the output for Field3Test is:
XSV**Mercedes-Benz*300M-V6*2006*WDBRF52H66A82XX*1741098*S560 590497XX*~XSV**Jeep*Wrangle*1997*1J4FY29P7PP23XX*6613725*S56 0590497XX*

That's as expected. But, when I do a "Preview" on the report (or run it on the server), the output for Field3Test is:
*X*S*V*|*|*M*e*r*c*e*d*e*s*-*B*e*n*z*|*3*0*0*M*-*V*6*|*2*0*0 *6*|*W*D*B*R*F*5*2*H*6*6*A*8*2*X*X*|*1*7*4*1*0*9*8*|*S*5*6*0 *5*9*0*4*9*7*X*X*|*~*X*S*V*|*|*J*e*e*p*|*W*r*a*n*g*l*e*|*1*9 *9*7*|*1*J*4*F*Y*2*9*P*7*P*P*2*3*X*X*|*6*6*1*3*7*2*5*|*S*5*6 *0*5*9*0*4*9*7*X*X*|

So, obviously, the Split() parameter is being run as "null" or "" when the report is actually executing in order to split on every character.

I checked the source of the .rptdesign file and the split() function is only in there once. I have tried using both single and double quotes with the split() function parameters. I have tried using a "raw" RegExp as .split(/\|/) but that doesn't split on anything in the output, returning a single string, though it still works fine in the "Preview Results" window.

Has anyone else seen this kind of behavior?
Re: split() in a computed column preview different from displayed in report [message #630372 is a reply to message #630314] Fri, 01 October 2010 18:59 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Chris,

I just tried this and I did not see the error. See my attached report:

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.21"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.5.2.v20100208 Build &lt;2.5.2.v20100210-0630></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<data-sources>
<script-data-source name="Data Source" id="7"/>
</data-sources>
<data-sets>
<script-data-set name="Data Set" id="8">
<list-property name="resultSetHints">
<structure>
<property name="position">0</property>
<property name="name">col1</property>
<property name="dataType">string</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">col1</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">col1</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<method name="open"><![CDATA[ii=0;]]></method>
<method name="fetch"><![CDATA[if( ii > 0 ) return false;

row["col1"] =
" XSV||Mercedes-Benz|300M-V6|2006|WDBRF52H66A82XX|1741098|S560
590497XX|~XSV||Jeep|Wrangle|1997|1J4FY29P7PP23XX|6613725|S56 0590497XX|"
ii++;
return true;]]></method>
</script-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="6">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property
name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<table id="9">
<property name="dataSet">Data Set</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">col1</property>
<text-property name="displayName">col1</text-property>
<expression name="expression"
type="javascript">dataSetRow["col1"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">Column Binding</property>
<expression name="expression"
type="javascript">dataSetRow["col1"].split('|')[2];</expression >
<property name="dataType">string</property>
</structure>
</list-property>
<column id="18"/>
<column id="22"/>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property name="text">col1</text-property>
</label>
</cell>
<cell id="19"/>
</row>
</header>
<detail>
<row id="13">
<cell id="14">
<data id="15">
<property
name="resultSetColumn">col1</property>
</data>
</cell>
<cell id="20">
<data id="23">
<property name="resultSetColumn">Column
Binding</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="16">
<cell id="17"/>
<cell id="21"/>
</row>
</footer>
</table>
</body>
</report>


On 10/1/2010 10:57 AM, Chris Chubb wrote:
> I have a report with a number of computed columns, mostly the results of
> splitting a single data field into many report fields. For example
> Field3Test:
> aField3 = row["Field3"].split("|");
> aField3.join("*"); /*This is just to demonstrate the bug. Usually I
> return aField3[0] or something. */
>
> The contents of Field3 are:
> XSV||Mercedes-Benz|300M-V6|2006|WDBRF52H66A82XX|1741098|S560
> 590497XX|~XSV||Jeep|Wrangle|1997|1J4FY29P7PP23XX|6613725|S56 0590497XX|
>
> When I "Preview Results" in the Data Source Editor the output for
> Field3Test is:
> XSV**Mercedes-Benz*300M-V6*2006*WDBRF52H66A82XX*1741098*S560
> 590497XX*~XSV**Jeep*Wrangle*1997*1J4FY29P7PP23XX*6613725*S56 0590497XX*
> That's as expected. But, when I do a "Preview" on the report (or run it
> on the server), the output for Field3Test is:
> *X*S*V*|*|*M*e*r*c*e*d*e*s*-*B*e*n*z*|*3*0*0*M*-*V*6*|*2*0*0
> *6*|*W*D*B*R*F*5*2*H*6*6*A*8*2*X*X*|*1*7*4*1*0*9*8*|*S*5*6*0
> *5*9*0*4*9*7*X*X*|*~*X*S*V*|*|*J*e*e*p*|*W*r*a*n*g*l*e*|*1*9
> *9*7*|*1*J*4*F*Y*2*9*P*7*P*P*2*3*X*X*|*6*6*1*3*7*2*5*|*S*5*6
> *0*5*9*0*4*9*7*X*X*|
>
> So, obviously, the Split() parameter is being run as "null" or "" when
> the report is actually executing in order to split on every character.
> I checked the source of the .rptdesign file and the split() function is
> only in there once. I have tried using both single and double quotes
> with the split() function parameters. I have tried using a "raw" RegExp
> as .split(/\|/) but that doesn't split on anything in the output,
> returning a single string, though it still works fine in the "Preview
> Results" window.
>
> Has anyone else seen this kind of behavior?
Re: split() in a computed column preview different from displayed in report [message #630728 is a reply to message #630372] Mon, 04 October 2010 17:36 Go to previous messageGo to next message
Chris Chubb is currently offline Chris Chubb
Messages: 11
Registered: July 2009
Junior Member
Jason,

I really appreciate the test file. But I can't seem to run it. I saved the XML as a .rptdesign file and when I try to run it I get:

Errors in Report
Line 138: The column binding for the data "report.Body[0].Detail[0].Cells[1].Content[0]" with column name "Column
Binding" is not defined.

I can't seem to edit the Data Source methods for open() or fetch() either.

Eclipse: Build id: 20100218-1602
BIRT: Version: 2.5.2.v20090925
Eclipse Data Tools Platform Enablement: Version: 1.7.2.v200909251450

How do I get yours to run? Do I need to upgrade?
Re: split() in a computed column preview different from displayed in report [message #630735 is a reply to message #630728] Mon, 04 October 2010 17:59 Go to previous messageGo to next message
Chris Chubb is currently offline Chris Chubb
Messages: 11
Registered: July 2009
Junior Member
Jason,

I got the sample to run after fixing some JS errors from copy/paste. It's working as you say.

Unfortunately, the Scripted Data Source doesn't allow you to create Computed Columns. I think that's where the problem lays. I am working on a sample report that will show it.

Re: split() in a computed column preview different from displayed in report [message #630749 is a reply to message #630735] Mon, 04 October 2010 19:03 Go to previous messageGo to next message
Chris Chubb is currently offline Chris Chubb
Messages: 11
Registered: July 2009
Junior Member
Well, I figured out the problem, but I still don't know why.

In my original report I had added a factory method to add some logging when errors were encountered by end users, but then disabled it.
Quote:

<report ....
<method name="beforeFactory"><![CDATA[importPackage( Packages.java.util );
importPackage( Packages.java.lang );
importPackage(Packages.java.util.logging);
//var fileHandler = new FileHandler("/temp/birt.log", true);
//var rootLogger = Logger.getLogger("");
//rootLogger.addHandler(fileHandler);]]></method>




When I removed that <method> block, the report works perfectly. When put back in, the split() function doesn't work in the report engine. Still no idea why importing two packages that I then don't use would affect the way it splits without throwing an error unless it has something to do with encoding of the text or the parameters.

Jason, thanks again.
Re: split() in a computed column preview different from displayed in report [message #630935 is a reply to message #630749] Tue, 05 October 2010 15:37 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Chris,

This seems odd. Did you ever come up with an example that would
illustrate the issue?

Jason

On 10/4/2010 3:03 PM, Chris Chubb wrote:
> Well, I figured out the problem, but I still don't know why.
>
> In my original report I had added a factory method to add some logging
> when errors were encountered by end users, but then disabled it. Quote:
>> <report ....
>> <method name="beforeFactory"><![CDATA[importPackage(
>> Packages.java.util );
>> importPackage( Packages.java.lang );
>> importPackage(Packages.java.util.logging);
>> //var fileHandler = new FileHandler("/temp/birt.log", true);
>> //var rootLogger = Logger.getLogger("");
>> //rootLogger.addHandler(fileHandler);]]></method>
>
>
> When I removed that <method> block, the report works perfectly. When put
> back in, the split() function doesn't work in the report engine. Still
> no idea why importing two packages that I then don't use would affect
> the way it splits without throwing an error unless it has something to
> do with encoding of the text or the parameters.
> Jason, thanks again.
Re: split() in a computed column preview different from displayed in report [message #630950 is a reply to message #630935] Tue, 05 October 2010 15:50 Go to previous messageGo to next message
Chris Chubb is currently offline Chris Chubb
Messages: 11
Registered: July 2009
Junior Member
Jason Weathersby wrote on Tue, 05 October 2010 11:37
Chris,

This seems odd. Did you ever come up with an example that would
illustrate the issue?

Jason



If I get a chance today I am going to add that <method> signature to your example and see if it fubars the output. Stay tuned...
Re: split() in a computed column preview different from displayed in report [message #630964 is a reply to message #630314] Tue, 05 October 2010 16:16 Go to previous messageGo to next message
Chris Chubb is currently offline Chris Chubb
Messages: 11
Registered: July 2009
Junior Member
Here is a sample report that demonstrates how the <method> tag messes up the split() function.

Because split() is acting like it's being called with a NULL or "" parameter, I am guessing that something in the Packages.java.lang package is setting or resetting a codepage (encoding) setting and that's messing up the params used in the method call. Would it overload split() and the method guesser is guessing the wrong method signature? I'm a bit out of my Java depth at this point...


<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.21" id="1">
    <property name="createdBy">Eclipse BIRT Designer Version 2.5.2.v20100208 Build &lt;2.5.2.v20100210-0630></property>
    <property name="units">in</property>
    <method name="beforeFactory"><![CDATA[
importPackage( Packages.java.lang );
]]></method>
    <property name="iconFile">/templates/blank_report.gif</property>
    <property name="bidiLayoutOrientation">ltr</property>
    <property name="imageDPI">96</property>
    <data-sources>
        <script-data-source name="Data Source" id="7"/>
    </data-sources>
    <data-sets>
        <script-data-set name="Data Set" id="8">
            <list-property name="resultSetHints">
                <structure>
                    <property name="position">0</property>
                    <property name="name">col1</property>
                    <property name="dataType">string</property>
                </structure>
            </list-property>
            <list-property name="columnHints">
                <structure>
                    <property name="columnName">col1</property>
                </structure>
            </list-property>
            <structure name="cachedMetaData">
                <list-property name="resultSet">
                    <structure>
                        <property name="position">1</property>
                        <property name="name">col1</property>
                        <property name="dataType">string</property>
                    </structure>
                </list-property>
            </structure>
            <property name="dataSource">Data Source</property>
            <method name="open"><![CDATA[
				ii=0;
			]]></method>
            <method name="fetch"><![CDATA[
				if( ii > 0 ) return false;

				row["col1"] = " XSV||Mercedes-Benz|300M-V6|2006|WDBRF52H66A82XX|1741098|S560590497XX|~XSV||Jeep|Wrangle|1997|1J4FY29P7PP23XX|6613725|S56 0590497XX|";
				ii++;
				return true;
			]]></method>
        </script-data-set>
    </data-sets>
    <styles>
        <style name="report" id="4">
            <property name="fontFamily">sans-serif</property>
            <property name="fontSize">10pt</property>
        </style>
        <style name="crosstab-cell" id="5">
            <property name="borderBottomColor">#CCCCCC</property>
            <property name="borderBottomStyle">solid</property>
            <property name="borderBottomWidth">1pt</property>
            <property name="borderLeftColor">#CCCCCC</property>
            <property name="borderLeftStyle">solid</property>
            <property name="borderLeftWidth">1pt</property>
            <property name="borderRightColor">#CCCCCC</property>
            <property name="borderRightStyle">solid</property>
            <property name="borderRightWidth">1pt</property>
            <property name="borderTopColor">#CCCCCC</property>
            <property name="borderTopStyle">solid</property>
            <property name="borderTopWidth">1pt</property>
        </style>
        <style name="crosstab" id="6">
            <property name="borderBottomColor">#CCCCCC</property>
            <property name="borderBottomStyle">solid</property>
            <property name="borderBottomWidth">1pt</property>
            <property name="borderLeftColor">#CCCCCC</property>
            <property name="borderLeftStyle">solid</property>
            <property name="borderLeftWidth">1pt</property>
            <property name="borderRightColor">#CCCCCC</property>
            <property name="borderRightStyle">solid</property>
            <property name="borderRightWidth">1pt</property>
            <property name="borderTopColor">#CCCCCC</property>
            <property name="borderTopStyle">solid</property>
            <property name="borderTopWidth">1pt</property>
        </style>
    </styles>
    <page-setup>
        <simple-master-page name="Simple MasterPage" id="2">
            <page-footer>
                <text id="3">
                    <property name="contentType">html</property>
                    <text-property name="content"><![CDATA[
					<value-of>new Date()</value-of>
				]]></text-property>
                </text>
            </page-footer>
        </simple-master-page>
    </page-setup>
    <body>
        <table id="9">
            <property name="dataSet">Data Set</property>
            <list-property name="boundDataColumns">
                <structure>
                    <property name="name">col1</property>
                    <text-property name="displayName">col1</text-property>
                    <expression name="expression" type="javascript">dataSetRow["col1"]</expression>
                    <property name="dataType">string</property>
                </structure>
                <structure>
                    <property name="name">Column Binding</property>
                    <expression name="expression" type="javascript">dataSetRow["col1"].split('|')[2];</expression>
                    <property name="dataType">string</property>
                </structure>
                <structure>
                    <property name="name">Column_Binding_1</property>
                    <expression name="expression" type="javascript">dataSetRow["col1"].split('|')[2];</expression>
                    <property name="dataType">string</property>
                </structure>
            </list-property>
            <column id="18"/>
            <column id="22"/>
            <header>
                <row id="10">
                    <cell id="11">
                        <property name="borderBottomColor">#000000</property>
                        <property name="borderBottomStyle">solid</property>
                        <property name="borderBottomWidth">thin</property>
                        <property name="borderLeftColor">#000000</property>
                        <property name="borderLeftStyle">solid</property>
                        <property name="borderLeftWidth">thin</property>
                        <property name="borderRightColor">#000000</property>
                        <property name="borderRightStyle">solid</property>
                        <property name="borderRightWidth">thin</property>
                        <property name="borderTopColor">#000000</property>
                        <property name="borderTopStyle">solid</property>
                        <property name="borderTopWidth">thin</property>
                        <label id="12">
                            <text-property name="text">col1</text-property>
                        </label>
                    </cell>
                    <cell id="19">
                        <property name="borderBottomColor">#000000</property>
                        <property name="borderBottomStyle">solid</property>
                        <property name="borderBottomWidth">thin</property>
                        <property name="borderLeftColor">#000000</property>
                        <property name="borderLeftStyle">solid</property>
                        <property name="borderLeftWidth">thin</property>
                        <property name="borderRightColor">#000000</property>
                        <property name="borderRightStyle">solid</property>
                        <property name="borderRightWidth">thin</property>
                        <property name="borderTopColor">#000000</property>
                        <property name="borderTopStyle">solid</property>
                        <property name="borderTopWidth">thin</property>
                    </cell>
                </row>
            </header>
            <detail>
                <row id="13">
                    <cell id="14">
                        <property name="borderBottomColor">#000000</property>
                        <property name="borderBottomStyle">solid</property>
                        <property name="borderBottomWidth">thin</property>
                        <property name="borderLeftColor">#000000</property>
                        <property name="borderLeftStyle">solid</property>
                        <property name="borderLeftWidth">thin</property>
                        <property name="borderRightColor">#000000</property>
                        <property name="borderRightStyle">solid</property>
                        <property name="borderRightWidth">thin</property>
                        <property name="borderTopColor">#000000</property>
                        <property name="borderTopStyle">solid</property>
                        <property name="borderTopWidth">thin</property>
                        <data id="15">
                            <property name="resultSetColumn">col1</property>
                        </data>
                    </cell>
                    <cell id="20">
                        <property name="borderBottomColor">#000000</property>
                        <property name="borderBottomStyle">solid</property>
                        <property name="borderBottomWidth">thin</property>
                        <property name="borderLeftColor">#000000</property>
                        <property name="borderLeftStyle">solid</property>
                        <property name="borderLeftWidth">thin</property>
                        <property name="borderRightColor">#000000</property>
                        <property name="borderRightStyle">solid</property>
                        <property name="borderRightWidth">thin</property>
                        <property name="borderTopColor">#000000</property>
                        <property name="borderTopStyle">solid</property>
                        <property name="borderTopWidth">thin</property>
                        <data id="23">
                            <property name="resultSetColumn">Column_Binding_1</property>
                        </data>
                    </cell>
                </row>
            </detail>
            <footer>
                <row id="16">
                    <cell id="17">
                        <property name="borderBottomColor">#000000</property>
                        <property name="borderBottomStyle">solid</property>
                        <property name="borderBottomWidth">thin</property>
                        <property name="borderLeftColor">#000000</property>
                        <property name="borderLeftStyle">solid</property>
                        <property name="borderLeftWidth">thin</property>
                        <property name="borderRightColor">#000000</property>
                        <property name="borderRightStyle">solid</property>
                        <property name="borderRightWidth">thin</property>
                        <property name="borderTopColor">#000000</property>
                        <property name="borderTopStyle">solid</property>
                        <property name="borderTopWidth">thin</property>
                    </cell>
                    <cell id="21">
                        <property name="borderBottomColor">#000000</property>
                        <property name="borderBottomStyle">solid</property>
                        <property name="borderBottomWidth">thin</property>
                        <property name="borderLeftColor">#000000</property>
                        <property name="borderLeftStyle">solid</property>
                        <property name="borderLeftWidth">thin</property>
                        <property name="borderRightColor">#000000</property>
                        <property name="borderRightStyle">solid</property>
                        <property name="borderRightWidth">thin</property>
                        <property name="borderTopColor">#000000</property>
                        <property name="borderTopStyle">solid</property>
                        <property name="borderTopWidth">thin</property>
                    </cell>
                </row>
            </footer>
        </table>
    </body>
</report>



[Updated on: Tue, 05 October 2010 18:16]

Report message to a moderator

Re: split() in a computed column preview different from displayed in report [message #631187 is a reply to message #630964] Wed, 06 October 2010 14:05 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Chris,

I believe this has to do with the import of java lang. The expression is
trying to use the Java string split instead of the JavaScript function
split. If you take your example and use this expression
dataSetRow["col1"].split('\\|')[2];
it will work.

Jason

On 10/5/2010 12:16 PM, Chris Chubb wrote:
> Here is a sample report that demonstrates how the <method> tag messes up
> the split() function.
>
> Because split() is acting like it's being called with a NULL or ""
> parameter, I am guessing that something in one of those import packages
> is setting or resetting a codepage (encoding) setting and that's messing
> up the params used in the method call.
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.21"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version 2.5.2.v20100208
> Build <2.5.2.v20100210-0630></property>
> <property name="units">in</property>
> <method name="beforeFactory"><![CDATA[importPackage( Packages.java.util );
> importPackage( Packages.java.lang );
> importPackage(Packages.java.util.logging);
> //var fileHandler = new FileHandler("/temp/birt.log", true);
> //var rootLogger = Logger.getLogger("");
> //rootLogger.addHandler(fileHandler);]]></method>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <property name="imageDPI">96</property>
> <data-sources>
> <script-data-source name="Data Source" id="7"/>
> </data-sources>
> <data-sets>
> <script-data-set name="Data Set" id="8">
> <list-property name="resultSetHints">
> <structure>
> <property name="position">0</property>
> <property name="name">col1</property>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <list-property name="columnHints">
> <structure>
> <property name="columnName">col1</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">col1</property>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">Data Source</property>
> <method name="open"><![CDATA[
> ii=0;
> ]]></method>
> <method name="fetch"><![CDATA[
> if( ii > 0 ) return false;
>
> row["col1"] = "
> XSV||Mercedes-Benz|300M-V6|2006|WDBRF52H66A82XX|1741098|S560 590497XX|~XSV||Jeep|Wrangle|1997|1J4FY29P7PP23XX|6613725|S56
> 0590497XX|";
> ii++;
> return true;
> ]]></method>
> </script-data-set>
> </data-sets>
> <styles>
> <style name="report" id="4">
> <property name="fontFamily">sans-serif</property>
> <property name="fontSize">10pt</property>
> </style>
> <style name="crosstab-cell" id="5">
> <property name="borderBottomColor">#CCCCCC</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">1pt</property>
> <property name="borderLeftColor">#CCCCCC</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">1pt</property>
> <property name="borderRightColor">#CCCCCC</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">1pt</property>
> <property name="borderTopColor">#CCCCCC</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">1pt</property>
> </style>
> <style name="crosstab" id="6">
> <property name="borderBottomColor">#CCCCCC</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">1pt</property>
> <property name="borderLeftColor">#CCCCCC</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">1pt</property>
> <property name="borderRightColor">#CCCCCC</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">1pt</property>
> <property name="borderTopColor">#CCCCCC</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">1pt</property>
> </style>
> </styles>
> <page-setup>
> <simple-master-page name="Simple MasterPage" id="2">
> <page-footer>
> <text id="3">
> <property name="contentType">html</property>
> <text-property name="content"><![CDATA[
> <value-of>new Date()</value-of>
> ]]></text-property>
> </text>
> </page-footer>
> </simple-master-page>
> </page-setup>
> <body>
> <table id="9">
> <property name="dataSet">Data Set</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">col1</property>
> <text-property name="displayName">col1</text-property>
> <expression name="expression"
> type="javascript">dataSetRow["col1"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">Column Binding</property>
> <expression name="expression"
> type="javascript">dataSetRow["col1"].split('|')[2];</expression >
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">Column_Binding_1</property>
> <expression name="expression"
> type="javascript">dataSetRow["col1"].split('|')[2];</expression >
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <column id="18"/>
> <column id="22"/>
> <header>
> <row id="10">
> <cell id="11">
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderLeftColor">#000000</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">thin</property>
> <property name="borderRightColor">#000000</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">thin</property>
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> <label id="12">
> <text-property name="text">col1</text-property>
> </label>
> </cell>
> <cell id="19">
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderLeftColor">#000000</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">thin</property>
> <property name="borderRightColor">#000000</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">thin</property>
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> </cell>
> </row>
> </header>
> <detail>
> <row id="13">
> <cell id="14">
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderLeftColor">#000000</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">thin</property>
> <property name="borderRightColor">#000000</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">thin</property>
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> <data id="15">
> <property name="resultSetColumn">col1</property>
> </data>
> </cell>
> <cell id="20">
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderLeftColor">#000000</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">thin</property>
> <property name="borderRightColor">#000000</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">thin</property>
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> <data id="23">
> <property name="resultSetColumn">Column_Binding_1</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="16">
> <cell id="17">
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderLeftColor">#000000</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">thin</property>
> <property name="borderRightColor">#000000</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">thin</property>
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> </cell>
> <cell id="21">
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderLeftColor">#000000</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">thin</property>
> <property name="borderRightColor">#000000</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">thin</property>
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> </cell>
> </row>
> </footer>
> </table>
> </body>
> </report>
>
>
>
>
Previous Topic:Adding Oracle 11G OID DataSource in BIRT
Next Topic:SQl Query Performance in BIRT
Goto Forum:
  


Current Time: Sat Oct 25 08:48:17 GMT 2014

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

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