How To Modify Batch XML Files Externally (So They Can Then Be Run On Demand)

  Print

We have a built-in utility to the Report Runner executable (Report Runner Unified.Exe) to update your Report Runner Batch XML files externally. This is necessary for updating your XML files dynamically and then running your Batch XML file on-demand via the command line or using Report Runner Event Server.

Note: This update process only updates your XML file, it does not run it, so feel free to test this update process as much as you want. Check your Batch XML file after each update to see if it's working.

By the way, if you've never looked at any of your Batch XML files, try editing one with NotePad or Wordpad, or simple "Open With" your internet browser of choice. You'll see it's laid out like a table with field names "wrapped around" each value.

Updating your Report Runner Batch XML file dynamically is easy. Simply call the executable with these four (4) command line parameters at once:

  • jnFile= (full path and XML file name)
  • jnRecord= (record number in XML file - it's easier if this is always "1" and your dynamic batches have only one (1) record)
  • jnField= (field name in XML file)
  • jnValue= (value to set) or jnPrompt=(give prompting text and use reply from user as jnValue)

Note: "jnPrompt" became available as of 2013.139

---

For example, your command line might look like this:

jnFile=C:\My Dynamic Batches\PrintHelpDeskTicket.XML jnRecord=1 jnField=Parm1 jnValue=123456

In the example above, we are updating a batch that print's an individual helpdesk ticket. The ticket number we want to print is "123456".

 

What if we wanted to then print ticket number "456123"? Simply call it like this:

jnFile=C:\My Dynamic Batches\PrintHelpDeskTicket.XML jnRecord=1 jnField=Parm1 jnValue=456123

 

What if after updating the ticket number, you wanted to update the printer (printer name is HP2320-1) it is to be printed at? It might look like this:

jnFile=C:\My Dynamic Batches\PrintHelpDeskTicket.XML jnRecord=1 jnField=DestinationType jnValue=PRINTER

jnFile=C:\My Dynamic Batches\PrintHelpDeskTicket.XML jnRecord=1 jnField=DestinationName jnValue=HP2320-1

 

What if you wanted to prompt the user for the help desk ticket number? You ask question in jnPrompt instead of setting jnValue. It might look like this:

jnFile=C:\My Dynamic Batches\PrintHelpDeskTicket.XML jnRecord=1 jnField=Parm1 jnPrompt=What ticket # would you like to print?

 

You can call update utility as many times as you need to. Each call/update is extremely fast so don't worry about this taking a long time to run. After you are finished updating your Batch XML file, you can then process it on-demand calling the Batch XML file via the command line passing it to the Report Runner executable or "throwing it" into the Input directory of Report Runner Event Server.

And just to be clear on how to "call" the Report Runner executable with the command lines above, using our first example, the full "call" might look like this:

"C:\Program Files\Jeff-Net\Report Runner\Report Runner Unified.Exe" jnFile=C:\My Dynamic Batches\PrintHelpDeskTicket.XML jnRecord=1 jnField=Parm1 jnValue=123456

---

We also have one special function jnValue keyword called jnFetchRecordSelection. Most users will never need this. We created this special function for developers. It is used to fetch the record selection from the RPT file in the XML file being edited, and dynamically replace or set the RecordSelection field in the XML file passed. This allows you to then progromatically set or append any additional record selection to this statement via a script.

An example of the usage of this would be:

"C:\Program Files\Jeff-Net\Report Runner\Report Runner Unified.Exe" jnFile=C:\My Dynamic Batches\MyBatchFileName.XML jnRecord=1 jnField=RecordSelection jnValue=jnFetchRecordSelection

---

If you have any questions about this, just let us know! We are always HAPPY to help!

 



Related Articles

Login

 
Forgot password?
Register now

Language