Crystal Reports Printing without Preview and having Parameters how?

D

darf

Firstly, I'm VERY green on all this Crystal stuff - so please excuse my
ignorance. I see on other posts that to print a report without using
the viewer use:

Dim crReportDocument As ReportDocument
crReportDocument = New myCrystalReport()
crReportDocument.PrintOptions.PrinterName = "\\server\myprinter"
crReportDocument.PrintToPrinter(1, True, 1, 1)

When I display the report using the Viewer I pass it some parameters,
eg. CrystalReportViewer1.ParameterFieldInfo = crParameterFields

My question is, how to I pass these parameters when printing the report
without using the viewer? Or, do I still need to use the viewer, hide
it on the form, and assign the ParameterFieldInfo to it? Whats the
normal way of doing this? I hope i make sense!

Thanks in advance,
David.
 
R

Richard Dudley

Instead of using the viewer, you can use the ReportDocument object, and pass
parameters to that. If you'll be building more than 1 report like this, I
suggest you go to www.crystalreportsbook.com and buy the book. It's the
best money you'll spend if you have to work with Crystal, and it will answer
many of the questions you'll have as follow-ups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top