Nov 11, 2014 08:28 AM|Gabby1|LINK
I am trying to send the data from a single record to a Crstal Report that I created and then create a PDF from that report that I can Print. This is the error message that i get
Exception Details: CrystalDecisions.CrystalReports.Engine.DataSourceException: The data source object is invalid.
Can anyone help me this this?
This is the ActionResult that I created.
public ActionResult ExportReport(int? id)
InjuryIllness i = db.InjuryIllnesses.Find(id);
ReportDocument rd = new ReportDocument();
Response.Buffer = false;
Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
return File(stream, "application/pdf", "Report_InjuryIllness.pdf");
catch (Exception ex)