Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Putting one row of a dataset to several table groups
Putting one row of a dataset to several table groups [message #1014784] Tue, 26 February 2013 13:12 Go to next message
Mark Mescher is currently offline Mark MescherFriend
Messages: 21
Registered: July 2009
Junior Member
Hi,
I have a dataset with following simple example structure:

Column1: Subject
Column2: Category

I have created a table based on this dataset which groups on category.

The problem now is that category may contain several values (and I dont know how many before running report!) like this: category 1;category 2

At the moment BIRT creates a group called category 1;category2. But what I need are two groups (splitted at Wink - the dataset row needs to be placed twice in the table.

Any ideas how to realize this?

Thanx a lot!

Mark
Re: Putting one row of a dataset to several table groups [message #1014911 is a reply to message #1014784] Tue, 26 February 2013 18:24 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

So, you have data like:

Subject | Category
Subject1 | Category1
Subject1 | Category2
Subject2 | Category1
etc...

And want to see something like:

Subject1
Category1
Category2

Subject2
Category1

?

Or something else? If I'm misunderstanding, could you please clarify with some sample data or a sample report I can run? Thanks!


Michael

Developer Evangelist, Silanis
Re: Putting one row of a dataset to several table groups [message #1015026 is a reply to message #1014784] Wed, 27 February 2013 08:49 Go to previous messageGo to next message
Mark Mescher is currently offline Mark MescherFriend
Messages: 21
Registered: July 2009
Junior Member
Hi,
no, following data situation:

Category | Subject
category 1 | Testdata 1
category 1 | Testdata 2
category 2 | Testdata 3
category1;category2 | Testdata 4

Following grouping should be presented in table:

category 1
---- Testdata 1
---- Testdata 2
---- Testdata 4
category 2
---- Testdata 3
---- Testdata 4

As you see, Testdata 4 is assigned to two categories (and maybe more in productive), that is my problem. Do you have any ideas?

Thanx!

Bye

Mark

[Updated on: Wed, 27 February 2013 09:28]

Report message to a moderator

Re: Putting one row of a dataset to several table groups [message #1015279 is a reply to message #1015026] Thu, 28 February 2013 02:34 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You could use a scripted dataSet to split the dual category row into two rows. To do this, you'd just need to store the values from the original dataSet into arrays or something. Then, you'd access these arrays in your scripted dataSet to create your new result set. You could either split the rows when storing the values into your array(s) or split them when processing your data in the scripted dataSet. Let me know if you have questions.

Michael

Developer Evangelist, Silanis
Re: Putting one row of a dataset to several table groups [message #1015335 is a reply to message #1015279] Thu, 28 February 2013 09:31 Go to previous messageGo to next message
Mark Mescher is currently offline Mark MescherFriend
Messages: 21
Registered: July 2009
Junior Member
The problem is that data is already provided by a Java scripted data set provided by a different vendor, so I have no possibility to change that.
Is there the possibility via a report scripting event to manipulate data that is provided by an existing datasource (and duplicate the row)?

Mark
Re: Putting one row of a dataset to several table groups [message #1015431 is a reply to message #1015335] Thu, 28 February 2013 14:53 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Yes. That's what I described above. Take a look at this thread. It has a design that shows what I described above. If you have access to the script in the original dataSet that defines the rows, you don't need to create a new dataSet, you can simply modify the existing code to do this.

BIRT Exchange Forums - Create Multiple Rows out of a Single SSV Field


Michael

Developer Evangelist, Silanis
Previous Topic:Birt Excel Issue
Next Topic:split x-axis label into two lines
Goto Forum:
  


Current Time: Wed Apr 24 19:04:43 GMT 2024

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

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

Back to the top