For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Crystal Reports > May 2005 > Printing a report









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Printing a report
JC

2005-05-25, 4:00 pm

Hi All,

Using C# but couldn't find a group for that so thought i would try here.
All I need to do is pass the report a parameter and have it print to a
printer. I don't want to display on screen. I remember it being pretty
simple in vb6 but can't seem to find the simple info all i can find is the
viewer thing.
Can anyone point me to an easy to follow sample.

John Cantley


Charles A. Lackman

2005-05-25, 8:58 pm

Hello,

The following is a code sample for VB but the conversion should be simple as
the constructor is the same. You could run into problems if there is not a
default printer associated with the document.

To set the printer use the following code sample.

CrystalReport.PrintOptions.PrinterName = "Lexmark X6100 Series"

To print the report without a viewer.

CrystalReport.printtoprinter(Copies, True, StartPage, EndPage)

Hope this helps,

Chuck





"JC" <striderguy56@hotmail.com> wrote in message
news:u5XXFOUYFHA.612@TK2MSFTNGP12.phx.gbl...
Hi All,

Using C# but couldn't find a group for that so thought i would try here.
All I need to do is pass the report a parameter and have it print to a
printer. I don't want to display on screen. I remember it being pretty
simple in vb6 but can't seem to find the simple info all i can find is the
viewer thing.
Can anyone point me to an easy to follow sample.

John Cantley



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com