用Visual Studio 2005带的Crystal Report 10.2,作一个报表显示1个二维结果集 .
使用XSD作为数据源,页面代码如下:
ReportDocument customerReport = new ReportDocument();
string reportPath = Server.MapPath("EmpBaseDetailReport.rpt");
customerReport.Load(reportPath);
DataSet dataSet = DbAccess.QueryDataSet("SELECT * FROM Emp_Base");
customerReport.SetDataSource(dataSet);
CrystalReportViewer1.ReportSource = customerReport;
CrystalReportViewer1.DataBind(); 打开报表页面后,记录未显示,请指点.
使用XSD作为数据源,页面代码如下:
ReportDocument customerReport = new ReportDocument();
string reportPath = Server.MapPath("EmpBaseDetailReport.rpt");
customerReport.Load(reportPath);
DataSet dataSet = DbAccess.QueryDataSet("SELECT * FROM Emp_Base");
customerReport.SetDataSource(dataSet);
CrystalReportViewer1.ReportSource = customerReport;
CrystalReportViewer1.DataBind(); 打开报表页面后,记录未显示,请指点.
解决方案 »
- 求算法
- GridView 中 CheckBoxField问题
- 无法在web服务器上启动调试 无法连接到web服务器,请验证web服务器正在运行,并且防火墙没有阻止传入的http请求
- 提示“未将对象引用设置到对象的实例”,这是为什么呀?
- 水晶报表设置,如何把制图图形变成有链接的
- 如何判断局域网上某台机子上的文件是否存在?
- 简单问题求助!!在线等,感谢各位大侠!!
- nhibernate的问题!思归大虾请进
- .net要学哪些技术啊?
- 如何读出已经和SqlDataReader绑定好的 DataList中某列某行的值?
- .net1.1下修改web.config后出现无法被释放的dll
- 我为什么无法打开数据库?
这样不行
应该定义一个数据集,然后生成它的一个实例并从数据库填充数据,再绑定。
报表中的字段一定要来源于这个数据集