Yes, it does look at all the data.
if you want to add amounts that fall in the last month alone, then modify the code to:
whileprintingrecords;
numbervar cnt;
if {date_field} IN LastFullMonth then
(
If {#Visit Count Total} <= 1 then
(
cnt := cnt + 100;
$100;
)
else
(
cnt := cnt + 60;
$60;
)
)
Moreover, if the summed up amount is being shown in the Group Footer, then I'm assuming the variables should also reset on each new group so that the numbers don't keep adding up right till the end. For that, create another formula to reset the variable and place it on the Group Header:
whileprintingrecords;
numbervar cnt := 0;
-Abhilash