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

mark5009

Members
  • Posts

    4
  • Joined

  • Last visited

mark5009's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. Hi .. I am new to iReports and trying to use an XML data source. It seems to be simple enough yet I am having no end of problems. Are there any tutorials or documents about doing this? Here is the specifics (iReport 2.0.1 : Sun JVM 1.6.0) Data/Data source XML Datasource = Northwind.xml (from iReport examples) Set: Use XPATH Data/Report Query Query Language: XPath Query: /Northwind/Customers Automatically Retrieve Fields: On Returns 'Selected nodes: 91' No fields returned anywhere. Is there anyway of seeing what iReport is doing? Any ideas on what I am doing incorrectly? TIA mark
  2. Okay .. I worked out how to get fields (thanks, guys). Seem like everything got locked up and a complete restart managed to make things happen the way they should (I can get fields). :) So, part B.. I add the fields to the report with some in the title section and some in the detail section. And when I run the report in 'Empty Data Source' mode it shows me my report, all shiny new, with 'null' where the fields will go. Then when I run it against the XML data, I get a 'The document has no pages' error. The XML has data, so again, I guess that I am doing something wrong. All of the field descriptions seem to be pointing to the right places. Any thoughts of where to check next? Many thanks
  3. Thanks, for your prompt help, guys, but I must be thick today .. :) berlim, I tried your suggestion of putting the expression into the data source expression. I then assume that I go into 'Data/Report Query', select 'XPath' and enter a value of '/' as the query? If I do that or explictly set the field name, like '/UserId' I still see nothing in the Fields section. Also, I have 'Auto Retreive Fields' off and am doing a maual fetch. Doesn't make a difference. nitin, Ummm .. what sidebar? I can't seem to get fields from anywhere! Additionally, Here is the bit from the .jrxml file <queryString><![CDATA[/FooReport/header]]></queryString> And that seems to be okay. Is there a differnce between the 'XPath' and 'xpath2' query languages? I assume that 'XPath' is just 1.0 and 'xpath2' will do both? Thanks again. Still more help needed!
  4. Hi .. I am trying to get going using iReports 2.0.1 and an XML data source and not having much joy. Any help would be appreciated. The steps I am taking are: 1. Data/Connections/New Select 'foo.xml' Select "Use the report XPath.." Test (successful) 2. Data/Report Query Query language = XPath Enter expression: '/FooReport/header' Click 'Read Fields' And I get nothing back! So, I am clearly doing something very basic wrong. Any help grateful accepted. TIA mark Here is the XML of the report: <?xml version="1.0"?> <FooReport> <header> <UserId>Bob Bobson</UserId> <SessionId>456789</SessionId> <Site>Internet</Site> <Intro>Lorem ipsum dolor sit amet</Intro> </header> <body> </body> </FooReport>
×
×
  • Create New...