Parameter values from CSV file

0
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.
ananth890's picture
Joined: Jan 30 2016 - 8:08pm
Last seen: 1 year 5 months ago

1 Answer:

0

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>

reportdev's picture
1222
Joined: Oct 12 2015 - 12:05pm
Last seen: 2 months 2 weeks ago
Feedback
randomness