• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Print crystal report in asp.net without opening the report

I have application in ASP.Net. We have 30-40 Crystal Reports which have same parameters. Rightnow we are able to print the report after exporting it to pdf file. Now we have client requirement like they will select the report from checkbox and all selected report can be print directly on client printer without opening any viewer. Please explain me the way to resolve it.
0
sonakishah
Asked:
sonakishah
  • 3
  • 2
  • 2
  • +1
1 Solution
 
DhaestCommented:
Did you take a look at:
using the "PrintToPrinter" method of the report document. Like:

reportDocument.PrintToPrinter(1,false,0,0);

The methods takes the following parameters:
PrintToPrinter (int nCopies, bool collated, int startPage, int endPage)
0
 
Ajay SharmaCommented:
i am posting some comments which were posted in the same type of question on EE



http://www.experts-exchange.com/Databases/Crystal_Reports/Q_21071261.html

0
 
Ajay SharmaCommented:
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
sonakishahAuthor Commented:
Actually PrintToPrinter method use to print report on server and we also need to give printer name . Here on client machine How can I know printer name? Even I need print on my client machine
0
 
DhaestCommented:
reportDocument.PrintOptions.PrinterName = "PrinterName"
reportDocument.PrintToPrinter(1,false,0,0);

if you want to view the installed printer list, refer the following code.
Imports System.Drawing.Printing

Dim fwPrintSetting As new System.Drawing.Printing.PrinterSettings
Dim nCnt As Integer

With cboPrinter.Items
For nCnt = 0 To (PrinterSettings.InstalledPrinters.Count - 1)
.Add(PrinterSettings.InstalledPrinters.Item(nCnt))
fwPrintSetting.PrinterName = fwPrintSetting.InstalledPrinters.Item(nCnt)
Next
End With



http://www.codeguru.com/forum/archive/index.php/t-290238.html
0
 
sonakishahAuthor Commented:
I think so you people don't understand my question. My application web based and I want the print from the client side.
0
 
DhaestCommented:
A complete article about Automatically Printing Crystal Reports in ASP.NET

http://aspalliance.com/509
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now