Print Thread
variables on the command line
#32295 04/11/03 12:47 AM
Joined: Apr 2003
Posts: 12
CO, USA
M
Member
OP Offline
Member
M
Joined: Apr 2003
Posts: 12
CO, USA
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:
&<name="report_date" type=string required="yes" hint="Must be in YYYY-MM-DD format.">

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

Re: variables on the command line
#32296 04/14/03 10:16 PM
Joined: Aug 1999
Posts: 22,487
Member
Offline
Member
Joined: Aug 1999
Posts: 22,487
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:

[quote]
Code
QueryReporter userid=scott/tiger "&deptno=10" exec=emp.rep
[/quote]

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


Marco Kalter
Allround Automations
Re: variables on the command line
#32297 05/07/03 10:55 PM
Joined: May 2003
Posts: 1
Porto Alegre
R
Member
Offline
Member
R
Joined: May 2003
Posts: 1
Porto Alegre
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.

Re: variables on the command line
#32298 05/08/03 07:02 PM
Joined: Aug 1999
Posts: 22,487
Member
Offline
Member
Joined: Aug 1999
Posts: 22,487
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


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.025s Queries: 13 (0.007s) Memory: 2.5088 MB (Peak: 3.0399 MB) Data Comp: Off Server Time: 2024-12-04 05:32:30 UTC
Valid HTML 5 and Valid CSS