• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creating/Passing parameter to an xml file

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm using iReport tool for building an xml file that my Java application will use to show a report(using jasper).
I need to pass a parameter to the xml (to the query in the xml), a parameter that is given by the user("group by...." or whatever).
The way to pass a parameter to the file:
<xml>
<parameter name="UserParameter" class="java.lang.String"/>
...
SELECT * FROM Orders ORDER BY $P!{UserParameter}
...
</xml>
I know how to send the value to this parameter from the java code before fillReport function.
My question is How can I add the above 2 lines to the xml file at run time from the java code?
The xml is created by the iReport tool but not the external parameter(UserParameter).
I need to link into the xml file and to create it from the code.
Can I?
Thanks
 
garfild Baram
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all,
I withdraw from my question posted here.
I managed without writing to the xml in run time.
Thanks any way.
 
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic