本文介绍了C#中vs2010窗口应用的水晶报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们怎样才能将水晶报告与动态数据集或数据表一起使用。 如何在报表格式查看器中编写代码。
解决方案Quote:
带有动态数据集或数据表的水晶报告
adpt = new OleDbDataAdapter(select * from salesDetails,conn); // conn as OleDbConnection adpt.Fill(dataSet); CanceledBillReport CBR = new CanceledBillReport(); // CanceledBillReport是一个Crystal Report CBR.SetDataSource(dataSet.Tables [0]); CBR.Refresh(); report_show RS = new report_show(); // report_show是我在其中添加Crystal Report Viewer的表单 RS.crystalReportViewer1.ReportSource = CBR; //您需要将CrystalReportViewer1修改属性更改为public RS.crystalReportViewer1.Refresh(); RS.Show();
我希望这对你有帮助..
这里的例子 Crystal Report with DataSet [ ^ ]
how can we use crystal report with dynamic dataset or datatable . how to write the code in report form viewer.
解决方案 Quote:crystal report with dynamic dataset or datatable
adpt=new OleDbDataAdapter("select * from salesDetails ", conn);//conn as a OleDbConnection adpt.Fill(dataSet); CanceledBillReport CBR = new CanceledBillReport(); //CanceledBillReport is a Crystal Report CBR.SetDataSource(dataSet.Tables[0]); CBR.Refresh(); report_show RS = new report_show();//report_show is a form in which I added Crystal Report Viewer RS.crystalReportViewer1.ReportSource = CBR;//you need to change CrystalReportViewer1 "Modify" property to public RS.crystalReportViewer1.Refresh(); RS.Show();
I hope this will help You..
Here an example Crystal Report with DataSet[^]更多推荐
C#中vs2010窗口应用的水晶报告
发布评论