c# - How to bind crystal report with linq to entities Method -


i facing error while binding crystal report class library's method using linq entities.please me .error is:dataset not support system.nullable<>.following code.

 reportdocument customerreport = new reportdocument();              customerreport.load(server.mappath("sample.rpt"));             ilist<customer> cs;              cs = databasebase.getallcustomers();              customerreport.setdatasource(cs);              crystalreportviewer2.reportsource = customerreport;              crystalreportviewer2.databind();
working fine ado.net code need using entity framework..code of ado.net :

 dscustomer dscs = new dscustomer();              string conn = system.configuration.configurationmanager.connectionstrings["crmconnectionstring"].connectionstring;              string statement = "select * customer";              sqldataadapter dastatement = new sqldataadapter(statement, conn);              dastatement.fill(dscs._dscustomer);              reportdocument rpt = new reportdocument();              rpt.load(server.mappath("viewcustomer.rpt"));              rpt.setdatasource(dscs);              this.crystalreportviewer1.reportsource = rpt;


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -