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

Re: [Re: [Saving SQR Report output when output destination is]]



hi Parijat,

still this can be done. i have a feeling that the .lis file will be created
after the report is done, but not necessarily before ending the SQR, please
correct me if i am wrong. 
And even if it creates the SQR after termination, still, it's not a major
problem. You can probably schedule a process that first calls this SQR that is
generating the report with the wait parameter, and after this process is
finished, do the call system to "type" the .lis file to the lpt port.
Well, I am not sure about the implications about this in your SQR, cause if
you are using the get-run-control-params via the prcsapi.sqc, you might need
to pass this information to the launched SQR on the command line. else, if you
are doing this in the called procedure, it will cause a prompt box to appear
each time your SQR is run sayint "Please press enter, do not input a value" or
something.
But then, this is the  base solution - call the sqr and then call the print
procedure.
Now, the wait parameter might not work in Win'95. It works only for WinNt and
VMS systems.
Well, what you can do in this case is have a while loop that says :

while #status <> 0
 let #status = exists($fileName)
end-while

that can simulate a "WAIT" status for you. Then, once it finds that the file
is present, you can go ahead and run the command to print the file. MAKE SURE
THAT THE FILE YOU ARE CHECKING in the while condition is not there. I assumed
that you are generating file name on-the-fly. if this is not the case, just
delete the file before running the while condition.

HTH,
Vishal.

parijatsahai@hotmail.com wrote:
I agree with the second solution about using a batch file. But that will 
be cumbersome for the user. As for the CALL SYSTEM command, I thought 
about it earlier but I guess the LIS file that'll be created will be 
after the whole program is run, and so, CALL SYSTEM will not find the 
.LIS file. What do you say?

Parijat.

>Date:  9 Dec 98 10:05:23 PST
>From: Vishal Nayak <vishme@netscape.net>
>To: parijatsahai@hotmail.com
>Subject: Re: [Re: [Saving SQR Report output when output destination is]
>
>
>Hi Parijat,
>
>I know! I realized it later... I told you I had a bad day!! ;)
>well, here is a definitive solution for now..... create the report, let 
i=
>t
>store in the flat file wherever you want. =
>
>Then, at the end of the report, you just add a statement like :
>
>$reportFileName=3D 'c:\ps600\sqr\myreport.lis'
>$printCommand  =3D 'c:\windows\command\command type ' || 
$reportFileName =
>|| ' >
>lpt1 '
>call system using $printCommand
>
>I guess that should do the trick. in case you don't like that 
$printComma=
>nd,
>just write a bat file to do the equivalent, and just do a =
>
>
>call system using 'c:\path_to_bat_file\filename.bat'
>
>This could work, right ?!
>
>HTH,
>Cheers!!!
>Vishal.
>parijatsahai@hotmail.com wrote:
>Hi Vishal,
>
>This does make some sense to me but won't both the reports go to the =
>
>printer? How can I ensure that one report goes to the printer and the =
>
>second one doesn't?
>
>Parijat.
>
>



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


____________________________________________________________________
More than just email--Get your FREE Netscape WebMail account today at http://home.netscape.com/netcenter/mail