I am trying to generate pdf document with page oriention set to landscape but it not having any effect
Dim PDFSection As Infragistics.Documents.Report.Section.ISection = Document.AddSection()
PDFSection.PageOrientation = Infragistics.Documents.Report.PageOrientation.Landscape
' other code goes here
Document.Publish(FilePath,FileFormat.PDF).
Is ther any code sample that you can point me to?
Regards
Devinder Singh
Devinder Singh,You can manually create a 'put-it-here' report for what is in essence a grid report.Or, you could perhaps load a hidden (or visible) grid and use the DocumentExporter.I would choose the latter. I think the question then would be – Do you want to display the field names or column headers. Maybe you can set a property on the grid to hide the headers. I am certain that is possible.
Then, I would use the DocumentExporter with the grid a section created before the call to display the data.
An example of the above can be found in: https://es.infragistics.com/community/forums/f/ultimate-ui-for-asp-net/2346/add-title-to-pdf
I have a DataTable and i want to diaplay it in PDF document without the use of any other component. I have a report which consists of a single Section and i want to display all its contents in landscap just in case the number of columns in the DatTable are too much for the document to display as portait.
Kind regards
Singh,
I am just learning the use and power of the DocumentExporter, but I think the problem you are having is because you are attempting to make a specific report section orient to Landscape. Is it you intent to print part of the report in Portrait and switch part of it to Landscape.
If not, then the stuff provided in their examples could help. For example:
// configure exporterRightContent_DocumentExporter.Format = FileFormat.PDF;RightContent_DocumentExporter.DownloadName = "roster.pdf";RightContent_DocumentExporter.TargetPaperOrientation = PageOrientation.Landscape; // Create a new report after setting DocumentExporter defaultsReport report = new Report();report.Info.Title = this.txtGridHdr.Text;report.Info.Author = p.Identity.Name.ToString();report.Info.Subject = "Confidential Report printed by " + p.Identity.Name.ToString();
// configure exporterRightContent_DocumentExporter.Format = FileFormat.PDF;RightContent_DocumentExporter.DownloadName = "roster.pdf";RightContent_DocumentExporter.TargetPaperOrientation = PageOrientation.Landscape;
// Create a new report after setting DocumentExporter defaultsReport report = new Report();report.Info.Title = this.txtGridHdr.Text;report.Info.Author = p.Identity.Name.ToString();report.Info.Subject = "Confidential Report printed by " + p.Identity.Name.ToString();
That would orient the entire report.