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

Print Crystal Report Directly

P: 1
I am creating a crystal report in .net and i need to print the crystal report directly without showing it to user .
for this i am writing code
Report.PrintToPrinter(1, true, 0, 0);

but when i run this report the print out page only show page no. not data present in report i.e only page no printed nothing else....i am in trouble plz help me how to print report directly using print to printer method....

thanks in Advance......
Oct 20 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 569
I used this piece of code to export my report to PDF without showing it:

Expand|Select|Wrap|Line Numbers
  1.         Dim exportOpties As New ExportOptions
  2.         Dim diskopties As New DiskFileDestinationOptions
  3.         exportOpties.ExportDestinationType = ExportDestinationType.DiskFile
  4.         exportOpties.ExportFormatType = ExportFormatType.PortableDocFormat
  5.         diskopties.DiskFileName = "J:\Laboratoria\ImmunoAanvraag\Uitslagen\" & intAanvraagID & ".pdf"
  6.         exportOpties.ExportDestinationOptions = diskopties
  7.         Me.ERBB2ReportViewer.ReportSource.Export(exportOpties)
  8.         Me.Close()
Instead of ExportOptions, you can use PrintOptions. Perhaps you can do something with it.


Oct 20 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.