Hi,
Is it possible to export multiple grids to PDF? If yes, could anybody give me sample of the code? I need to export 3 to 6 grids to the pdf and add titles for each of them in the file.
Thanks,
Himgauri
In order for you to export multiple grids to the same PDF, you will need an UltraWebGridDocumentExporter for each grid you would like to export. Create a report object and pass that object as your second parameter in the export call for each document exporter. You will also need to set all but the first document exporter's export mode to Custom. Wow that's a mouthful, let me give you some sample code:
UltraWebGridDocumentExporter1.DownloadName = "report.pdf";
UltraWebGridDocumentExporter2.Format = FileFormat.PDF;
UltraWebGridDocumentExporter2.TargetPaperOrientation = PageOrientation.Landscape;
Report oReport = new Report();
// trigger export
UltraWebGridDocumentExporter1.Export(UltraWebGrid1, oReport);
UltraWebGridDocumentExporter2.Export(UltraWebGrid2, oReport);
Now the only issue I have run into with this code is that each grid is added as it's own page to the PDF document. I'm sure that works great in most cases, but in my case I'd like it to place both grids on one page.
Hope this helps!
Tyler
Hai
I used the code. I have a doubt. How can we place the grids in a single page? My report shows grids in individual pages since there is space for both grid in a same page.
Thanks in advance.