日期:2014-05-19  浏览次数:20670 次

Crystal Report 10.2无法显示记录
用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();  

打开报表页面后,记录未显示,请指点.

------解决方案--------------------
DataSet dataSet
这样不行
应该定义一个数据集,然后生成它的一个实例并从数据库填充数据,再绑定。
报表中的字段一定要来源于这个数据集
------解决方案--------------------
http://blog.csdn.net/gaofeng2000/archive/2007/04/12/1562824.aspx