Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Incorrect Data Set from XML Data Source in BIRT 2.2M6?
Incorrect Data Set from XML Data Source in BIRT 2.2M6? [message #242764] Thu, 14 June 2007 17:08 Go to next message
Eclipse UserFriend
Originally posted by: dsingra.sandia.gov

Hi,

I am creating a data set from the following (simplified) XML data
file/source:

<?xml version="1.0" ?>
<NewDataSet>
<program>
<ProgramID>1</ProgramID>
<ProgramName>Prog1</ProgramName>
<activity>
<ActivityID>100</ActivityID>
<ActivityName>Act1</ActivityName>
</activity>
<activity>
<ActivityID>101</ActivityID>
<ActivityName/>
</activity>
</program>

<program>
<ProgramID>2</ProgramID>
<ProgramName/>
<activity>
<ActivityID>102</ActivityID>
<ActivityName>Act3</ActivityName>
</activity>
<activity>
<ActivityID>103</ActivityID>
<ActivityName>Act4</ActivityName>
</activity>
</program>
</NewDataSet>


Note that the ProgramName is empty (as it is allowed to be) for ProgramID
2, and the ActivityName is empty (as it is allowed to be) for ActivityID
101.

My query for creating the data set in BIRT is as follows:

table0#-TNAME-#table0#:#[/NewDataSet/program/activity]#:#{Pr ogramID;Int;../ProgramID},{ProgramName;String;../ProgramName },{ActivityID;Int;/ActivityID},{ActivityName;String;/Activit yName}


In BIRT 2.1.2, the results of the query are:

ProgramID ProgramName ActivityID ActivityName
--------- ----------- ---------- ------------
1 Prog1 100 Act1
1 Prog1 101
2 102 Act3
2 103 Act4


However, I recently moved to BIRT 2.2.0 M6 and am now getting the
following results for the same query:

ProgramID ProgramName ActivityID ActivityName
--------- ----------- ---------- ------------
1 Prog1 100 Act1
1 Prog1 101

So, any rows where a child element of <program> is empty do not appear in
the result set, although child elements of <activity> can have blank
values and will still appear in the result set.

Is this a bug in 2.2.0 M6, or do I need to modify my query in some way?

Thanks so much for your help.
Deb
Re: Incorrect Data Set from XML Data Source in BIRT 2.2M6? [message #242836 is a reply to message #242764] Fri, 15 June 2007 02:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Deborah,

Can you log a bugzilla entry for this?
If you drop program name it appears to return the four rows, but having
the blank value in prgname appears to cause the issue when using the
activity as the table. As a work around you can use a joint data set
with full outer join, although this is not ideal, because the data will
be processed twice.

Jason

Deborah Ingram wrote:
> Hi,
>
> I am creating a data set from the following (simplified) XML data
> file/source:
> <?xml version="1.0" ?> <NewDataSet>
> <program>
> <ProgramID>1</ProgramID> <ProgramName>Prog1</ProgramName>
> <activity>
> <ActivityID>100</ActivityID>
> <ActivityName>Act1</ActivityName>
> </activity>
> <activity>
> <ActivityID>101</ActivityID>
> <ActivityName/>
> </activity>
> </program>
>
> <program>
> <ProgramID>2</ProgramID> <ProgramName/> <activity>
> <ActivityID>102</ActivityID>
> <ActivityName>Act3</ActivityName>
> </activity>
> <activity>
> <ActivityID>103</ActivityID>
> <ActivityName>Act4</ActivityName>
> </activity>
> </program>
> </NewDataSet>
>
>
> Note that the ProgramName is empty (as it is allowed to be) for
> ProgramID 2, and the ActivityName is empty (as it is allowed to be) for
> ActivityID 101.
>
> My query for creating the data set in BIRT is as follows:
>
> table0#-TNAME-#table0#:#[/NewDataSet/program/activity]#:#{Pr ogramID;Int;../ProgramID},{ProgramName;String;../ProgramName },{ActivityID;Int;/ActivityID},{ActivityName;String;/Activit yName}
>
>
>
> In BIRT 2.1.2, the results of the query are:
>
> ProgramID ProgramName ActivityID ActivityName
> --------- ----------- ---------- ------------
> 1 Prog1 100 Act1
> 1 Prog1 101 2 102
> Act3
> 2 103 Act4
>
>
> However, I recently moved to BIRT 2.2.0 M6 and am now getting the
> following results for the same query:
>
> ProgramID ProgramName ActivityID ActivityName
> --------- ----------- ---------- ------------
> 1 Prog1 100 Act1
> 1 Prog1 101
> So, any rows where a child element of <program> is empty do not appear
> in the result set, although child elements of <activity> can have blank
> values and will still appear in the result set.
>
> Is this a bug in 2.2.0 M6, or do I need to modify my query in some way?
>
> Thanks so much for your help.
> Deb
>
>
>
>
>
Re: Incorrect Data Set from XML Data Source in BIRT 2.2M6? [message #242952 is a reply to message #242836] Fri, 15 June 2007 13:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dsingra.sandia.gov

Hi Jason,

Thanks for the work-around and the sanity check! :-) I'll enter the issue
into Bugzilla.

Deb
Re: Incorrect Data Set from XML Data Source in BIRT 2.2M6? [message #242957 is a reply to message #242952] Fri, 15 June 2007 13:35 Go to previous message
Eclipse UserFriend
Originally posted by: dsingra.sandia.gov

Bugzilla Bug 192871
Previous Topic:Problem in using the Web viewer with a PDF output
Next Topic:How to apply style on HTML tags (H1, H2...)
Goto Forum:
  


Current Time: Thu Jan 02 16:10:10 GMT 2025

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

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

Back to the top