using CR11 & SQL2000:
I have a formula that counts errors in the db in a particular way:
whileprintingrecords;
numbervar A;
numbervar B;
// Audit error count for multiple errors
if {AuditTicketEntry.AuditErrorId} = [22] then
A := Count ({AuditTicketEntry.AuditErrorId},{AuditError.Description})
else
if {AuditTicketEntry.AuditErrorId} = [11] then
A := Count ({AuditTicketEntry.AuditErrorId},{AuditError.Description})
else
// Audit error count for one error
IF {AuditTicketEntry.AuditErrorId} = [5] and Count ({AuditTicketEntry.AuditErrorId},{AuditError.Description}) >= 1
then
B := 1
else
IF {AuditTicketEntry.AuditErrorId} = [9] and Count ({AuditTicketEntry.AuditErrorId},{AuditError.Description}) >= 1
then
B := 1
And then in my group footer, I have the following to get the sum:
whileprintingrecords;
numbervar A;
numbervar B;
B + A
But this is not working correctly, I'm trying to get the SUM of all the A's and all the B's in the footer, and it's only giving me what looks like the sum of the first 2. Any help is appreciated, thanks!
I have a formula that counts errors in the db in a particular way:
whileprintingrecords;
numbervar A;
numbervar B;
// Audit error count for multiple errors
if {AuditTicketEntry.AuditErrorId} = [22] then
A := Count ({AuditTicketEntry.AuditErrorId},{AuditError.Description})
else
if {AuditTicketEntry.AuditErrorId} = [11] then
A := Count ({AuditTicketEntry.AuditErrorId},{AuditError.Description})
else
// Audit error count for one error
IF {AuditTicketEntry.AuditErrorId} = [5] and Count ({AuditTicketEntry.AuditErrorId},{AuditError.Description}) >= 1
then
B := 1
else
IF {AuditTicketEntry.AuditErrorId} = [9] and Count ({AuditTicketEntry.AuditErrorId},{AuditError.Description}) >= 1
then
B := 1
And then in my group footer, I have the following to get the sum:
whileprintingrecords;
numbervar A;
numbervar B;
B + A
But this is not working correctly, I'm trying to get the SUM of all the A's and all the B's in the footer, and it's only giving me what looks like the sum of the first 2. Any help is appreciated, thanks!