Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
305
Object reference not set... on DocumentExporter
posted
Hi, I used the following to export to an excel spreadsheet and it works fine: Me.UltraWebGridExcelExporter1.Export(Me.UltraWebGrid2) I then created another button and, after adding the UltraWebGridDocument Exporter [version 8.3 clr2] to the foot of the web page, I created the following code in the button_click: [VB.Net] Me.UltraWebGridDocumentExporter1.Format = FileFormat.PDF Me.UltraWebGridDocumentExporter1.TargetPaperOrientation = PageOrientation.Portrait Me.UltraWebGridDocumentExporter1.TargetPaperSize = Infragistics.Documents.Report.PageSizes.A4 Me.UltraWebGridDocumentExporter1.DownloadName = "Report.pdf" Me.UltraWebGridDocumentExporter1.ExportMode = Infragistics.WebUI.UltraWebGrid.Exporter.ExportMode.Download >> Me.UltraWebGridDocumentExporter1.Export(Me.UltraWebGrid2) It all works as expected until I get to the indicated line, then it errors out with an 'Object reference...' The references are all good and the UltraWebGrid2 is definitely all there ..... what have I missed? This should work out of the box, shouldn't it? D.
Parents
No Data
Reply
  • 305
    Verified Answer
    Offline posted

    After an excellent exchange of emails with Infragistics support, we finally discovered that the error is that if you set the grid visibilty off, the control fails. no doubt this will be fixed in the next hotfix/release.

     

Children
No Data