问题是这样的,我要将ListView1(report风格)中的各条记录取出来写进一个配置文件,
 for ItemsCount:=0 to ListView1.Items.Count-1 do
    begin
      Caption:=ListView1.Items[ItemsCount].Caption;
      for SubItemsCount:=0 to ListView1.Columns.Count-2 do
      begin
          aIniFile.WriteString(Caption,'',ListView1.Items[ItemsCount].SubItems[SubItemsCount]);
      end;
    end;
但是执行到aIniFile.WriteString就报错:
Project Project1.exe raised exception class EStringListError with message 'List index out of bounds(0)'这是什么错误?请高手指点一下吧