[RESOLVED] How to print a report without having to view it?
Good day,
I'm trying to develop one of my own applications in VB6 and I wanted to print out a receipt(created from crystal report 8.5) automatically? I use this simple code just to view a sample report:
Note: used the crystal report ocx for this one
VB Code:
.DataFiles(0) = XXXXXXXXXXXX
VB Code:
.ReportFileName = XXXXXXXXX
but I want to know how to print a report without having to view it. Can you help me please?
Re: How to print a report without having to view it?
Try this
VB Code:
With CrystalReport1
.DataFiles(0) = XXXXXXXXXXXX
.ReportFileName = XXXXXXXXX
.Destination = crptToPrinter '<<==== add this line
.Action = 1
End With
Re: How to print a report without having to view it?
Re: [RESOLVED] How to print a report without having to view it?
Quote:
Originally Posted by newbie123 via PM
What if the printer was relocated to another computer. would it still work? how can i make it print it in a network environment?
Please post your questions on the open forum. If you have a question, chances are very good that someone else is going to have the same question at some point, and it a question is answered in a PM, that future member is not going to find an answer.
When you use crptToPrinter Crystal will use whatever is currently setup on the machine as the default printer, regardless of where that printer is.