Skip to main content



      Home
Home » Archived » BIRT » XML import iteration problem
XML import iteration problem [message #1082294] Thu, 08 August 2013 07:13 Go to next message
Eclipse UserFriend
Continuing our evaluation of BIRT I'm trying to import XML test data which should produce a table of 5 test conditions and X & Y values for the results. The problem is that the X * Y results do not display either in preview or any of the outputs however the(empty)rows for those results are displayed.
I've tried various combinations of row mapping in data setsbut no luck. The correct number of rows can be shown by using a column containing row._rownum and using an external border also shows the correct size of output table.

The XML file looks like this:
Quote:


<ROWSET>
<ROW>
Preamble
<CONDITIONS>
<CONDITIONS_ROW>
<COND_SHORT>Test 1</COND_SHORT>
<COND>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>Value 1</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>---</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
</COND_ROW>
</COND>
<CURVE>
<CURVE_ROW>
<MPAR>---</MPAR>
<PARAMETER>---</PARAMETER>
<UNIT_Y>---</UNIT_Y>
<UNIT_X>---</UNIT_X>
<COORD>
<COORD_ROW>
<X>x1</X>
<Y>y1</Y>
</COORD_ROW>
.
.
.
<COORD_ROW>
<X>x41</X>
<Y>y41</Y>
</COORD_ROW>
</COORD>
</CURVE_ROW>
</CURVE>
</CONDITIONS_ROW>
<CONDITIONS_ROW>
<COND_SHORT>---</COND_SHORT>
<COND>
<COND_ROW>
<COND_PARAMETER>Test 2</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>Value 2</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>---</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
</COND_ROW>
</COND>
<CURVE>
<CURVE_ROW>
<MPAR>---</MPAR>
<PARAMETER>---</PARAMETER>
<UNIT_Y>---</UNIT_Y>
<UNIT_X>---</UNIT_X>
<COORD>
<COORD_ROW>
<X>x1</X>
<Y>y1</Y>
</COORD_ROW>
.
.
.
<COORD_ROW>
<X>x41</X>
<Y>y41</Y>
</COORD_ROW>
</COORD>
</CURVE_ROW>
</CURVE>
</CONDITIONS_ROW>
<CONDITIONS_ROW>
<COND_SHORT>Test 3</COND_SHORT>
<COND>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>Value 3</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>---</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
</COND_ROW>
</COND>
<CURVE>
<CURVE_ROW>
<MPAR>---</MPAR>
<PARAMETER>---</PARAMETER>
<UNIT_Y>---</UNIT_Y>
<UNIT_X>---</UNIT_X>
<COORD>
<COORD_ROW>
<X>x1</X>
<Y>y1</Y>
</COORD_ROW>
.
.
.
<COORD_ROW>
<X>x41</X>
<Y>y41</Y>
</COORD_ROW>
</COORD>
</CURVE_ROW>
</CURVE>
</CONDITIONS_ROW>
<CONDITIONS_ROW>
<COND_SHORT>Test 4</COND_SHORT>
<COND>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>Value 4</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>---</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
</COND_ROW>
</COND>
<CURVE>
<CURVE_ROW>
<MPAR>---</MPAR>
<PARAMETER>---</PARAMETER>
<UNIT_Y>---</UNIT_Y>
<UNIT_X>---</UNIT_X>
<COORD>
<COORD_ROW>
<X>x1</X>
<Y>y1</Y>
</COORD_ROW>
.
.
.
<COORD_ROW>
<X>x41</X>
<Y>y41</Y>
</COORD_ROW>
</COORD>
</CURVE_ROW>
</CURVE>
</CONDITIONS_ROW>
<CONDITIONS_ROW>
<COND_SHORT>Test 5</COND_SHORT>
<COND>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>Value 5</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
<VALUE>---</VALUE>
</COND_ROW>
<COND_ROW>
<COND_PARAMETER>---</COND_PARAMETER>
<UNIT>---</UNIT>
<TEXT_VALUE>---</TEXT_VALUE>
</COND_ROW>
</COND>
<CURVE>
<CURVE_ROW>
<MPAR>---</MPAR>
<PARAMETER>---</PARAMETER>
<UNIT_Y>---</UNIT_Y>
<UNIT_X>---</UNIT_X>
<COORD>
<COORD_ROW>
<X>x1</X>
<Y>y1</Y>
</COORD_ROW>
.
.
.
<COORD_ROW>
<X>x41</X>
<Y>y41</Y>
</COORD_ROW>
</COORD>
</CURVE_ROW>
</CURVE>
</CONDITIONS_ROW>
</CONDITIONS>
</ROW>
</ROWSET>


If I use COORD_ROW for the row mapping I get all the rows but no test condition
If I use CONDITIONS_ROW I get 5 rows for the test conditions but no results
COND_ROW gives me 3 rows for each test condition, one for the value plus 2 blanks but again no results
COORD is an improvement, giving me the first result for each test
CONDITIONS_ROW let me show the test condition plust the first results

Grouping or joint data sets have not helped.

What I'm looking for is like this:

Test 1 x1 y1
xn yn
Test 2 x1 y1
xn yn
and so on.

Any ideas?
Re: XML import iteration problem [message #1086312 is a reply to message #1082294] Wed, 14 August 2013 00:27 Go to previous messageGo to next message
Eclipse UserFriend
Sorry for the delay. What is your BIRT version? I'll take a look at it specifically in your version.
Re: XML import iteration problem [message #1086326 is a reply to message #1086312] Wed, 14 August 2013 00:57 Go to previous messageGo to next message
Eclipse UserFriend
I decided to just try this in 4.3.

I used this as a row mapping:

/ROWSET/ROW/CONDITIONS/CONDITIONS_ROW/CURVE/CURVE_ROW/COORD/COORD_ROW

And these as column mappings:

COND_SHORT: ../../../../COND_SHORT
X: /X
Y: /Y

That gave me:

Test 1 x1 y1
Test1 x41 y41
etc.
Re: XML import iteration problem [message #1090725 is a reply to message #1086326] Tue, 20 August 2013 11:01 Go to previous messageGo to next message
Eclipse UserFriend
I missed your reply, sorry. The version I'm using is 4.2.

Your row and column mappings worked fine when I tried them, thanks very much. What I am trying now is to arrange the data in 5 columns.

------Test 1------Test 2------Test 3 etc.

X1----Y1 (T1)-----Y1 (T2)-----Y1 (T3) etc.
.
.
.
.
X41---Y41 (T1)----Y2 (T2)-----Y41 (T3) etc.

Which I can manage using a cross tab. Now for a bonus point I'm trying to add an aggregate column which averages all the Y1s, Y2s etc. So far all I can add are 5 columns which give an average of each Yn only. From what I've been able to read, adding extra columns to cross tabs is not easy.
Re: XML import iteration problem [message #1091889 is a reply to message #1090725] Thu, 22 August 2013 00:38 Go to previous messageGo to next message
Eclipse UserFriend
Have you tried using the grand totals column of the crosstab? If you don't need the grand total, you can delete it and just put a different element in there to perform your calculation. Let me know. If you can attach a design and XML file that I can run, I'd be able to test easily.
Re: XML import iteration problem [message #1092314 is a reply to message #1091889] Thu, 22 August 2013 11:56 Go to previous messageGo to next message
Eclipse UserFriend
Using a grand total column and changing the function to average work though it feels like a kludge! For some reason I can't include my design with this post at the moment.


Thanks for your help so far.
Re: XML import iteration problem [message #1093048 is a reply to message #1092314] Fri, 23 August 2013 09:47 Go to previous message
Eclipse UserFriend
You went to the "Post Reply" instead of using the quick reply, right? If so, you might try zipping it up if the .rptdesign wouldn't attach. Let me know.
Previous Topic:BIRT does not render for large data.
Next Topic:BIRT Report - Run time configuration files
Goto Forum:
  


Current Time: Sun Jul 06 10:46:10 EDT 2025

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

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

Back to the top