Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Access violation when export richtext to excel

I am trying the latest report builder trial version on Tokyo 10.2.3. When I export a report contain rich text to excel, I encounter access violation. Here is the stack trace:
:1533f13b TppStringTableItem.Clone + $37
:1533ee12 TppStringTable.Add + $2E
:1535ce13 TppXLSRendererCell.AddCell + $3C7
:1535c912 TppXLSRendererRichTextLine.RenderToXLS + $1A6
:15360a4f TppXLSReportRowBuilder.RenderDrawCommand + $4F
:153605dd TppXLSReportRowBuilder.BuildRow + $51
:1535ffc1 TppXLSReportDevice.SavePageToFile + $4D
:153997c1 TppPublisher.ReceivePage + $1D
:15399933 TppPublisher.DoOnPageRequest + $5B
:1538b4cf TppProducer.PublishReport + $B
:152915fc TppReport.PrintToDevices + $A0
:1538c54f TppProducer.CancelDialogShowModalEvent + $23
:15394f78 TppCustomCancelDialog.TimerEvent + $28

Comments

  • This is the TppReport component that cause problem when trying to export to xls. It can be replay in RAD Studio IDE design time without runtime:
    object ppReport1: TppReport
      NoDataBehaviors = [ndBlankReport]
      PassSetting = psTwoPass
      PrinterSetup.BinName = 'Default'
      PrinterSetup.DocumentName = 'Report'
      PrinterSetup.Duplex = dpNone
      PrinterSetup.PaperName = 'Letter'
      PrinterSetup.PrinterName = 'Default'
      PrinterSetup.SaveDeviceSettings = False
      PrinterSetup.mmMarginBottom = 6350
      PrinterSetup.mmMarginLeft = 12700
      PrinterSetup.mmMarginRight = 6350
      PrinterSetup.mmMarginTop = 6350
      PrinterSetup.mmPaperHeight = 279401
      PrinterSetup.mmPaperWidth = 215900
      PrinterSetup.PaperSize = 1
      Template.FileName = 'R:\test.rtm'
      AllowPrintToArchive = True
      AllowPrintToFile = True
      ArchiveFileName = '($MyDocuments)\ReportArchive.raf'
      DeviceType = 'Printer'
      DefaultFileDeviceType = 'PDF'
      EmailSettings.ReportFormat = 'PDF'
      LanguageID = 'Default'
      OpenFile = False
      OutlineSettings.CreateNode = True
      OutlineSettings.CreatePageNodes = True
      OutlineSettings.Enabled = False
      OutlineSettings.Visible = False
      ThumbnailSettings.Enabled = True
      ThumbnailSettings.Visible = True
      ThumbnailSettings.DeadSpace = 30
      ThumbnailSettings.PageHighlight.Width = 3
      PDFSettings.EmbedFontOptions = [efUseSubset]
      PDFSettings.EncryptSettings.AllowCopy = True
      PDFSettings.EncryptSettings.AllowInteract = True
      PDFSettings.EncryptSettings.AllowModify = True
      PDFSettings.EncryptSettings.AllowPrint = True
      PDFSettings.EncryptSettings.AllowExtract = True
      PDFSettings.EncryptSettings.AllowAssemble = True
      PDFSettings.EncryptSettings.AllowQualityPrint = True
      PDFSettings.EncryptSettings.Enabled = False
      PDFSettings.EncryptSettings.KeyLength = kl40Bit
      PDFSettings.EncryptSettings.EncryptionType = etRC4
      PDFSettings.FontEncoding = feAnsi
      PDFSettings.ImageCompressionLevel = 25
      PDFSettings.PDFAFormat = pafNone
      PreviewFormSettings.PageBorder.mmPadding = 0
      PreviewFormSettings.WindowState = wsMaximized
      PreviewFormSettings.ZoomSetting = zsPageWidth
      RTFSettings.DefaultFont.Charset = DEFAULT_CHARSET
      RTFSettings.DefaultFont.Color = clWindowText
      RTFSettings.DefaultFont.Height = -13
      RTFSettings.DefaultFont.Name = 'Arial'
      RTFSettings.DefaultFont.Style = []
      TextFileName = '($MyDocuments)\Report.pdf'
      TextSearchSettings.DefaultString = '<FindText>'
      TextSearchSettings.Enabled = True
      XLSSettings.AppName = 'ReportBuilder'
      XLSSettings.Author = 'ReportBuilder'
      XLSSettings.ExportComponents = [ecText, ecLine, ecImage, ecRichText, ecBarCode, ecOther]
      XLSSettings.Subject = 'Report'
      XLSSettings.Title = 'Report'
      XLSSettings.WorksheetName = 'Report'
      Left = 176
      Top = 128
      Version = '19.01'
      mmColumnWidth = 0
      object ppHeaderBand2: TppHeaderBand
        Background.Brush.Style = bsClear
        Border.mmPadding = 0
        PrintHeight = phDynamic
        mmBottomOffset = 0
        mmHeight = 43392
        mmPrintPosition = 0
        object ppSubReport1: TppSubReport
          DesignLayer = ppDesignLayer1
          UserName = 'SubReport1'
          ExpandAll = False
          NewPrintJob = False
          OutlineSettings.CreateNode = True
          TraverseAllData = False
          mmHeight = 5027
          mmLeft = 0
          mmTop = 11113
          mmWidth = 196850
          BandType = 0
          LayerName = Foreground
          mmBottomOffset = 0
          mmOverFlowOffset = 0
          mmStopPosition = 0
          mmMinHeight = 0
          object ppChildReport1: TppChildReport
            AutoStop = False
            PrinterSetup.BinName = 'Default'
            PrinterSetup.DocumentName = 'Report'
            PrinterSetup.Duplex = dpNone
            PrinterSetup.PaperName = 'Letter'
            PrinterSetup.PrinterName = 'Default'
            PrinterSetup.SaveDeviceSettings = False
            PrinterSetup.mmMarginBottom = 6350
            PrinterSetup.mmMarginLeft = 12700
            PrinterSetup.mmMarginRight = 6350
            PrinterSetup.mmMarginTop = 6350
            PrinterSetup.mmPaperHeight = 279401
            PrinterSetup.mmPaperWidth = 215900
            PrinterSetup.PaperSize = 1
            Version = '19.01'
            mmColumnWidth = 0
            object ppDetailBand2: TppDetailBand
              Background1.Brush.Style = bsClear
              Background2.Brush.Style = bsClear
              Border.mmPadding = 0
              mmBottomOffset = 0
              mmHeight = 14023
              mmPrintPosition = 0
              object ppRichText1: TppRichText
                DesignLayer = ppDesignLayer2
                UserName = 'RichText1'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clBlack
                Font.Name = 'Tahoma'
                Font.Size = 8
                Font.Style = []
                Border.mmPadding = 0
                Caption = 'RichText1'
                ExportRTFAsBitmap = False
                MailMerge = True
                RichText = 
                  '{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcha' +
                  'rset0 Tahoma;}{\f1\fnil Tahoma;}}'#13#10'\viewkind4\uc1\pard\qc\b\f0\f' +
                  's28 A\fs16 b\f1\fs28\par'#13#10'}'#13#10#0
                RemoveEmptyLines = False
                Transparent = True
                mmHeight = 6350
                mmLeft = 21167
                mmTop = 3969
                mmWidth = 159279
                BandType = 4
                LayerName = Foreground1
                mmBottomOffset = 0
                mmOverFlowOffset = 0
                mmStopPosition = 0
                mmMinHeight = 0
                mmLeftMargin = 794
              end
            end
            object ppDesignLayers2: TppDesignLayers
              object ppDesignLayer2: TppDesignLayer
                UserName = 'Foreground1'
                LayerType = ltBanded
                Index = 0
              end
            end
          end
        end
      end
      object ppDetailBand3: TppDetailBand
        Background1.Brush.Style = bsClear
        Background2.Brush.Style = bsClear
        Border.mmPadding = 0
        PrintHeight = phDynamic
        mmBottomOffset = 0
        mmHeight = 24606
        mmPrintPosition = 0
      end
      object ppFooterBand2: TppFooterBand
        Background.Brush.Style = bsClear
        Border.mmPadding = 0
        mmBottomOffset = 0
        mmHeight = 6350
        mmPrintPosition = 0
      end
      object ppDesignLayers1: TppDesignLayers
        object ppDesignLayer1: TppDesignLayer
          UserName = 'Foreground'
          LayerType = ltBanded
          Index = 0
        end
      end
      object ppParameterList1: TppParameterList
      end
    end
    
  • Hi Cheeyang,

    I created a patch for RB 19.01 to resolve the issue. Users with a current RB 19.01 license can email support@ and request the patch. Please include license serial number, company name, contact name, email.





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.