| Javier Pérez 2005-05-14, 4:11 pm |
| Hi everybody,
I need insert 2 subreports in a master report.
the master report name is ReportPlanning_ and the subreports are: Report PlanningaSalidas_ and Report PlanningaEntradas_
At the moment with only one subreport i'm doing this:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CrystalDecisions.CrystalReports.Engine.SubreportObject mySubReportSalida;
CrystalDecisions.CrystalReports.Engine.ReportDocument mySubReportSalidaDoc = new ReportDocument();
foreach( CrystalDecisions.CrystalReports.Engine.Section mySection in objReportPlanning.ReportDefinition.Sections)
{
foreach( CrystalDecisions.CrystalReports.Engine.ReportObject myReportObjectSalida in mySection.ReportObjects)
{
if (myReportObjectSalida.Kind == CrystalDecisions.Shared.ReportObjectKind.SubreportObject)
{
mySubReportSalida = (CrystalDecisions.CrystalReports.Engine.SubreportObject) myReportObjectSalida;
mySubReportSalidaDoc = mySubReportSalida.OpenSubreport(mySubReportSalida.SubreportName);
//Common.Crystal.LogonToDatabase(mySubReportSalidaDoc.Database.Tables, Usuario, Password);
//Datos.Empresa objEmpresa_ = new Eprila.Datos.Empresa();
mySubReportSalidaDoc.SetDataSource(objAlquilerVehiculo.GetPlanningSalida(fechaDesde).Tables[0]);
//How can i asign diferentes datasource for PlanningaSalidas_ and PlanningaEntradas_???
}
}
}
taning de datasource from a dataset. The problem is that now i need two diferente datasource for two reports.
Anybody know who can i do it???
Thanks for all!
|