2、用作 viewer.reportsource 的5种类型的报表:
- 使用 Report 名 (通过文本路径)
- 使用 Report 对象 (通过文本路径)
- 使用非类型的 Report 组件 (通过文本路径和 ReportDocument reportdocument1)
- 使用 Report 对象 (通过已添加到项目的报表文件,如:World Sales Report.rpt)
- 使用强类型的 Report 组件()(通过 ReportDocument world_Sales_Report1)
注:Report 组件即“工具箱”-〉“组件”-〉“ReportDocument”
3、代码简介:
- 使用 Report 名 (通过文本路径)
CrystalReportViewer1.ReportSource = "C:/Crystal/crnet/vbnet_win_simplepreviewreport/World Sales Report.rpt"
'---------------------------