List Index Out of Bounds

edited April 2005 in FastReport 3.0
I'm in the process of converting reports from FastReports 2.5 over to 3.0 and for a particular master-detail report, upon trying to preview the new format in 3.0 I get the following error:

List Index Out of Bounds(0)

The preview is actually printing the first master record and 4 out of the first 5 detail records for that master record. Any idea what this error msg could be trying to tell me?

Could this be because I have some pascalscript behind some of the memo boxes that is doing a comparison, and for some rows these fields are NULL? (i.e. in the example below, SUBMITTED_DATE might be NULL for some rows)

procedure Memo21OnBeforePrint(Sender: TfrxComponent);
begin
with Memo21, Engine do
begin
IF (<detail_DataSet."SUBMITTED_DATE"> >0) THEN
Memo21.Lines[0]:='<detail_DataSet."SUBMITTED_DATE">'
ELSE Memo21.Lines[0]:='NO';
end
end;

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:48PM
    Yes that is the problem
    syntax will have to be modified to suit fr3
    The converter does not actually parse every character of the block of code encountered it just places the string of code in a safe event.of the correct object.
    ie
    memo21.memo.lines[0]
    or you could actually use an iif expression on that line in the memo
    also check the settings of report component, if convert nulls is true
    then you need to check for 0 or empty string if field type is numeric or string
    if convert nulls is false then you can test for null.
    ;)

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.