error: list index out of bound (-1)

hi

i try to use pdf export. i put the component on my form. it also contain a button to make an export to pdf. i use this procedure

procedure TfRepInvoice.btnExportClick(Sender: TObject);
begin
frxReport1.Export(frxPDFExport1);
end;

when i hit the button why it's raise error: list index out of bound (-1)? and try to find it. finnaly i found it. the report must be view first so that i can export with hit the button. i want to ask how to export without viewing the report fisrt just hit the button and it will not show thar error again? please give advise.

thank's

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:55PM
    call prepare report first.
    read the programmers manual on working with the report component
    ;)

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.