Jump to content

How to pass parameters in REST_V2 when scheduling a job


lutfijd

Recommended Posts

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
Link to comment
Share on other sites

  • 1 year later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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>[/code]

 

<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>[/code]

 

<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>[/code]

 





 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...