Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing without dialog

Status
Not open for further replies.

Kostarsus

Programmer
Nov 30, 2000
86
DE
Hello,

I use the following VB-code, to print a report


------------------------------------------------------
Public Sub PrintReport(RepFile As String, Optional CopyNumber, Optional StartPage, Optional StopPage)
Dim m_Report As New CRAXDRT.Report
If Right(RepFile, 4) <> &quot;.rpt&quot; Then
RepFile = RepFile & &quot;.rpt&quot;
End If

Set m_Report = m_App.OpenReport(RepFile)
m_Report.Database.SetDataSource mvarCDO

m_Report.PrintOut NumberOfCopy:=CopyNumber, StartPageN:=StartPage, stopPageN:=StopPage

End Sub
--------------------------------------------------------
But if I use this procedure, I get a print-dialog to make a choice of number of pages, etc. everytimes

Is there a way to print a created report without this dialog?
If so, can anyone tell me how I program such a routine?

Thanks in advance
CU Kostarsus


 
Just prior to the END SUB, add something like this:

Result% = m_report.printreport
if result% <> 0 then
'Show error in msgbox
end if

;-)

ECS DataSystems, Inc.
A Crystal Partner
 
Isn't just m_Report.Printout False ?? Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top