Need help for problem

The application i wrote works fine at my own computer. It uses a few reports which are created with fast-report 2.51 and called within my program.

Like i said, on my computers, everything is working fine.

But i installed it on a client of mine and while printing any report from within my application an error occured :

*** List index 0 out of bounds ***

After this message nothing is printed.

How can i avoid this error ?
I think it has anything to do with the printer which has to print the report.

Please help.

marco

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:55PM
    Hi Marco
    look at the reports you have designed
    under report options make sure you do not have select when loaded checked for a particular printer that is not available to the user. Also make sure you uncommented the printer reset define in the fr_printers.pas file and recompile fr library.
    regards ;)
  • edited 5:55PM
    Hi,

    it still does not work.
    I'm using this code :

    frReport1.LoadFromFile('order.frf');
    with frReport1.Dictionary do
    begin
    Variables := StrToInt(Edit1.Text);;
    Variables := StrToInt(Edit2.Text);
    Variables := StrToInt(Edit3.Text);
    Variables := StrToInt(Edit4.Text);
    end;
    with frReport1 do
    begin
    DefaultCopies := 1;
    if Edit5.Text = '0' then
    DefaultCopies := StrToInt(DM1.Relaties.FieldByName('Ordersets').AsString)
    else
    DefaultCopies := StrToInt(Edit5.Text);
    end;
    frReport1.PrepareReport;
    if example then
    frReport1.ShowReport
    else
    frReport1.PrintPreparedReportDlg;

    Printing from within the 'ShowReport', everything goes well.
    But printing direct (frReport1.PrintPreparedReportDlg) it gives the same error :

    List index out of bounds(0)

    It getting frustrating now.
    How can i solve this ???

    THANX !!



    <QUOTE 1>
    The application i wrote works fine at my own computer. It uses a few reports which are created with fast-report 2.51 and called within my program.

    Like i said, on my computers, everything is working fine.

    But i installed it on a client of mine and while printing any report from within my application an error occured :

    *** List index 0 out of bounds ***

    After this message nothing is printed.

    How can i avoid this error ?
    I think it has anything to do with the printer which has to print the report.

    Please help.

    marco

    <QUOTE 2>
    Hi Marco
    look at the reports you have designed
    under report options make sure you do not have select when loaded checked for a particular printer that is not available to the user. Also make sure you uncommented the printer reset define in the fr_printers.pas file and recompile fr library.
    regards

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.