Jump to content
We've recently updated our Privacy Statement, available here ×

david.eaton

Members
  • Posts

    3
  • Joined

  • Last visited

david.eaton's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. 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>[/code]With a queryString of: <queryString language="xPath"> <![CDATA[/root_node/base_item]]></queryString>[/code]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.
  2. Found the issue, I had declared the fields at the root level of the report rather in the specific table I was trying to use them in.
  3. I'm using iReportDesigner 5.5.0, and was making a test JRXML. I added a text field with a value of $F{pricing_date} and added "pricing_date" to the list of "fields" on the Report Inspector panel (no properties or description set for the field). The resulting JRXML has the "pricing_date" field defined: <field name="pricing_date" class="java.lang.String"/> <field name="pricing_date" class="java.lang.String"/>[/code]And it has a text field with $F{pricing_date} as expected: <textFieldExpression><![CDATA[$F{pricing_date}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{pricing_date}]]></textFieldExpression>[/code]But... I get the error "Field not found : pricing_date" within iReport Designer, and I get the same error during compilation. I've compared this to other JRXML files within the samples provided, and it seems to match... what am I missing? Is there a setting somewhere to recognize field definitions?
×
×
  • Create New...