-
So far I've just been printing my reports to a window, but now want to print to the printer.
I set my reportfilename and printfilename and set it to print to printer, but each time I want to print it, it asks me for an output filename. I enter it, but nothing gets printed - a file with the name I specified when asked is just created.
Any suggestions??
Andy
-
Crystalreport1.Destination = crptToPrinter
Crystalreport1.PrintReport
-
Nope, I still get the "Output Filename" Input Box?????
-
Are you calling the report into VB6? If so can I see your code for that.
And can I see the code you are using to try and print the report?
jeffro
-
Try the following:
Private Sub CmdPrint_Click()
Call View_Report("YourReportName.rpt", False, "")
End Sub
Sub View_Report(Report As String, XYZ As Boolean, Selform As String)
strpath1 = "J:\MainFolder\Reports\"
With CRPrinter
.creport.Reset
.creport.ReportFileName = strpath1 & "\" & Report
.creport.Destination = crptToPrinter
.creport.Action = 1
.creport.WindowShowGroupTree = XYZ
End With
End Sub