Scripts that tell DAS to Print

We have several reports that run on DAS 4.1.5 (NT Server) where the distribution command invokes a script that sends the report to a printer. It’s a very simple script, with several versions, all pointing to different printers:

Sub Main()
dim doc as BODocument
set doc = Application.Documents.Item(1)

doc.Printout("\PRINTER01\PC15")
End Sub

We’ve found that sometimes they print where they should, and sometimes they go to the servers default printer instead. We need to understand how DAS sends the file,

  1. Is it a Postscript file? If so, what level of Postscript is supported (1, 2, or 3)?
  2. Is it sending a Bitmap?
  3. Is DAS trying to define the printer first, or allowing the server hosting the printer to do that?
  4. What exactly does “doc.Printout” do?

Any ideas will be greatly appreciated!

Bonnie Washburn
Steelcase Inc.
Technical Application Services
CH-3W-04
616-475-2154


Listserv Archives (BOB member since 2002-06-25)

Hi,

Are your declared printers SHARED ?
If not, the job goes to the default printer.

HTH


Listserv Archives (BOB member since 2002-06-25)

On Mon, 24 Jan 2000 10:40:00 -0500, Bonnie.Washburn@STEELCASE.COM wrote:

We have several reports that run on DAS 4.1.5 (NT Server) where the distribution command invokes a script that sends the report to a printer. It’s a very simple script, with several versions, all pointing to different printers:

Sub Main()
dim doc as BODocument
set doc = Application.Documents.Item(1)

doc.Printout(“\PRINTER01\PC15”)
End Sub

Bonnie,
I don’t know if this resolves your problem, but I had similar problems. I found the report printed at the network printer when there was only one sub-report. It went to the DAS’s default printer when there were multiple sub-reports. We have a minimum of three sub-reports in each BO document sent to DAS. I found the follwing worked for all printers. I could never work out why using BOReport worked but using BODocument wouldn’t.

Sub main
Dim PrinterName
Dim rep1 as BOReport
Dim rep2 as BOReport
Dim rep3 as BOReport
set PrinterName=“St Marys 3MAUPR026”
’ Refresh all the DataProviders of the Document ActiveDocument.Refresh

set rep1 = ActiveDocument.Reports.Item(1) set rep2 = ActiveDocument.Reports.Item(2) set rep3 = ActiveDocument.Reports.Item(3)

rep1.PrintOut(PrinterName)
rep2.PrintOut(PrinterName)
rep3.PrintOut(PrinterName)

Exit Sub

End Sub

John.


Listserv Archives (BOB member since 2002-06-25)