| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 
 | CrystalReportSource1.ReportDocument.SetParameterValue("donnee", Session["CB_chifre"].ToString());
CrystalReportSource1.ReportDocument.SetParameterValue("donnee_clair", Session["donnee_CB"].ToString());
CrystalReportSource1.DataBind();
 
try
{
        CrystalReportSource1.ReportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Server.MapPath("_A_.pdf"));
}
catch(Exception err)
{
        Response.Write(err.Message);
        Response.End();
}
 
System.Drawing.Printing.PrintDocument PD = new System.Drawing.Printing.PrintDocument();
CrystalReportSource1.ReportDocument.PrintOptions.PrinterName = PD.DefaultPageSettings.PrinterSettings.PrinterName;
try
{
        CrystalReportSource1.ReportDocument.PrintToPrinter(1, false, 0, 0);
}
catch (Exception err)
{
        Response.Write(err.Message);
        Response.End();
} |