0
votes

We have a requirement to load crystal report from embedded resource. In our application each module is a portable area and rpt files are embedded in the assembly. In the crystal report viewer we need to read the embedded rpt file and load the report document using the embedded rpt file.

Thanks in advance,

Anoop X.

1

1 Answers

0
votes

Something like this?

private void SetReportSource(String reportPath)
{
  object reportPathAsObject = (object)reportPath;
  ReportClientDocument reportClientDocument = new ReportClientDocumentClass();
  reportClientDocument.Open(ref reportPathAsObject, 0);
  crystalReportViewer.ReportSource = reportClientDocument;
}