• Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating/Passing parameter to an xml file  RSS feed

 
garfild Baram
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!