on the fastrepor 3.20 divide process
Hi All,
i want divide process on the fastreport 3,20. I wrote code as follows.Iam getting error message when I run the code."incompatible type:'Integer';Extended'"
How can i run this code ?
Regards.
i want divide process on the fastreport 3,20. I wrote code as follows.Iam getting error message when I run the code."incompatible type:'Integer';Extended'"
How can i run this code ?
Regards.
procedure Memo23OnBeforePrint(Sender: TfrxComponent);
var
a,b:integer;
begin
  b:=StrToInt(memo10.value)/2;
memo23.text:=IntToStr(b)
end;
Comments
just changed integer by extended
since dividing the value can result in a non integer value.
then you will also need to modify this line if you only want an iteger result
memo23.text:=IntToStr(b)
to
memo23.text:=IntToStr(int(b))
Mick
Could you please help another a issues. I am not getting decimal result on the calculation process when i do divide.
For example My result: 17 porocess :17/3=5,66
on the Above process was 17/3=5 I dont want this result. I want result 5,66.
Could you please help to me this issues...
Kind regards.
Test
ShowMessage( 17/3) and ShowMessage( Int( 17/3))
to see how FR makes this calculatiuon.
And make more tests like below:
Mick
thank you for you answer
my code is like below
I can not get decimal result on the code...
Iam waiting your help...
regards...
Have a look at small example and make some tests: