c# - Dataset not populating even after providing parameters for creating rdlc report. Resturn empty table with only column headers -


i have debugged whole process, parameters provided correctly , authentic dataset in return there no result. table empty. whereas when run query manually in sqlserver return result. reportviewer not show error shows column headers.

aspx code:

<rsweb:reportviewer id="reportviewer1" runat="server" font-names="verdana" font-size="8pt" width="100%" waitmessagefont-names="verdana" waitmessagefont-size="14pt">     <localreport reportpath="report1.rdlc">         <datasources>             <rsweb:reportdatasource datasourceid="objectdatasource1" name="dataset1" />         </datasources>     </localreport> </rsweb:reportviewer> <asp:objectdatasource id="objectdatasource1" runat="server" selectmethod="getdata" typename="cabdatasettableadapters.jobstableadapter"></asp:objectdatasource> 

c# code:

protected void button1_click(object sender, eventargs e) {     cabdataset dsusersinfo = new cabdataset();      var da = new jobstableadapter();      da.getdata(convert.todatetime(_txtfrom.text), convert.todatetime(_txtto.text));      reportviewer1.processingmode = processingmode.local;     reportviewer1.localreport.reportpath = server.mappath("~/report1.rdlc");      reportdatasource datasource = new reportdatasource("dataset1", dsusersinfo.tables[0]);     reportviewer1.localreport.datasources.clear();     reportviewer1.localreport.datasources.add(datasource); } 

first, have ensure dsusersinfo.tables[0] having data want display, , try calling reportviewer1.localreport.refresh() function


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -