i use win 7 vs2008 . when i click button crystal report will print
this is my code
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
//using System.IO;
public partial class BookingReceiptList : System.Web.UI.Page
{
public ReportDocument crystalReport = new ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
The error is pretty obvious that tells that no printer has been configured on the current machine. You add a printer on the machine and make it default, so this method will always try to connect to a default printer and get the report print.
What is your case when no printer is actually connected to the machine, and/or configured on the machine?
Please “Mark as Answer” on the reply that helps you. This will help others jump directly to a solution having similar problem.
Check whether printer is installed in your system. If you like to check whether it prints the data or not you just use export option of crystal report and then check the exported file.
Manirul Isla...
Member
116 Points
147 Posts
asp.net c# crystal report button click and print
Feb 23, 2013 12:40 PM|LINK
hi frd,
i use win 7 vs2008 . when i click button crystal report will print
this is my code
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
//using System.IO;
public partial class BookingReceiptList : System.Web.UI.Page
{
public ReportDocument crystalReport = new ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
crystalReport.Load(Server.MapPath("BookingMoneyRe.rpt"));
crystalReport.SetDatabaseLogon
("", "", @"MONIR-PC\SQLEXPRESS", "afrindb");
string project1 = Convert.ToString(Session["BokingMoney"]);
crystalReport.SetParameterValue("bookid", project1);
CrystalReportViewer1.ReportSource = crystalReport;
crystalReport.PrintToPrinter(1, false, 0, 0);
}
its not workiny any help
its getting error
No printers are installed.
Pankaj.Sharm...
Contributor
2350 Points
387 Posts
Re: asp.net c# crystal report button click and print
Feb 25, 2013 08:25 AM|LINK
The error is pretty obvious that tells that no printer has been configured on the current machine. You add a printer on the machine and make it default, so this method will always try to connect to a default printer and get the report print.
What is your case when no printer is actually connected to the machine, and/or configured on the machine?
prabu.raveen...
Contributor
5020 Points
955 Posts
Re: asp.net c# crystal report button click and print
Feb 25, 2013 08:37 AM|LINK
Hi,
Check whether printer is installed in your system. If you like to check whether it prints the data or not you just use export option of crystal report and then check the exported file.