[SOLVED] SUM() in Code does not work?! But Why?
Hi,
i try to make a sum of a value in the Page footer in the onbeforeprint Options and i always get a conversion error from NULL to DOUBLE... well in my Memo this sum works but i need to save this sum in a Var because i need to use it on Top of the next Page.
I tried to bypass this problem by raising the Var in the Masterband, but for some reason on the next Page the first Masterband data row is added aswell to this sum which ist not wanted there... id appreciate to know why this happens...
Anyway. What should i do to fix my SUM function?
my Code for the needed Var:
The Code for the page Footer:
best regards
EDIT:
Solved by using the Group Footer instead.
i try to make a sum of a value in the Page footer in the onbeforeprint Options and i always get a conversion error from NULL to DOUBLE... well in my Memo this sum works but i need to save this sum in a Var because i need to use it on Top of the next Page.
I tried to bypass this problem by raising the Var in the Masterband, but for some reason on the next Page the first Masterband data row is added aswell to this sum which ist not wanted there... id appreciate to know why this happens...
Anyway. What should i do to fix my SUM function?
my Code for the needed Var:
Var
uebertragheader: extended;
The Code for the page Footer:
procedure PageFooter1OnBeforePrint(Sender: TfrxComponent);
begin
uebertragheader:=uebertragheader+SUM(<frxDBDataset1."GESAMTPREIS">,MasterData1,3);
         Â
end;
best regards
EDIT:
Solved by using the Group Footer instead.