Incorrect Data Set from XML Data Source in BIRT 2.2M6? [message #242764] |
Thu, 14 June 2007 17:08 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>
>
>
>
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04808 seconds