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

membersound

Members
  • Posts

    3
  • Joined

  • Last visited

membersound'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. Did you find a solution on this? I'd like to achieve exactly the same.
  2. public class WebserviceRsp { private List<Person> persons;}public class Person { private List<Phone> phones;}public class Phone { private String type; //business, home, private private String number;}[/code] Given the class hirarchie above: how can I print a list of all phone numbers where type = "home"? Because: when I go to the dataset query builder tab, I can select my bean "WebserviceRsp", and then I can only select the direct fields, eg "persons". But I cannot select a field "person[0].phones.number". I only want to get the first perons phone numbers is my example. So, how could I create such a jasper variable that selects the first person item in the list, and then prints all values from a sublist?
  3. How can I select a node from XML datasource by condition? Eg I have an xml that has multiple customer nodes. I now want to select the first customer whose type=business. Moreover, I want to sum up all values found fo the specific list elements. Example: <list> <customer> <type>business</type> <amount>10</amount> <!-- type String.class --> </customer> <customer> <type>private</type> <amount>20</amount> </customer></list>[/code]What is the jrxml expression for this? Do I have to use XPATH to locate the element? If yes, I could think of: /list/customer[type=business]/amount[/code]But how can I ensure that these values are summed up? And what if I just want to display these values repreatedly? How do I have to create the jrxml variables, fields and parameters to get automatically mapped from the xml? Same question applies if I have a java bean. Probably the mechanism/logic behind summing a field up automatically is the same? Thanks
×
×
  • Create New...