i'm working in a mvc4 web application and i'm trying to export a report "Crystal Report" to a pdf file. My problem is when i want to export more than one report into the same pdf file. Do somebody have any idea to do that? I can export one report to a pdf file with the following code:
public ActionResult ReporteListadoUnidades(int idConsorcio, int? idCentroCosto)
{
try
{
DataSet datos = new DataSet();
LoadDatos(ref datos);
....
ReportDocument rptCV = new ReportDocument();
rptCV.Load(Server.MapPath("~/Reports/repUnidades.rpt"));
rptCV.SetDataSource(datos);
Stream stream = rptCV.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
return File(stream, "application/pdf");
}
catch (Exception)
{
throw;
}
}
And the result is the following: (Image not available because i don't have reputation to post it)
As you can see, all of this run well, but i would like to export different reports together in the same pdf file.