Click here to Skip to main content
15,898,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am designing employee card of one company ,company give me one image for that card,with required field ,and they want to get all employee card on one click.
i use following code
C#
dataset.EmployeeScpass.Rows.Add(emp.Id,
                           emp.Name,
                           emp.Cnic,
                           empsp.ToSectorName,
                           emp.ImgBody,""
                           );

and in rdlc design view insert one table and design it according to design ,but when i set background image that is given by company ,my rdlc table is not working with it,i google but not a suitable solution,i test different method too. i used embedded image put table on it and vice versa,details of employee shown up with out background image.
Posted

1 solution

using (SqlConnection cn = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["Connection"].ToString()))
{
cn.Open();
using (SqlCommand cmd = new SqlCommand("select Picture,Name,ID from tblImage", cn))
{

using (SqlDataAdapter da = new SqlDataAdapter(cmd))
{
DataSet ds = new DataSet();
da.Fill(ds, "DataSet1_DataTable1");
ReportDataSource rds = new ReportDataSource("DataSet1_DataTable1", ds.Tables[0]);
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(rds);
ReportViewer1.LocalReport.Refresh();

}

}
 
Share this answer
 

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