Hello,
I have a program where I create an UltraWebGridDocumentExporter programatically and it throws an "object reference not set to an instance of an object error" on export. I believe that there is a poperty that doesn't get filled in if the document exporter isn't created via an aspx page? Does anyone know what it may be.
Thanks, Example below
Dim dx1 As New Infragistics.WebUI.UltraWebGrid.DocumentExport.UltraWebGridDocumentExporterdx1.Format = Infragistics.Documents.Report.FileFormat.PDFdx1.DataExportMode = DocumentExport.DataExportMode.DataInGridOnlydx1.TargetPaperSize = Infragistics.Documents.Report.PageSizes.Letterdx1.TargetPaperOrientation = Infragistics.Documents.Report.PageOrientation.Landscapedx1.DownloadName = "ReportName"dx1.ExportMode = Infragistics.WebUI.UltraWebGrid.Exporter.ExportMode.Customdx1.AutoSizeRows = Infragistics.WebUI.Shared.DefaultableBoolean.Truedx1.EnableTheming = Falsedx1.EnableViewState = False
Dim myStream As New System.IO.MemoryStreamdx1.Export(MyGrid, myStream, False)
Hello
I got the same error when I created the UltraWebGridDocumentExporter dynamically but worked fine when I dragged the control from the toolbox. Before doing the export I added the control to the page using
Me.Controls.Add(dx1)
It worked fine after that. That should resolve your issue too.
The problem here is that I am not using it in a webpage. I was trying to create a dynamic PDF for use in a report that gets emailed every day. I am able to do it with the Excel exporter but not the Document exporter.
Thanks