property Variables

edited 1:52AM in FastReport 4.0
here is the example

begin
frxReport.Variables := 12;
frxReport.Variables := 12.7;
repeat
frxReport.ShowReport;
until MessageDlg ('Report is printed OK ?', mtConfirmation, [mbYes, mbNo], 0) = mrYes;
end;

and when I choose button NO from the dialog then the DELPHI raises an exception......
because all values from property Variables have already ' around, what I mean

first time
frxReport.Variables = 12;

second time
frxReport.Variables = '12';

P.S. I've tried version 4.5

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:52AM
    IMHO showreport should only be called once only it prepares the entire report.
  • edited 1:52AM
    gordk wrote: »
    IMHO showreport should only be called once only it prepares the entire report.

    I've called 2 or more times because I need the report to be printed and that depends 100 % of the operator

    anyway I found a solution.... one or two of my variables are a float numbers but sometime they have no fractal part .... they are single prices
    when use
    Variables := Format ('%.2f', [test1])
    then the second/third call of ShowReport and combination of '24.00' gives to the engine again float number even it is in '....'

    perhaps I should try this
    ShowPreparedReport;
    repeat
    ShowPreparedReport;
    until ........
  • edited 1:52AM
    yesss..... "how smart I am" [img]style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> abosolute idiot PrepareReport; repeat ShowPreparedReport; until ...... it's 100 % my solution anyway the topic question is still interesting ?[/img]

Leave a Comment