C#中vs2010窗口应用的水晶报告 [英] crystal report for vs2010 window application in C#

查看:76
本文介绍了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();





我希望这对你有帮助..


< blockquote>这里的例子



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窗口应用的水晶报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆