Hi,
You can declare global variables in a formula in header section
global numbervar totalABC
global numbervar totalPQR
In details section you can add the follwing formula
global numbervar totalABC
global numbervar totalPQR
if {Product Group}="ABC" then
(
totalABC=totalABC+{Qty}
);
if {Product Group}="PQR" then
(
totalPQR=totalPQR+{Qty}
);
In footer section you can add the formula field
totalABC
totalPQR