Click here to Skip to main content
15,940,921 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am trying to display Report for my Windows application in VS 2015.
its on Button Click and have two DateTimePicker controls for selecting From and To dates.The Problem is that i don't encounter any error when running the application Although the selected from and to dates are getting displayed in the report but not the Data.

Below is the code

What I have tried:

private void btnLoad_Click(object sender, EventArgs e)

           MyDataSetTableAdapters.GetDataReportTableAdapter ta = new MyDataSetTableAdapters.GetDataReportTableAdapter();
           MyDataSet.GetDataReportDataTable dt = new MyDataSet.GetDataReportDataTable();
           ReportDataSource rds = new ReportDataSource();
           rds.Name = "DataSet1";
           rds.Value = dt;

           ReportParameter rp1 = new ReportParameter("fromDate", dtFromDate.Value.Date.ToShortDateString());
           ReportParameter rp2 = new ReportParameter("toDate", dtToDate.Value.Date.ToShortDateString());

           ReportViewer1.LocalReport.ReportPath = "Report.rdlc";


Please Help what i am doing wrong here?
Updated 7-Apr-17 2:34am
CHill60 6-Apr-17 7:16am    
Sounds like nothing is being returned by the query. Put a breakpoint on ta.Fill(dt), step over the line and then examine the content of dt
Nazneen s 6-Apr-17 7:24am    
yes i did that its throwing NonImplementedException changed ta.Fill(dt,dtFromDate,dtToDate); getting The method or operation is not implemented. i googled about it and some say to comment it out or restart will fix it but nothing has worked for me so far.
CHill60 6-Apr-17 9:01am    
If you use the Reply link on a comment then the poster is notified that you have responded.
What is GetDataReportTableAdapter, I'm not familiar with it and it doesn't appear to be part of any commercial product. If it is your code then use the Improve question link to include that code.

1 solution

I Resolved The Issue by Creating new Stored Procedure and accessing data from it.


this changes should be done while autobinding datasource to reportviewer.
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