Skip to Content
author's profile photo Former Member
Former Member

PrintToPrinter HELP

Hi all, i have created new form and button1, on Button1 click i would like print directly my report.

This is the code:

Dim rptDocment As New CrystalDecisions.CrystalReports.Engine.ReportDocument

rptDocment.Load("C:\a.rpt")

Dim aPrintDialog As New PrintDialog()

If aPrintDialog.ShowDialog = DialogResult.OK Then
	With aPrintDialog.PrinterSettings
		rptDocment.PrintOptions.PrinterName = .PrinterName

		rptDocment.PrintToPrinter(.Copies, .Collate, .FromPage, .ToPage)
	End With
End If

But there is a problem: when PrintDialog show, i click on Properties of print, and i set 2 page for paper. After confirm the properties, i confirm the printdialog...... but when the paper exits on the printer there are 1 page per paper!!!!!!!!!!

Thanks for Help

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Apr 22, 2011 at 02:21 PM

    Export your report to RPT format and then print from the Report Designer as a test. If you get the same results it's likely due to having the New Page after option checked on in one of your sections.

    Thank you

    Don

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.