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

Word Reports (AREV Specific)

At 23 OCT 2006 11:22:59AM Steve Bell wrote:

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.
 TCL
 PDISK G:\REPORT1.DOC (OS)
 LIST FILENAME YADA YADA YADA (PE)
 SUSPEND COPY/B G:\REPORT1.DOC (?? OVERWRITE ??)
 unlockal_all
I 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!


At 23 OCT 2006 11:39AM Victor Engel wrote:

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.


At 23 OCT 2006 12:07PM Steve Bell wrote:

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.


At 23 OCT 2006 12:55PM Victor Engel wrote:

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?


At 23 OCT 2006 01:59PM Warren Auyong wrote:

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.


At 23 OCT 2006 02:14PM Warren Auyong wrote:

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


At 23 OCT 2006 02:30PM Ralph Johler wrote:

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.TXT

run 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.


At 23 OCT 2006 02:35PM Steve Bell wrote:

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.


At 23 OCT 2006 03:33PM Steve Smith wrote:

Always run PDISK to a local drive (as windows write-caches).


At 23 OCT 2006 03:58PM Steve Bell wrote:

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?


At 23 OCT 2006 05:13PM Victor Engel wrote:

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


At 23 OCT 2006 05:26PM Warren Auyong wrote:

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.


At 24 OCT 2006 11:42AM Steve Bell wrote:

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.


At 24 OCT 2006 12:20PM Victor Engel wrote:

"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.


At 24 OCT 2006 12:52PM Warren Auyong wrote:

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.

View this thread on the forum...