OK,
I'm attempting to setup some list reports using VOC records to run them from a menu. Using PDISK to send each report to a .DOC so the user can open it from Word, do anything they choose with their networked printer then print their report.TCLPDISK G:\REPORT1.DOC (OS)LIST FILENAME YADA YADA YADA (PE)SUSPEND COPY/B G:\REPORT1.DOC (?? OVERWRITE ??)unlockal_allI still need to check on network rights to see if they are interfearing with things. I'm not to up on Word I hardly ever use it. I wanted to use the same REPORT1.DOC, REPORT2.DOC, so on and so on over and over each time they run each report. I was'nt having as much trouble sending the file to c: drive but using a Network drive would be better. Hopefully this is just a temporary fix until they OK us to get Arev 32 and OI.For now,
Temp Help Needed …
Thanks!
Seems like you could just:
TCL
PDISK G:\REPORT1.DOC (OS)
LIST FILENAME YADA YADA YADA (PE)
PDISK PRN
I think you were missing the last part. By the way, I recall there being some issue with pdisking to network drives. I don't recall what the issue was, but you might want to check the forum for information on this.
I started out as you suggest, problem is that my users are always wanting to change to landscape or landscape legal or whatever and the network printers re-set to default every time.
I'm not sure I understand. Where/when are the printers changed? In any case, you need a PDISK PRN statement to close the pdisk file for further processing.
If you're embedding your own printer control codes, you can concatenate them to the file after its generated. Then copy the file to the printer. Is that what you're trying to do? If not, what is your intention for the COPY command?
I think the big bugaboo with PDISKing to a network drive is sharing. What happens if two users are running the same report that wants to write to the same file?
Each user needs to have either a unique file name per report or a unique directory.
If you're deadset on sending it to Word than do something like this:
TCL
PDISK G:\REPORT1.DOC (SO
LIST 10 VOC F1 F2 F3 (PE
PDISK PRN (SO
SUSPEND CMD /C START /W G:\REPORT1.DOC
If you know what format (landscape, portrait etc) then run a RBasic program that sends the printer setup codes as shown in the examples by Steve Smith - for example write and catalog a program HP_LANDSCAPE that sends the printer codes to place it in landscape mode):
TCL
PDISK G:\REPORT1.DOC (SO
HP_LANDSCAPE
LIST 10 VOC F1 F2 F3 (PE
PDISK PRN (SO
SUSPEND COPY /B G:\REPORT1.DOC LPT1
Maybe you could have the Arev voc command pdisk the report to an obviously tempory path and/or file like
PDISK G:\RPT_TEMP\R1234567.TXTrun the report close it with PDISK PRN and then from inside the voc item
SUSPEND EXIT CMD /C START WINWORD.EXE G:\RPT_TEMP\R1234567.TXT(TXT extension might be better as it communicates no formatting)
Then ensure everyone knows the RPT_TEMP folder is not for saving things. You can even include the YYYYMM in the path name if needed to help with cleaning up old stuff.
Word will launch and open the report with the focus, and arev will resume behind word.
In this problem their is only one user running the reports. I was thinging possabily someone else could open and print the same report from Word from another location that didd'nt even have Arev. If the user sends the .doc file to her c: drive, only she or he can get to it. I guess I still don't fully understand all of the details of how PDISK works either. If I just get the report into a .doc file, then the other users can print it and make their own printer settings with
out any trouble. Seems when ever I try to change the printer with Arev or/and PDISK, it times out and looses the settings.
Always run PDISK to a local drive (as windows write-caches).
Steve,
That will do. I can live with that. Now can keep overwriting the same report.doc file each time I run the same report with different date inputs?
If you
PDISK filename
you will be prompted whether to overwrite. If you
PDISK filename (O
if the filename already exists, it will be truncated.
Always PDISK PRN when finished. That is how you close the pdisk file so that you can do other things with it (like open it in another application or move it to the network).
Victor
What network is this running on? If it is Novell you can change the timeout parameters and if you're using print Queues you can control whether or not the printer reset string is sent to each job.
ok
But, when I PDISK PRN won't that send it to the printer to print?
I still need to open it in Word so i can make printer settings.
If I make settings with Arev, the printer always times out on us.
"But, when I PDISK PRN won't that send it to the printer to print?"
No. What PDISK does is to establish where SUBSEQUENT printer output will go. First it closes an existing connection. Then it opens the new one. It doesn't move anything anywhere. It just establishes a connection.
The program/report should direct all output to the printer between the PDISK filename and PDISK PRN statements.
PDISK PRN will close the capture job, otherwise the file is still held open and other print output will still be captured to the file. And you'll probably get a share violation/warning when trying to open the file in Word.