How to bind datatable to reportviewer runtime

前端 未结 3 1852
天涯浪人
天涯浪人 2020-12-06 19:53

I want to do a bind datatable to reportviewer with the code below. I don\'t see the results appear in the reportviewer, wh

3条回答
  •  臣服心动
    2020-12-06 20:14

    The only things that I do differently is I do a:

    reportViewer1.LocalReport.DataSources.Clear();
    

    before setting the data source, and I do a:

    reportViewer1.LocalReport.Refresh(); 
    

    instead of calling RefreshReport() on the reportviewer control.

    I'm not sure what the ReportEmbeddedResource properly does, maybe try getting rid of that too.

提交回复
热议问题