1
    private void ShowRep_Click(object sender, EventArgs e)
    {
        DataTable dt = GetSpRecord(textBox1.Text);
        this.reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
        this. reportViewer1.LocalReport.ReportPath = "Report1.rdlc";
        this.reportViewer1.LocalReport.DataSources.Clear();
        this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("TestSalaryDataSet", dt));
        this.reportViewer1.LocalReport.Refresh();
    }

The above is my code i can see the stored procedure result is showing in datashources at this point reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("TestSalaryDataSet", dt)); but the problem is that my report viewer is not showing the data.

  • 1
    provide more information, do you bind report fields to the datasource in designer? – Artur A Sep 10 '13 at 04:19
  • please look at this : http://stackoverflow.com/questions/15894416/how-to-bind-datasource-to-a-rdlc-report-in-c-sharp – Dhaval Sep 10 '13 at 04:22
  • Yes i have binded the report fields as click on top right corner of the column and by selecting the desired column column..is it the right way for binding fields? – Farrukh Niaz Sep 10 '13 at 04:43
  • Are you getting any error messages within the `ReportViewer`? – Bryan Roth Jan 10 '14 at 04:13

0 Answers0