Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 30 NOV 2000 03:50:44PM M Ford wrote:

I am attempting to add to a program the option to either print a report to a printer or save the report to file using Pdisk. The present program uses the Printer On Printer Off Getprinter and Setptr routines throughout the program in many different subroutines.The Pdisk command works initially but then appears to be negated by the other print commands.

I have searched the previous Pdisk questions and answers and discovered Setptr is included in Pdisk so I can remove this command. What impact do the other commands have on Pdisk?

Any help will be appreciated.

Mark


At 30 NOV 2000 04:31PM Don Miller - C3 Inc. wrote:

Mark ..

Printer On / Printer Off have no effect on PDISK type stuff. SetPtr would, however, since you are controlling it inside the app via R/BASIC, you should be ok. Interesting idea …

Don Miller

C3 Inc.


At 30 NOV 2000 08:00PM M Ford wrote:

Thanks for the info. I have confirmed (your suggestion) that with Printer On the data dis directed to file. So far so good. My problem now a calculation routine calls the print routine. The client can select any number of reports to print. I set the Pdisk c:\file.txt in the routine taht cals the Calculation and Print sub routines. The Pdisk setting is ignored in the Print routine. If I put the Pdisk command in the Print routine it clears the print file each time the routine is called.

*

response=1

msg(Do you wish to print reports? "BYN",response,response)

If response=1 then

cmd=pdisk prn"

end else

cmd=pdisk C:\report.asc"

execute cmd

end

for I=1 to number_of reports

call calculate_report(report[i])

call Print_routine(report[i])

next I

cmd=pdisk prn"

execute cmd

end

I am using the execte command as I believe this does not clobber all my selects etc.

Any help will be greatly appreciated.


At 01 DEC 2000 08:49AM Don Miller - C3 Inc. wrote:

The problem seems to be in the call to your print routine. If it also does pdisk type things, then you're screwed since it will constantly overwrite the output file. Indtead, you can check the status of whether pdisk has redirected the printer in your code (or maybe you don't need to do this at all). I would think that the print routine would simply do PRINTER ON .. format and print the lines and then do a PRINTER OFF on return. In that way it shouldn't matter. If you turned PDISK on before the start of the loop, you should be able to do a PDISK PRN (S) at the end to close the print file.

Don Miller

C3 Inc.


At 01 DEC 2000 12:52PM M Ford wrote:

Thanks Don. I have decided to set up a test program to check out your suggestions. If I still encounter problems I will incorporate the Print routine in my main program.

Thanks again for your help. Mark

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/a4039085ca40953a852569a700728212.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1