Hi Gurus
My requirement is we have report with oracle database only but we want to getting parameter values from CSV file is it possible?
I mean , we are getting some IDs from user in CSV file. we have to use those values as input parameter to craete report every month.
we are using Jasper 6.1 is it possible?
Thanks for your time.
1 Answer:
Posted on March 15, 2017 at 10:19am
I believe there is no direct way to achieve this.
but can be achieved by creating a list of values using the csv and selecting the input control on the report as this list of values.
try to come up with a batch file that can create the xml (format as below) on the fly from your csv and push it to the Jasper repository as a list of values.
<?xml version="1.0" encoding="UTF-8"?> <listOfValues exportedWithPermissions="true"> <folder>/public/Source/Test</folder> <name>list_of_values</name> <version>0</version> <label>list_of_values</label> <description></description> <creationDate>2017-03-15T10:14:21.107-07:00</creationDate> <updateDate>2017-03-15T10:14:21.107-07:00</updateDate> <item> <itemLabel>FFF</itemLabel> <itemValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:java="http://java.sun.com" xsi:type="java:java.lang.String">1</itemValue> </item> <item> <itemLabel>GGG</itemLabel> <itemValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:java="http://java.sun.com" xsi:type="java:java.lang.String">2</itemValue> </item> </listOfValues>