开发者

Loading Crystal Report from embedded resource

I have an ASP.NET website and a referenced class library project. In t开发者_运维知识库his class library I have a Crystal Report set as embedded resource. I want to load the report dynamically into a CrystalReportViewer.

How do I do it?


I figured out how to solve that problem. When a Crystal Report is added to a Class Library project, it creates a corresponding class, which inherits from ReportClass. An instance of this class can be used as ReportSource of the viewer.

Example:

var report = new CrystalReport1();
report.SetDataSource(datasource);
CrystalReportViewer1.ReportSource = report;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜