Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

asp.net c# crystal report button click and print

$
0
0

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.


Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>