SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["config"]); SqlCommand cmd = new SqlCommand("select custname,contact,fax,bill_add,shpng_add, item_name,model,serialno,quantity,net_amnt,vat,total_amnt from customer,bill", con) con.Open(); DataSet ds = new cusbill(); SqlDataAdapter daa = new SqlDataAdapter(cmd); daa.Fill(ds.Tables[0]); ReportDocument rdoc = new ReportDocument(); rdoc.Load(Server.MapPath("CrystalReport.rpt"));//Error occur in the statement if (ds.Tables[0].Rows.Count > 0) { rdoc.SetDataSource(ds); crysview.ReportSource = rdoc; //crysview is the object of Crystalviewer which has been define in the fronend. } con.Close(); }
rdoc.Load(Server.MapPath("CrystalReport.rpt"));
rdoc.Load(Server.MapPath("C:\Reports\CrystalReport.rpt"));
string paths="C:\Users\sony\Documents\Visual Studio 2008\MMS\CrystalReport.rpt"; rdoc.Load(paths); rdoc.SetDataSource(ds); crystalReportViewer1.ReportSource = rdoc;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)