Help - Search - Members - Calendar
Full Version: How to Use Memo data
Fast Reports forum > Fast Reports Products > FastReport 4.0
Alagu
Dear FR Experts,
I am new to both Fast Report & Forum. I am creating a report there i wants to calculate a memo data from another memo, for example: Memo12 = Memo11*12
i tried like [<Memo11>*12] but it is not working. In previe its giving some random number like 432482.79874.
and also i tried [abs(<Memo11>)*12] thts also in same way.
Is there a way to calculate how i am expecting.

Please help me if you know this.

Thanks & Regards,
Alaguraja
HERBERTS
QUOTE(Alagu @ Jan 21 2010, 08:48 AM) *
Dear FR Experts,
I am new to both Fast Report & Forum. I am creating a report there i wants to calculate a memo data from another memo, for example: Memo12 = Memo11*12
i tried like [<Memo11>*12] but it is not working. In previe its giving some random number like 432482.79874.
and also i tried [abs(<Memo11>)*12] thts also in same way.
Is there a way to calculate how i am expecting.

Please help me if you know this.

Thanks & Regards,
Alaguraja


Hi,

You can try to use variables or you can also use database field. Apart from that, try to use this [Memo11.Value *12].
Hope it works.


Alagu
QUOTE(HERBERTS @ Jan 21 2010, 07:50 PM) *
QUOTE(Alagu @ Jan 21 2010, 08:48 AM) *
Dear FR Experts,
I am new to both Fast Report & Forum. I am creating a report there i wants to calculate a memo data from another memo, for example: Memo12 = Memo11*12
i tried like [<Memo11>*12] but it is not working. In previe its giving some random number like 432482.79874.
and also i tried [abs(<Memo11>)*12] thts also in same way.
Is there a way to calculate how i am expecting.

Please help me if you know this.

Thanks & Regards,
Alaguraja


Hi,

You can try to use variables or you can also use database field. Apart from that, try to use this [Memo11.Value *12].
Hope it works.


When i use [Memo11.Value *12], irrespective of Memo11 data it is displaying zero value.
Anu de Deus
Try a different approach, via scripts on the OnAfterData or OnAfterPrint events.
This example considers the value as an integer, fix it if it's a float of any sorts:

CODE
Memo11OnAfterData(sender);
var lParentBand : tFrxBand;
lMemo12: TFrxMemoView;
lMemo11Value: integer;
begin
    lParentBand := tFrxBand(sender.parent);
    lMemo12:= TFrxMemoView(lParentBand.FindObject('Memo12'));
    if lMemo12 <> nil then begin
    // force the variant to an integer first (will except if null or not an integer, do extra code here for those cases):
    lMemo11Value:= Value; //This 'Value' variable is part of the FR system, it's what the sender will receive as its value to display
// Put a showmessage of this result to debug its result; if not working, try lMemo11.value instead of text
    showmessage(inttostr(lMemo11Value));
    lMemo12.text := inttostr(lMemo11Value * 12); //
  end;
end;


It should work
gordk
also note that objects within a band are processed in creation order so you cannot set the value
of a previously processed object from one that comes after.
also the value property of a memo is that of the last variable processed within the memo
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.