Click here to Skip to main content
15,920,687 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how can i print a report in c# with adding labels, images and so on.
thanks for anu answers
Posted

There are some goog articles in code project for printing your forms. Check the below link for an example :
Print Windows Forms w/o using API
 
Share this answer
 
v2
Take reference from below link....
Inset image in oracle 9i[^]

DataTable dtNew = new DataTable();
dtNew.Columns.Add("ImageID");
dtNew.Columns.Add("Endo_Image", typeof(System.Byte[]));
for (int i = 0; i <= dt.Rows.Count - 1; i++)
{
DataRow dr = dtNew.NewRow();
dr["ImageID"] = dt.Rows[i]["em_imageid"].ToString();
dr["Endo_Image"] = (System.Byte[])dt.Rows[i]["em_image"];
dtNew.Rows.Add(dr);
}
if (dtNew.Rows.Count > 0)
{
ReportDocument rpts = new ReportDocument();
rpts.Load(Server.MapPath("~/crImage.rpt"));
rpts.SetDataSource(dtNew);
Response.Buffer = false;
Response.ClearContent();
Response.ClearHeaders();
try
{
rpts.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "Images");
}
catch (Exception ex)
{
return;
}
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900