Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Getting multiple rows from XML file into a Birt report
Getting multiple rows from XML file into a Birt report [message #247455] Wed, 11 July 2007 19:54 Go to next message
Eclipse UserFriend
Originally posted by: wesolowski.maciej.gmail.com

I'm building a report in Birt getting data from XML file. There are sets of
actors, use cases and some others in that file. I would like to get every
actor (xsi-type: actor) into the report. In the column selection (while
creating a Data Set) I have an access to xsi-type only (I can't pick a
specific type). That would not be a problem if I could get all rows into the
report but I only get the very first one. How can I get them all (to select
the correct ones in the expression builder)?
Re: Getting multiple rows from XML file into a Birt report [message #247547 is a reply to message #247455] Thu, 12 July 2007 07:03 Go to previous messageGo to next message
Tianli Zhang is currently offline Tianli ZhangFriend
Messages: 2862
Registered: July 2009
Senior Member
Hi Maciej

Can you attache your xml file? I have tried as you said it work. I can
retrive all the values. Have you use the //actor in table mapping?

Below is my example xml file
<?xml version="1.0"?>
<ipo:purchaseOrder
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ipo="http://www.example.com/IPO"
orderDate="1999-12-01">
<shipTo exportCode="1" xsi:type="ipo:UKAddress">
<shipTo exportCode="1" xsi:type="ipo:UKAddress">
<name>Helen Zoe1</name>
</shipTo>
<name>Helen Zoe2</name>
</shipTo>
<billTo xsi:type="ipo:USAddress">
<shipTo exportCode="2" xsi:type="ipo:UKAddress">
<name>Helen Zoe3</name>
</shipTo>
<name>Robert Smith</name>
</billTo>
</ipo:purchaseOrder>

table mapping: //shipTo
column mapping: @xsi:type
name

Regards!
Re: Getting multiple rows from XML file into a Birt report [message #247577 is a reply to message #247547] Thu, 12 July 2007 11:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wesolowski.maciej.gmail.com

Sure. I attach a zip file with the XML and some screenshots of what I see
when importing that file into Birt.


"Tianli" <tzhang@actuate.com> wrote in message
news:6fdec23ff97e7885c86bf140158c7223$1@www.eclipse.org...
> Hi Maciej
>
> Can you attache your xml file? I have tried as you said it work. I can
> retrive all the values. Have you use the //actor in table mapping?
>
> Below is my example xml file
> <?xml version="1.0"?>
> <ipo:purchaseOrder
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ipo="http://www.example.com/IPO"
> orderDate="1999-12-01">
> <shipTo exportCode="1" xsi:type="ipo:UKAddress">
> <shipTo exportCode="1" xsi:type="ipo:UKAddress">
> <name>Helen Zoe1</name>
> </shipTo>
> <name>Helen Zoe2</name>
> </shipTo>
> <billTo xsi:type="ipo:USAddress">
> <shipTo exportCode="2" xsi:type="ipo:UKAddress">
> <name>Helen Zoe3</name>
> </shipTo>
> <name>Robert Smith</name>
> </billTo>
> </ipo:purchaseOrder>
>
> table mapping: //shipTo
> column mapping: @xsi:type
> name
>
> Regards!
>
>


  • Attachment: birt.zip
    (Size: 181.59KB, Downloaded 102 times)
Re: Getting multiple rows from XML file into a Birt report [message #247784 is a reply to message #247455] Fri, 13 July 2007 11:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wesolowski.maciej.gmail.com

Can anyone help me? It's quite important. I'd be very thankful...

"Maciej" <wesolowski.maciej@gmail.com> wrote in message
news:f73ch5$dbt$1@build.eclipse.org...
> I'm building a report in Birt getting data from XML file. There are sets
> of actors, use cases and some others in that file. I would like to get
> every actor (xsi-type: actor) into the report. In the column selection
> (while creating a Data Set) I have an access to xsi-type only (I can't
> pick a specific type). That would not be a problem if I could get all rows
> into the report but I only get the very first one. How can I get them all
> (to select the correct ones in the expression builder)?
>
Re: Getting multiple rows from XML file into a Birt report [message #247905 is a reply to message #247784] Fri, 13 July 2007 23:27 Go to previous messageGo to next message
Tianli Zhang is currently offline Tianli ZhangFriend
Messages: 2862
Registered: July 2009
Senior Member
Hi,
Sorry for my late reply, I have tried your case. Do you want to get all
the information of artifacts such as xsi:type, id and content of name,
right?
If so I can get them, so please try
Table mapping: //artifacts
Column mapping: @xsi:type
@id
name/@contents

After that all the information can be retrived but not only the first actor
Hope that is what you want:)

Regards
Re: Getting multiple rows from XML file into a Birt report [message #247911 is a reply to message #247784] Fri, 13 July 2007 23:35 Go to previous messageGo to next message
Tianli Zhang is currently offline Tianli ZhangFriend
Messages: 2862
Registered: July 2009
Senior Member
Hi Maciej

Attached the print screen of what I specified in table mapping and column
mapping, I hope my solution can solve your problem, if any question welcome
to ask

Regards

"Maciej" <wesolowski.maciej@gmail.com> wrote in message
news:f77n3i$rnd$1@build.eclipse.org...
> Can anyone help me? It's quite important. I'd be very thankful...
>
> "Maciej" <wesolowski.maciej@gmail.com> wrote in message
> news:f73ch5$dbt$1@build.eclipse.org...
>> I'm building a report in Birt getting data from XML file. There are sets
>> of actors, use cases and some others in that file. I would like to get
>> every actor (xsi-type: actor) into the report. In the column selection
>> (while creating a Data Set) I have an access to xsi-type only (I can't
>> pick a specific type). That would not be a problem if I could get all
>> rows
>> into the report but I only get the very first one. How can I get them all
>> (to select the correct ones in the expression builder)?
>>
>
>
>


  • Attachment: tianli.rar
    (Size: 110.52KB, Downloaded 120 times)
Re: Getting multiple rows from XML file into a Birt report [message #247952 is a reply to message #247911] Sun, 15 July 2007 17:52 Go to previous message
Eclipse UserFriend
Originally posted by: wesolowski.maciej.gmail.com

Hi :)
I can't check it right now but it looks like it works :) Thanks a lot, if I
have any more problems I'll shoot an email ;). Thank you once again :)


"Tianli Zhang" <tzhang@actuate.com> wrote in message
news:f792ad$reu$1@build.eclipse.org...
> Hi Maciej
>
> Attached the print screen of what I specified in table mapping and column
> mapping, I hope my solution can solve your problem, if any question
> welcome to ask
>
> Regards
>
> "Maciej" <wesolowski.maciej@gmail.com> wrote in message
> news:f77n3i$rnd$1@build.eclipse.org...
>> Can anyone help me? It's quite important. I'd be very thankful...
>>
>> "Maciej" <wesolowski.maciej@gmail.com> wrote in message
>> news:f73ch5$dbt$1@build.eclipse.org...
>>> I'm building a report in Birt getting data from XML file. There are sets
>>> of actors, use cases and some others in that file. I would like to get
>>> every actor (xsi-type: actor) into the report. In the column selection
>>> (while creating a Data Set) I have an access to xsi-type only (I can't
>>> pick a specific type). That would not be a problem if I could get all
>>> rows
>>> into the report but I only get the very first one. How can I get them
>>> all
>>> (to select the correct ones in the expression builder)?
>>>
>>
>>
>>
>
>
>
Previous Topic:Ranges as dimensions in a crosstab/data cube?
Next Topic:BIRT Runtime -Report Engine 2.2 Error
Goto Forum:
  


Current Time: Fri Dec 27 03:43:27 GMT 2024

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

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

Back to the top