Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to show dynamic data as part of row
Saint_77
Hi <br />
<br />
I have a service which returns me resultset that looks like the following:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<response>
<ns6:transactionLogLine>
<ns5:id>111</ns5:id>
<ns5:transactionType>Buy</ns5:transactionType>
<ns5:transactionDate>2010-11-09</ns5:transactionDate>
<ns5:account>1234</ns5:account>
<ns5:res>false</ns5:res>
<ns5:attributes>
<ns5:attribute>
<ns5:txt>color</ns5:txt>
<ns5:value>red</ns5:value>
</ns5:attribute>
<ns5:attribute>
<ns5:txt>weight</ns5:txt>
<ns5:value>10</ns5:value>
</ns5:attribute>
<ns5:attribute>
<ns5:txt>supplier</ns5:txt>
<ns5:value>BAT</ns5:value>
</ns5:attribute>
</ns5:attributes>
</ns6:transactionLogLine>
<ns6:transactionLogLine>
<ns5:id>222</ns5:id>
<ns5:transactionType>Buy</ns5:transactionType>
<ns5:transactionDate>2010-11-09</ns5:transactionDate>
<ns5:account>5555</ns5:account>
<ns5:res>false</ns5:res>
<ns5:attributes />
</ns6:transactionLogLine>
<ns6:transactionLogLine>
<ns5:id>333</ns5:id>
<ns5:transactionType>Buy</ns5:transactionType>
<ns5:transactionDate>2010-11-09</ns5:transactionDate>
<ns5:account>7411</ns5:account>
<ns5:res>false</ns5:res>
<ns5:attributes>
<ns5:attribute>
<ns5:txt>color</ns5:txt>
<ns5:value>yellow</ns5:value>
</ns5:attribute>
<ns5:attribute>
<ns5:txt>type</ns5:txt>
<ns5:value>LCD TV</ns5:value>
</ns5:attribute>
</ns5:attributes>
</ns6:transactionLogLine>
</response>
</pre>
<br />
In my report i need to show a pdf file that has all the following :<br />
<strong class='bbc'>id = 111</strong><br />
transactionType = Buy<br />
transactionDate = 2010-11-09<br />
account = 7411<br />
color = red <br />
wieght = 10<br />
supplier = BAT<br />
<strong class='bbc'><<<<<<<<<<<< empty line >>>>>>>>>>>></strong><br />
<strong class='bbc'>id = 222</strong><br />
transactionType = Buy<br />
transactionDate = 2010-11-09<br />
account = 5555<br />
<strong class='bbc'><<<<<<<<<<<< empty line >>>>>>>>>>>></strong><br />
<strong class='bbc'>id = 333</strong><br />
transactionType = Buy<br />
transactionDate = 2010-11-09<br />
account = 7411<br />
color = yellow<br />
type = LCD TV<br />
<br />
So I need to show the Attributes of each transactionLogLine in its data row....but how?<br />
They are dynamic, some have no attributes and others have 10 attributes.<br />
<br />
Should i use 2 different datasets? How do i link them?<br />
Or is there a report item that i can use which will allow me to do this?<br />
Or must i use a data cube (cannot figure it out) ?<br />
<br />
When i think of how one does it in xsl transformation then its simple but i cannot think of a way to do it in a Birt report.<br />
<br />
Thanks.
Find more posts tagged with
Comments
Saint_77
Ok, i figured it out.
I had to create 2 datasets. 1 for the details and the 2nd one for the attributes....on this one my "Row mapping" was set to :
/soapenv:Envelope/soapenv:Body/ns6:Response/ns6:transactionLogLines/ns6:transactionLogLine/ns5:attributes/ns5:attribute
and in it i also added the ID from the details section above it.
Then i created a Joined Data Set (Left outer Join and used the ID added the attributes section to link the details etc. together)
I then added a table on my page and just added categories for all the Details elements....this way they only appear once on the report.
In the dataRow of the table i put the "Key" and the "Value" for display.
It now displays the way they wanted it ..... so the attributes section is dynamic for each of the details sections.