本文介绍了在C#中报告查看器rdlc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 private void button4_Click(object sender,EventArgs e)
{
Form3 frm = new Form3();

DataSet1 myDataSet = new DataSet1();
DataTable dataTable = myDataSet._myTable;
for(int i = 1; i< = n; i ++)
{

DataRow drow = dataTable.NewRow();
if(true)
{

drow [proid] =0001;
drow [proname] =data2;
drow [cost] =200;
drow [code] =0123;
drow [shopname] =商店名称;
}

dataTable.Rows.Add(drow);
}
ReportDataSource datasource = new ReportDataSource(mydata,(DataTable)dataTable);

frm.reportViewer1.LocalReport.DataSources.Clear();
frm.reportViewer1.LocalReport.DataSources.Add(datasource);
frm.reportViewer1.RefreshReport();

frm.Text =reporting;
frm.StartPosition = FormStartPosition.CenterScreen;
frm.ShowDialog();
}
< pre>

我尝试过:

数据未在报告查看器中显示rdlc(c#)

https:/ /2.bp.blogspot.com/-Cw76wxrVtM4/Wfv1tyTikTI/AAAAAAAAAqk/-WS3LidgkegsUuhvnDlw30hnM-oWCeKngCLcBGAs/s320/ppp.png
解决方案


这篇关于在C#中报告查看器rdlc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 23:14