Hello tawfiq, I am not sure what you mean by the header? Page header or master header or detail header?
hello kito and thank you for the feedback ,
so for now i need it in the group header , but i asked for it in any header cuz i thoughts its the same thing , the total always gave me "0" in any header but it gave me the real total in any footer .
I will gladly try to give you a hint according to my slight experience, but I recommended opening a new topic
to get more professional suggestions and answers also to make easy if someone else had the same problem can find easily and separately the solution .
well in similar situations if I can get the Total before loading the report, I will use a variable x (integer or string )
and a query(Q) to get the total ( select Sum () where ..... and ....) and assign the result with the variable
x := Q.sum.asstring ; ( it's not a correct code just an exemple )
open the report designer and create a variable and don't give it any value let name it Total
https://ibb.co/PWGrpzShttps://ibb.co/6gfQ2mVplace the variable (total) [Total] in the tagged band save and exit the report_designer
finnally in the frReport GetValue evants :
if ParName= 'Total' then ParValue:=x ;
and that's it , if you need to update the Total each time just close then open the Query