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 design a report with mulple rows of data in a single row
Rijas
I have a webservice output as given below. I need to design a report as given in the attached image.
This is a multi page report . Each category should be in different page. There can be multiple items in each category.
Can you please help me how to design this report in BIRT. I have BIRT eclipse Version: 3.6.1
<Categories>
<Category>
<Name> Abc </Name>
<Items>
<Item>Item1</Item>
<Item>Item2</Item>
<Item>Item3</Item>
<Item>Item4</Item>
</Items>
</Category>
<Category>
<Name> Abc1 </Name>
<Items>
<Item>Item11</Item>
<Item>Item21</Item>
<Item>Item31</Item>
<Item>Item41</Item>
</Items>
</Category>
<Category>
<Name> Abc2 </Name>
<Items>
<Item>Item12</Item>
<Item>Item22</Item>
<Item>Item32</Item>
<Item>Item42</Item>
</Items>
</Category>
</Categories>
Find more posts tagged with
Comments
kclark
You could group on the category and set the page break after to always. I've attached a sample, let me know if that's what you're trying to do.
Rijas
Hi kclark,
Thanks for sending the sample report. The report sent is not opening in my BIRT as it's version is 3.2.22. I read about grouping feature. I hope grouping can be use as a solution.
Few doubts: Here in my case "Category Name" is not repeating as many times as "Item" repeats.
For Eg: <Item> repeats 12 times and Category Name reapeats 3 times. So, will the xml output structure be correct enough to do grouping ?.
If possible, can you add a sample report which supprts version="3.2.22"
johnw
Couple of different ways pop in to mind.
The easiest way, is to set an XPath expression to iterate over the items in your result set. The category would reference the parent node for category name. A single result set. Then in the table, group on category name.
So you have an XPath expression like: //Categories/Category/Items/Item that defines your row.
In the properties, you'd have a few others like:
Category Name: ../../Name
This would give you a result set that looks something like:
Name Category
Item1 Cat1
Item2 Cat1
Item3 Cat1
Item4 Cat1
Item5 Cat2
Item6 Cat2
Item7 Cat2
Item8 Cat3
So the grouping on Category would give you a result like:
Cat1:
Item1
Item2
etc...
Cat2:
Item5
etc...
As kclark indicated, you would just set a page break on the Category grouping to get a new page per category.
Rijas
<p>Grouping is a working as expected . But not able to align the fileds in desired structure. I have attached the exact data and report structure here.
Each transactions should be printed in a new page. UDI is a unique id in each transaction. Each transaction can have multiple deal.
Is it possible to design a report like this in BIRT ? Pelase hel me to structure it.
Grouping is a working as expected . But not able to align the fileds in desired structure. I have attached the exact data and report structure here.
Each transactions should be printed in a new page. UDI is a unique id in each transaction. Each transaction can have multiple deal.
Is it possible to design a report like this in BIRT ? Pelase hel me to structure it.</p>
Rijas
<p>I forgot to attach the files</p><p> </p><p>