New Blog Post: RESTful Reporting

Range check error

edited January 2011 in End User

I've searched the newsgroups and found several references to this error
that seem to indicate it's been fixed since RB7, however I'm using
Report Builder Enterprise 12.03, Delphi 2009, and getting this when
printing certain reports. Having traced the code, the error is occurring
in the unit ppPDFFontWidths, in the function CreateCIDFontWidths when
the value of lsText is equal to the empty string (''). This causes
liCount to be -1 which in turn means that SetLength(lWidthArray,
liCount) fails with "Range check error" because an array cannot be set
to size -1. This is with Unicode text only.

For the moment I've put a simple check into the top of the
CreateCIDFontWidths() function:

if SysUtils.StringReplace(CharList.Text, #13#10, '', [rfReplaceAll]) =
'' then exit;

to skip past the part causing the problem, as it's preventing some of
our clients generating important reports.

Is this something to do with our data, or is this something that's been
re-introduced since Report Builder started coping with Unicode text?

Thanks for any light you can shed on this,

Steve Branley


This discussion has been closed.