How to pass parameters in REST_V2 when scheduling a job

0

hey all,

I'm unable to pass paramters to report i schedule through rest_v2 api,  the report is scheduled correctly, it executes and sends attachment as expected. but when i open the report i can tell the paramters are not set, can you please take a look at the below job xml request and let me know if anything needs to be changed:

(NOTE, the paramter is a single value of type Number) (using jasper server 5.2)

 
<job>
    <baseOutputFilename>ljd_file_name_2</baseOutputFilename>
 
    <repositoryDestination>
        ......
    </repositoryDestination>
 
    <description/>
 
    <label>MyNewJob</label>
 
    <mailNotification>
        .....
    </mailNotification>
 
    <outputFormats>
        <outputFormat>XLS</outputFormat>
    </outputFormats>
 
    <outputLocale/>
 
 
 
    <source>
        <reportUnitURI>/STAR/_LJD/CashReport</reportUnitURI>
        <parameters>
            <entry>
                <key>BatchID</key>
                <value>123</value>
            </entry>
        </parameters>
 
    </source>
 
    <simpleTrigger>
        ....
    </simpleTrigger>
    <version>1</version>
</job>
 
 
 
Thanks for the help
lutfijd's picture
Joined: Aug 22 2012 - 12:14pm
Last seen: 4 years 5 months ago

I am also stuck here. Please help...

jigar.patel - 4 years 5 months ago

try something like this

<parameters>
    <name>BatchId</name>
 
    <value xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='xs:int'>52</value>
</parameters>

<parameters>
    <name>FiscalYear</name>
    <value xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='xs:string'>2014</value>
</parameters>

<parameters>
    <name>fromDate</name>
   <value xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='xs:date'>2014-03-15</value>
</parameters>





lutfijd - 4 years 5 months ago

0 Answers:

No answers yet
Feedback
randomness