formatting expression

I have tried to show an expression in a report, but although I have tried about 25 different ways of presenting this, it gives back an ' invalid variant operation' error.

can anybody tell me how to show such information from 2 diffetent queries?


query 1 : a certain numeric value * sum-expression

[<Query_SCHEMA."FF_COMMISSIE_KLANT"> * [[SUM(<Query_REGELS."FF_VERKOOP_PRIJS">,DetailData1)] /100 ] ]

Comments

  • edited 8:45AM
    Try to make your calculation in a script of OnBeforePrint event for the Memo or for the Band. Save the result of this calculation in a global variable declared at the top of script (I mean NOT inside body of any other event). And finally use your variable in a Memo.

    var LResult :real;

    procedure MasterBand1OnBeforePrint( Sender ...)
    begin
    LResult := (your_calculations_goes_here);
    end;


    TfrxMemo content: [LResult]


    If you get an error again then try to do the calculation in a few steps.
    Make sure that you use SUM function in a place it can be used (any footer band).

    Mick
  • Anu de DeusAnu de Deus Hampshire, UK
    edited March 2011
    AFAIK, you cannot have nested expression delimiters [ ], i.e. the brackets inside other brackets.
    I think [A]**[C] would be fine, but [A*[B*C]] wouldn't.
    Do what Mick.pl suggested, your solution is in the scripts.

Leave a Comment