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
380
Error with UltraGridDocumentExporter and threading
posted

Hi,

UltraGridDocumentExporter1.Export(Me.ugvDataGrid, MyPath,
DocumentExport.GridExportFileFormat.PDF) don't work when i put this line in
a second thread .... why ?

The thread procédure:
Private Sub ThreadProcedure()
        Try
              _ugePDF.Export(_Grid, _Chemin,
DocumentExport.GridExportFileFormat.PDF)

        Finally
          
        End Try

    End Sub

To launch the thread:

    Public Sub Exporter()
        _ExportThread = New Thread(New ThreadStart(AddressOf
ThreadProcedure))
        _ExportThread.IsBackground = True
        _ExportThread.Start()
    End Sub

It's working with ExcelExporter ...

Perhaps that's wrong?:

Public WithEvents _ugePDF As UltraGridDocumentExporter

Public Sub New(ByVal uGrid As UltraGrid)

_ugePDF = New UltraGridDocumentExporter
_Grid = uGrid
_ugePDF.TargetPaperOrientation = Infragistics.Documents.Report.PageOrientation.Landscape
_ugePDF.TargetPaperSize = Infragistics.Documents.Report.PageSizes.Letter
_ugePDF.ImageCompressorType = ImageCompressorType.Flate
_ugePDF.AutoSize = AutoSize.None
_ugePDF.UseFileBuffer =
False

End Sub

Parents Reply Children