Warning[] warnings; string[] streamIds; string mimeType = string.Empty; string encoding = string.Empty; string extension = string.Empty; String deviceInfo = "<DeviceInfo>" + " <OutputFormat>JPEG</OutputFormat>" + " <PageWidth>2.16in</PageWidth>" + " <PageHeight>3.41in</PageHeight>" + " <DpiX>300</DpiX>" + " <DpiY>300</DpiY>" + " <MarginTop>0in</MarginTop>" + " <MarginLeft>0in</MarginLeft>" + " <MarginRight>0in</MarginRight>" + " <MarginBottom>0in</MarginBottom>" + "</DeviceInfo>"; LocalReport Report = new LocalReport(); Report.ReportPath = Path.GetFullPath(@"..\..\Report\ReportFront.rdlc"); ReportDataSource QMRDS = new ReportDataSource("ICard_USP_EmployeeMaster_SelectAll", dt); Report.DataSources.Add(QMRDS); Byte[] mybytes = Report.Render("Image", deviceInfo, out mimeType, out encoding, out extension, out streamIds, out warnings); using (FileStream fs = new FileStream(Application.StartupPath + @"\Print\" + dt.Rows[0]["Id"].ToString() + "_" + dt.Rows[0]["PId"].ToString() + "_" + "Front.jpg", FileMode.Create)) { fs.Write(mybytes, 0, mybytes.Length); fs.Flush(); fs.Dispose(); fs.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)