I am counting unique values to provide totals at the bottom of a column like:
5 - Total 4 - For
0 - Against
0 - Abstain
1 - No Vote
? - Total ABST
To achieve this
Listpage: Before Process:
$_SESSION['mycount']=0;
$_SESSION['mycount1A']=0;
$_SESSION['mycount1B']=0;
$_SESSION['mycount1C']=0;
$_SESSION['mycount1D']=0;
$_SESSION['mycount1E']=0;
Listpage: Before Record Processed:
if ($data["FIELD1"]!='FOR' or 'AGAINST' OR 'ABSTAIN') $_SESSION['mycount']++;
if ($data["FIELD1"]=='AGAINST') $_SESSION['mycount1A']++;
if ($data["FIELD1"]=='ABSTAIN') $_SESSION['mycount1B']++;
if ($data["FIELD1"]=='FOR') $_SESSION['mycount1C']++;
if ($data["FIELD1"]=='') $_SESSION['mycount1D']++;
if ($data["FIELD1"]=='' OR 'ABSTAIN') $_SESSION['mycount1E']++;
Before display:
$xt->assign("FIELD1_total",$_SESSION['mycount']);
$xt->assign("FIELD1A_total",$_SESSION['mycount1A']);
$xt->assign("FIELD1B_total",$_SESSION['mycount1B']);
$xt->assign("FIELD1C_total",$_SESSION['mycount1C']);
$xt->assign("FIELD1D_total",$_SESSION['mycount1D']);
$xt->assign("FIELD1E_total",$_SESSION['mycount1E']);
All works perfectly except I am trying to get FIELD1E to display the total of FIELD1B plus FIELD1D but can't seem to figure it out. Total ABST should equal total of 1B and 1D.
Any guidance would be appreciated.