Posted 18 October 2020, 10:18 pm EST
Hello,
You can create two report with different orientation and export into RDF.
You can use the RDFRenderingExtension to convert your RDL report to RDF. Please refer to the following lines of code:
GrapeCity.ActiveReports.PageReport pr = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo("../../PageReport1.rdlx"));
System.IO.DirectoryInfo outputDirectory = new System.IO.DirectoryInfo(@"C:\MyRDF");
outputDirectory.Create();
GrapeCity.ActiveReports.Export.Rdf.RdfRenderingExtension re = new GrapeCity.ActiveReports.Export.Rdf.RdfRenderingExtension();
GrapeCity.ActiveReports.Export.Rdf.Settings s = new GrapeCity.ActiveReports.Export.Rdf.Settings();
GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider fs= new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(outputDirectory.Name));
pr.Document.Render(re,fs,s);
After that, You can load the generated RDF file into the SectionDocument class using the “Load” method(https://help.grapecity.com/activereports/webhelp/AR13/webframe.html#GrapeCity.ActiveReports.Document~GrapeCity.ActiveReports.Document.SectionDocument~Load.html).
After that, you can use the following lines of code to merge the report:
for (i=0; i < SectionDocument1.Pages.Count; i++)
{
SectionDocument2.Pages.Insert(i,SectionDocument1.Pages[i]);
}
After that you can use the following line of code to export the SectionDocument2 into PDF:
https://www.grapecity.com/activereports/docs/v14/online/exporting-reports.html
Hope it helps.
Thanks,
Mohit