Export to PDF throws a System.Overflow exception

Hi all,

I'm using VS2002, with VB.NET

I have a problem when trying to export a report to PDF. Let's see following code:

       ' 1. LoadReport

       Report.Load(RutaTemporal)

       ' Set connection string

       Report.Dictionary.Connections(0).ConnectionString = DAL.CnSQL

       DSCabecera = Report.GetDataSource("TblCabecera")

       DSDetalle = Report.GetDataSource("TblDetalle")

       DSCabecera.Enabled = True

       DSDetalle.Enabled = True

       Report.Prepare()

        Dim export As FastReport.Export.Pdf.PDFExport = New FastReport.Export.Pdf.PDFExport()

        Dim ResultFile As MemoryStream = New MemoryStream()

         Report.ShowPrepared() --> Just to check the report works; in the final version will be removed

         Report.Export(export, ResultFile) --> Crashes


The report is shown perfectly when "ShowPrepared". But Export sentence crashes with message "System.Overflow".


Can someone help me?


KR,

Venancio Lasquibar

Comments

  • Hi,

    I've found the reason. In one of the Datasets used in report, in one row there were some columns with NULL values, alghought that columns weren't shown in the report.

    I've modified the DataSet to prevent NULL values, and the error has dissapeared

    KR,

    Venancio Lasquibar

Leave a Comment