Download Crystal report from embedded resource

I have an ASP.NET website and a related class library project. In this class library, I have a Crystal Report as an embedded resource. I want to dynamically load a report in CrystalReportViewer.

How can I do it?

+4
source share
1 answer

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

Example:

var report = new CrystalReport1(); report.SetDataSource(datasource); CrystalReportViewer1.ReportSource = report; 
+7
source

Source: https://habr.com/ru/post/1345731/


All Articles