Crystal 9
ODBC
My problem is twofold:
First, I am trying to count heads of household that are handicapped/disabled and heads of household that are not handicapped/disabled. "Y" represents handicapped/disabled and "H" represents head of household. My running counts evaluate the first statement but not the second. So, those heads of household that are not handicapped/disabled are not being counted. My evaluation formula is as follows:
WhilePrintingRecords;
NumberVar HDhead;
NumberVar HDother;
if (OnFirstRecord or {VW_DEMOGRAPHICS.TENANTID} <> Previous ({VW_DEMOGRAPHICS.TENANTID}) and
{VW_DEMOGRAPHICS.DISABLED} = "Y" and
{VW_DEMOGRAPHICS.RELATION} = "H") then
HDhead := HDhead + 1
else
if (OnFirstRecord or {VW_DEMOGRAPHICS.TENANTID} <> Previous ({VW_DEMOGRAPHICS.TENANTID}) and
{VW_DEMOGRAPHICS.DISABLED} = "Y" and
{VW_DEMOGRAPHICS.RELATION} <> "H") then
HDother := HDother + 1
Second, this formula counts the first record even if it doesn't fit the rest of the criteria in the formula. If I leave OnFirstRecord out, the first records running count field is blank. I am using the OnFirstRecord and table.field <> Previous table.field to avoid counting the same head of household twice (there are multiple records for the same head of household).
Any assistance is appreciated. Thanks!
ODBC
My problem is twofold:
First, I am trying to count heads of household that are handicapped/disabled and heads of household that are not handicapped/disabled. "Y" represents handicapped/disabled and "H" represents head of household. My running counts evaluate the first statement but not the second. So, those heads of household that are not handicapped/disabled are not being counted. My evaluation formula is as follows:
WhilePrintingRecords;
NumberVar HDhead;
NumberVar HDother;
if (OnFirstRecord or {VW_DEMOGRAPHICS.TENANTID} <> Previous ({VW_DEMOGRAPHICS.TENANTID}) and
{VW_DEMOGRAPHICS.DISABLED} = "Y" and
{VW_DEMOGRAPHICS.RELATION} = "H") then
HDhead := HDhead + 1
else
if (OnFirstRecord or {VW_DEMOGRAPHICS.TENANTID} <> Previous ({VW_DEMOGRAPHICS.TENANTID}) and
{VW_DEMOGRAPHICS.DISABLED} = "Y" and
{VW_DEMOGRAPHICS.RELATION} <> "H") then
HDother := HDother + 1
Second, this formula counts the first record even if it doesn't fit the rest of the criteria in the formula. If I leave OnFirstRecord out, the first records running count field is blank. I am using the OnFirstRecord and table.field <> Previous table.field to avoid counting the same head of household twice (there are multiple records for the same head of household).
Any assistance is appreciated. Thanks!