Printing a local report without preview
-
Hi Guys I need a favor again to somebody who had experience with printing report procedure, I have a simple program with a crystal report as the report generate,however when I want to printing out the report I have to running a program which connected to crystal report and click the printer icon on that crystal report preview to printing out my report. Could you please to tell me the way to printing out my report directly without preview it ?, if you can please tell me the command and show me the complete procedure that I have to follow. If this command not need a crystal report as the report generate please tell me what kind a program should I use for the main report generator. Many thank for you Best regards ;) ICE
-
Hi Guys I need a favor again to somebody who had experience with printing report procedure, I have a simple program with a crystal report as the report generate,however when I want to printing out the report I have to running a program which connected to crystal report and click the printer icon on that crystal report preview to printing out my report. Could you please to tell me the way to printing out my report directly without preview it ?, if you can please tell me the command and show me the complete procedure that I have to follow. If this command not need a crystal report as the report generate please tell me what kind a program should I use for the main report generator. Many thank for you Best regards ;) ICE
I haven't done it before, but I will in the near future so I've been looking around for similar information. I think to print without using the print preview all you need to do is set the PrinterOption properties of your crystal reports ReportDocument object. Then call the PrintToPrinter method of the ReportDocument object. (This is what I've gotten from Visual Studio 2005) I know this doesn't answer all of your questions, but maybe it can help get you started.
-
I haven't done it before, but I will in the near future so I've been looking around for similar information. I think to print without using the print preview all you need to do is set the PrinterOption properties of your crystal reports ReportDocument object. Then call the PrintToPrinter method of the ReportDocument object. (This is what I've gotten from Visual Studio 2005) I know this doesn't answer all of your questions, but maybe it can help get you started.
Hi Mr.Kschuler Thank you very much for your reply, well I think I can consider to use your way, but if you don't mind please send me your sample program command for this matter. Thank's ICE
-
Hi Mr.Kschuler Thank you very much for your reply, well I think I can consider to use your way, but if you don't mind please send me your sample program command for this matter. Thank's ICE
This bit of code seemed to work for me. (I use a PrintDialog control to allow the user to select which printer they want. And again, I am assuming you use Visual Studio 2005.)
Select Case PrintDialog1.ShowDialog
Case Windows.Forms.DialogResult.OK
ProductionWorksheet1.PrintOptions.PrinterName = PrintDialog1.PrinterSettings.PrinterName
ProductionWorksheet1.PrintToPrinter(1, False, 1, 1)
End Select-- modified at 9:05 Thursday 8th June, 2006 ProductionWorksheet1 is the name of my ReportDocument object which is found in the toolbox under the Crystal Reports section.
-
Hi Guys I need a favor again to somebody who had experience with printing report procedure, I have a simple program with a crystal report as the report generate,however when I want to printing out the report I have to running a program which connected to crystal report and click the printer icon on that crystal report preview to printing out my report. Could you please to tell me the way to printing out my report directly without preview it ?, if you can please tell me the command and show me the complete procedure that I have to follow. If this command not need a crystal report as the report generate please tell me what kind a program should I use for the main report generator. Many thank for you Best regards ;) ICE
Hi you can use the printOut command of the report. i.e. on the click event of the print button.... CrystalReport1.printOut false the parameter false is used to diable user prompt. the other parameters are self explaining. (Note: I am using crsytal reports 9 and VB.6) Bye:zzz: