We wish to create a PDF report by generating the header, detail bands and footer at runtime in a class derived from DevExpress.XtraReports.UI.XtraReport, and then calling the ExportToPdf() method. We want to create the PDF report without sending the XtraReport - derived object to the ReportPrintTool for preview, rather just simply create the PDF file directly from a button in the app. This scheme seems to work on the developer's machine properly, but as we all know, software always works as planned in development and after deployment it is another story.
When we deploy the app, the content will not fit within the report paper boundaries and wraps which generates broken detail bands and additional pages.We have tried setting Landscape=true and various flavors of PaperKind (in the XtraReport Designer as well as in the derived class). While this does change the appearance of the PDF report, the content still will not fit, even when using a huge paperkind such as ledger (11X17).
Additionally, we tried sending the populated XtraReport - derived object to the DevExpress.XtraReports.UI.ReportPrintTool for preview and then choosing FitTo from the Scale menu which works fine and even fits the content to a Letter Landscape papersize if you choose. You can then Export To PDF from the menu and it generates a properly formatted PDF. How can I get these same results by going directly to the ExportToPdf() method in the derived class without using the previewer and fitting the content manually?