property Variables

edited 12:07AM 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 12:07AM
    IMHO showreport should only be called once only it prepares the entire report.
  • edited 12:07AM
    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 12:07AM
    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

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.