Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » xmlDataSource(xpath with parameter)
xmlDataSource [message #661366] Thu, 24 March 2011 11:57 Go to next message
No real name is currently offline No real name
Messages: 2
Registered: March 2011
Junior Member
Hello

i have following xml file:

<game>
    <member id="1">
        <name>Doha</name>
        <settings id="1">
            <a>2</a>
            <b>4</b>
        </settings>
        <settings id="2">
            <a>3</a>
            <b>6</b>
        </settings>
    </member>
    <member id="2">
        <name>Moha</name>
        <settings>
            <a>2</a>
            <b>4</b>
        </settings>
        <settings>
            <a>1</a>
            <b>2</b>
        </settings>
    </member>
<game>


xpath rowMapping:
/game/member[@id="{&id&}"]

columnMapping
/name

With this settings the parameter in xpath works fine.

But i need something like this:

/game/member[@id="{&id&}"]/settings

columnMapping
/b

so that i can sum al b's from one member!!

Hope someone can help,

Regards

Daniel
Re: xmlDataSource [message #661476 is a reply to message #661366] Thu, 24 March 2011 19:08 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Daniel,

I just tried:
/game/member[@id="{?p1?}"]/settings

And it worked for me.

Jason

On 3/24/2011 7:57 AM, dareitmeier@web.de wrote:
> Hello
> i have following xml file:
>
>
> <game>
> <member id="1">
> <name>Doha</name>
> <settings id="1">
> <a>2</a>
> <b>4</b>
> </settings>
> <settings id="2">
> <a>3</a>
> <b>6</b>
> </settings>
> </member>
> <member id="2">
> <name>Moha</name>
> <settings>
> <a>2</a>
> <b>4</b>
> </settings>
> <settings>
> <a>1</a>
> <b>2</b>
> </settings>
> </member>
> <game>
>
>
> xpath rowMapping:
> /game/member[@id="{&id&}"]
>
> columnMapping
> /name
>
> With this settings the parameter in xpath works fine.
>
> But i need something like this:
>
> /game/member[@id="{&id&}"]/settings
>
> columnMapping
> /b
>
> so that i can sum al b's from one member!!
>
> Hope someone can help,
>
> Regards
>
> Daniel
Re: xmlDataSource [message #661904 is a reply to message #661476] Mon, 28 March 2011 13:36 Go to previous message
No real name is currently offline No real name
Messages: 2
Registered: March 2011
Junior Member
Hello,

the problem was, that i don't have put the inner table element into the same row where I have put the parameter value.

Now i have the "id" and the inner table with the Sum Aggregation of "b" in the same row and it works.

Thanks for Answer,

Daniel

[Updated on: Mon, 28 March 2011 13:38]

Report message to a moderator

Previous Topic:Braking two tables simultaneously on the same page
Next Topic:Page break
Goto Forum:
  


Current Time: Sat Sep 20 10:15:50 GMT 2014

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

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