Good afternoon.
I am using CRXI SP2.
I am attempting to compute totals of only data elements that are not suppressed due to duplication. Here is my code below:
This is for my suppressed variable:
If{staff_tx_history.SERVICE_CODE}= "3510" or {staff_tx_history.SERVICE_CODE}="3570" and
{staff_tx_history.SERVICE_CODE}=previous({staff_tx_history.SERVICE_CODE}) and
{staff_tx_history.date_of_service}=previous({staff_tx_history.date_of_service}) and
{staff_tx_history.duration}=previous({staff_tx_history.duration}) and
{staff_tx_history.number_clients_in_group}=previous({staff_tx_history.number_clients_in_group}) then true
else false
This is the formula in the description section
whileprintingrecords;
global numbervar TTLNONSUP;
Global numbervar TTLREST;
if (
{@Previous Suppress}) = false then
TTLNONSUP:=sum(
{@Duration w/group}, {staff_tx_history.date_of_service}, "daily") else
TTLREST:= TTLREST
This is the formula in the Header to reset the global.
Whileprintingrecords;
Global numbervar TTLNONSUB:=0;
global numbervar TTLREST:=0;
This is my total section in the group footer:
Whileprintingrecords;
Global numbervar TTLNONSUP;
Global numbervar TTLREST;
TTLREST:= TTLREST + TTLNONSUP
This works fine when there are no suppressed fields but when there are suppressed fields, the total is comprised of the suppressed data and not the unsuppressed.
Could someone help?