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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.