Hello all,
I'm new in iReport. I have seen a tutorial to use iReport from an XML
Datasource:
http://jasperforge.org/sf/wiki/do/viewPage/projects.ireport/wiki/UsingTheXMLDatasource

The xml that I have tested in iReport is addressbook.xml

The Record path is: /addressbook/category/person

<addressbook>
   <category name="home">
      <person id="1">

          <LASTNAME>Davolio</LASTNAME>
          <FIRSTNAME>Nancy</FIRSTNAME>
          <hobbies>
                <hobby>Radio Control</hobby>
                <hobby>R/C Cars</hobby>
          </hobbies>
          <email>[EMAIL PROTECTED]</email>
          <email>[EMAIL PROTECTED]</email>
      </person>
      <person id="2">
          <LASTNAME>Fuller</LASTNAME>
          <FIRSTNAME>Andrew</FIRSTNAME>
          <email>[EMAIL PROTECTED]</email>
          <email>[EMAIL PROTECTED]</email>
      </person>
  </category>
  <category name="work">
      <person id="4">

          <LASTNAME>Peacock</LASTNAME>
          <FIRSTNAME>Margaret</FIRSTNAME>
          <hobbies>
                <hobby>Toy Horse</hobby>
          </hobbies>
          <email>[EMAIL PROTECTED]</email>
      </person>
  </category>
</addressbook>

I have tried the example and all works. Then, I have changed  the xml
adding a different tag on the same level of the tag category,for
example :

<addressbook>
   <authors>
      <author>John XXX</author>
      <author>John XXX</author>
   </authors>
   <category name="home">
      <person id="1">

          <LASTNAME>Davolio</LASTNAME>
          <FIRSTNAME>Nancy</FIRSTNAME>
          <hobbies>
                <hobby>Radio Control</hobby>
                <hobby>R/C Cars</hobby>
          </hobbies>
          <email>[EMAIL PROTECTED]</email>
          <email>[EMAIL PROTECTED]</email>
      </person>
      <person id="2">
          <LASTNAME>Fuller</LASTNAME>
          <FIRSTNAME>Andrew</FIRSTNAME>
          <email>[EMAIL PROTECTED]</email>
          <email>[EMAIL PROTECTED]</email>
      </person>
  </category>
</addressbook>

and when iReport create the PDF document I see the value null in the
cycle of the tags category. Seems that iReport doesn't read exactly
only the path /addressbook/category/person but read even the tag
authors that is not correct!!

I can I solve this problem???

Than, the last question :

in the first example of xml addressbook the category tag has the
attribute "name".
If I want only show the categories that have name="work", how can I do
in iReport??

Thanks for all your response,
Francesco


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---

Reply via email to