variables on the command line

marc.wilson

Member²
product: QueryReporter v.2.0

In the manual, section 8.2 Action parameters, it states that variables can be referenced on the command line via &variable=value.

However, the windows (2000 etal) command shell (cmd.exe) interprets an aperstand (&) as command concatenation not as a command-line argument.
i.e.: dir & date
would execute the "dir" command and then the "date" command.

For example I have a report (ancd_3_24_dst.rep) that has one variable defined, report_date, as:
&

When I enter the following at a command prompt:
>queryreporter exec=ancd_3_24_dst.rep &report_date=2003-03-18

1. queryreporter GUI starts

2. command shell immediately returns
'report_date' is not recognized as an internal or external command,
operable program or batch file.

3. queryreporter prompts the user for a value for the report_date variable

Am I missing something in the instructions?

Additionally, spaces are allowed in variable name within queryreporter, how are spaces in variable names handled via the command line.

Sorry, If this post is overly verbose -- just trying to be explicit.

thank you,
--marc wilson
 
It's a bit tricky, but the parameters are positional, and the & needs to be quoted. Before executing the report, you have to set the variables:

Code:
QueryReporter userid=scott/tiger "&deptno=10" exec=emp.rep

First you connect, then you set the variable values (quoted), then you execute the report.

I hope this helps. We'll improve the documentation.

------------------
Marco Kalter
Allround Automations
 
how to hide a variable definition in generate html file ? i generate a html file with command line and one parameter and a variable definition appears "variable=value" at top of document.
 
You can hide all variable values from the report output by disabling the "Variables" layout item. Simply uncheck the corresponding checkbox on the Layout tab page.

You cannot hide one variable and show others.

------------------
Marco Kalter
Allround Automations
 
Back
Top