By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,706 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,706 IT Pros & Developers. It's quick & easy.

Crystal Reports Printing without Preview and having Parameters how?

P: n/a
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.

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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.

"darf" <da*******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
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.

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.