当前位置:编程学习 > C#/ASP.NET >>

如何绑定报表数据源!!!!!!!!

我用的是VS自带的报表,放到Winfrom窗体里。xsd文件也建好了,提示错误说:报表没有数据集,请问大侠如何绑定!!!本人刚刚接触做报表,多多帮助,谢谢 --------------------编程问答-------------------- 没有人吗,帮帮忙。。。 --------------------编程问答-------------------- 水晶报表。。
ReportDocument rDoc1 = new ReportDocument();
            //DataGridview中的datatable复制到指定的指定DataTable中,为水晶报表提供
            SPDataSet ds1 = new SPDataSet();
            DataTable tabl = ((spList)_parentForm).GetDgvToTable();
            foreach (DataRow dr in tabl.Rows)
            {
                ds1.SPTable.ImportRow(dr);
            }
            //绑定水晶报表
            CrystalReport1 cry = new CrystalReport1();
            cry.Refresh();
            cry.SetDataSource(ds1.Tables["SPTable"]);
            this.crystalReportViewer1.ReportSource = null;
            this.crystalReportViewer1.ReportSource = cry;
            this.crystalReportViewer1.RefreshReport();
--------------------编程问答-------------------- 没有人用MicrosoftReprotViewer这个报表吗? --------------------编程问答--------------------
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,