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