CrystalReport报表显示的内容不正确

fxp49 2006-12-14 11:08:42
报表时用:CrystalReport1.rpt。
数据源时用Object 集合:建一个类,加入属性、函数。函数调用数据库的存储过程返回记录集。
在页上添加CrystalReportViewer控件myCrystalReportViewer1, ConfigureCrystalReports()过程代码如下:
Private Sub ConfigureCrystalReports()
PopulateStockValuesArrayList()
Dim reportPath As String = Server.MapPath("CrystalReport1.rpt ")
stockObjectsReport = New ReportDocument()
stockObjectsReport.Load(reportPath)
stockObjectsReport.SetDataSource(InvoiceTotalValues)
myCrystalReportViewer1.ReportSource = stockObjectsReport
End Sub
问题:如果在存储过程中的SELECT 后面的字段列表中插入列,例如:
SELECT 字段1,字段2,1 AS COL1 FROM TABLE1
结果是:在查询分析分析器中显示的结果正确,在页面中用GridView控件显示也正确,在报表中显示的行数、列数都正确,但是报表中显示的内容不正确,字符全为空,数值全为0。
...全文
164 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
itmingong 2006-12-15
  • 打赏
  • 举报
回复
数据源用Object 集合?
对象名要保持一致

4,819

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧