This is my code am getting the result as byte array.
i want to print this byte array without saving as pdf in system.
kindly note this is web application not window application

        Page p = new Page();
        string fname = string.Empty;
        string filetype = string.Empty;

        ReportViewer rptvw1 = new ReportViewer();
        rptvw1.ProcessingMode = ProcessingMode.Local;
        rptvw1.LocalReport.ReportPath = p.Server.MapPath("~/GridReport.rdlc");
        BL_Insurance.PrintDetail print = new BL_Insurance.PrintDetail();
        DataTable ds = print.Print(Convert.ToInt32(p.Session["transactionid"]), Convert.ToString(p.Session["typeofplan"]),             Convert.ToInt32(p.Session["UserID"]));
        ReportDataSource datasource = new ReportDataSource("DataSet1", ds);
        ReportParameter[] param = new ReportParameter[4];
        param[0] = new ReportParameter("Company", Convert.ToString(p.Session["insurancecompany"]));
        param[1] = new ReportParameter("Policy", Convert.ToString(p.Session["policyname"]));
        if (ds.Columns.Contains("Adult"))
            param[2] = new ReportParameter("Adult", "True");
            param[3] = new ReportParameter("Child", "True");

            param[2] = new ReportParameter("Adult", "False");
            param[3] = new ReportParameter("Child", "False");
        Warning[] warnings = null;
        string[] streamIds = null;
        string mimeType = string.Empty;
        string encoding = string.Empty;
        string extension = string.Empty;
        string fileNameExtension;
        filetype = "pdf";
        byte[] bytes = rptvw1.LocalReport.Render(filetype, null, out mimeType, out encoding, out extension, out streamIds, out warnings);
This article has been dead for over six months. Start a new discussion instead.