Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Column Mapping from one node name to multiple fields
Column Mapping from one node name to multiple fields [message #554911] Tue, 24 August 2010 17:12 Go to next message
Nick P. is currently offline Nick P.Friend
Messages: 17
Registered: July 2009
Junior Member
I have xml data similar to this:
<root><person identifier="123">
<score name="ACT">22</score>
<score name="SAT">1400</score>
<score name="AP Chemistry">4</score>
</person>...</root>


I would like report designers to have easy access to drop these scores in reports. In the past, I have done XSL transformations to make the node name be simply the "name" of the score, but this has grown problematic as we are working to support different types of characters.

There are other data points other than scores under the person tag, so I really want to use the <person/> tag as my row mapping. Is there a way to specify that I want to map columns from the <score/> tag for each unique attribute on the score tags?

I have seen the "Custom XPath Expression" in the Column Mapping Dialog, but this would require the user to manually enter all the attributes in the file. Unlike my sample above, our data sources would include many different types of scores, so this would be tedious.

Is it possible to automatically map these columns? If not, can you suggest another way to accomplish what I am seeking? An easy way to access all of these fields without a report designer manually typing in xpath for each unique attribute.
Re: Column Mapping from one node name to multiple fields [message #554949 is a reply to message #554911] Tue, 24 August 2010 20:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Nick,

Why not use score as the row and then add score as column and name as
column. You could do a different dataset for the person row and then
nest the tables if you needed to.

Jason

On 8/24/2010 1:12 PM, Nick P. wrote:
> <root><person identifier="123">
> <score name="ACT">22</score>
> <score name="SAT">1400</score>
> <score name="AP Chemistry">4</score>
> </person>...</root>
Re: Column Mapping from one node name to multiple fields [message #554953 is a reply to message #554949] Tue, 24 August 2010 21:30 Go to previous messageGo to next message
Nick P. is currently offline Nick P.Friend
Messages: 17
Registered: July 2009
Junior Member
Jason,

I have looked at that and had not yet ruled it out.

I was concerned that it would not be possible to have multiple data sets overlapping in the layout. If we had a list that was tied to the person data set would it be trivial to drag in elements from the score data set and drop them into the list that is bound to the person data set?

I think I see how this could be done but I worried that they might not be attached to the appropriate person.
Re: Column Mapping from one node name to multiple fields [message #554959 is a reply to message #554953] Tue, 24 August 2010 22:07 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You could use a dataset parameter on the score dataset, but if that is
to complex for the users, you could always, put a list in for person
dataset and then nest score dataset table/list. On that table you could
just add a filter based on the outer table/list person.

Jason

On 8/24/2010 5:30 PM, Nick P. wrote:
> Jason,
>
> I have looked at that and had not yet ruled it out.
>
> I was concerned that it would not be possible to have multiple data sets
> overlapping in the layout. If we had a list that was tied to the person
> data set would it be trivial to drag in elements from the score data set
> and drop them into the list that is bound to the person data set?
>
> I think I see how this could be done but I worried that they might not
> be attached to the appropriate person.
Previous Topic:How to display another data set values in Table
Next Topic:image in the grid
Goto Forum:
  


Current Time: Tue Apr 16 11:04:01 GMT 2024

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

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

Back to the top