Subreports in detail element with xPath XML datasource

So, I'm apparently trying to do something a little odd with sub-reports?  I'm not sure how most people use sub-reports, but I'm adding a subreport to the <detail> section of my main report.  My main xPath query works fine-- something like the following:

<root_node>
    <base_item id="1">
        <name></name>
        <date></date>
        <list_item id="A">
            <type></type>
            <qty></qty>
        </list_item>
        <list_item id="B">
            <type></type>
            <qty></qty>
        </list_item>
        <list_item id="C">
            <type></type>
            <qty></qty>
        </list_item>
    </base_item>
    <base_item id="2">
        <name></name>
        <date></date>
        <list_item id="A">
            <type></type>
            <qty></qty>
        </list_item>
        <list_item id="B">
            <type></type>
            <qty></qty>
        </list_item>
        <list_item id="C">
            <type></type>
            <qty></qty>
        </list_item>
    </base_item>
</root_node>

With a queryString of:

<queryString language="xPath">
    <![CDATA[/root_node/base_item]]>
</queryString>

And that works great in the main report. I can access the name, date, and ID of the base_item just fine.

But what I want is to now have a sub-report for each one of the <list_item>'s that are within each base_item (the actual contents are pretty complex!)
I've tried a few combinations, but to no avail. What I'd ideally like is to have the sub-report essentially see the <base_item> as if it were the root node.

david.eaton's picture
Joined: Mar 13 2014 - 9:55am
Last seen: 8 years 10 months ago

0 Answers:

No answers yet
Feedback