[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Obtaining XX from -PRINTER:XX



hi,

when you run sqr it first generate an spf file and then convert the spf
in html, pdf,postcript ....
so when your program is running it does not know the printer.

this are 2 solutions

Solution 1
----------
if you are running on unix ( on nt it will work but the syntax is
different)

printer=pdf
export printer
sqr test.sqr -printer:$printer

in test.sqr
let $printer = getenv('printer')
..........

Solution 2
----------
printer=pdf
sqr test.sqr -F$printer -printer:$printer

in test.sqr
let $rpt = $<var from file> || '.' || $sqr-report



Fay, Brannon wrote:
>
> Oracle 7.3.4
> SQR 4.3.2.2
>
> Is it possible to obtain the current printer type being used???  We are
> naming our reports from a parameter in an input file, but right now the
> extension is hardcoded '.ps'.  I now need to output in postscript, pdf and
> html, depending on the command line given via -PRINTER:XX, thus would like
> to be able to obtain what XX is and apply the appropriate extension for the
> report.  My current solution is to add -F<ext> to the command line where
> <ext> will be .ps, .pdf, .html respectively and I can set:
>
> let $rpt = $<var from file> || $sqr-report
>
> since $sqr-report will have the value of -F, but this seems a little
> redundant.
>
> Any ideas???
>
> THANX,
> Brannon Fay