Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URGENT problem with Totals

Status
Not open for further replies.

ericb123

MIS
Mar 3, 2008
55
US
Any help is greatly appreciated. I have a table with some fields: IsExpedited(boolean), ErrorCode22(number)

When I put them in the details section, they look like this:

IsExpedited ErrorCode22
TRUE 1

TRUE 1
TRUE 0


Then in my footer, I have a formula:

IF ({Command.IsExpedited}) = TRUE THEN
SUM({Command.ErrorCode22,{Command.UserName})

This should give me a total of 2, but it gives me nothing. When I add "if isNull({Command.IsExpedited}) OR ({Command.IsExpedited}) = TRUE then I get the total of 2.

But the field is clearly "TRUE". The db is SQL server 2005 and the field type in SQL is set to BIT.

Am I missing something here, as to why I need to account for NULL when the field clearly has TRUE in it????

Any help is greatly appreciated, thanks!
 
Do you really mean to say show me the sum of the error codes for ALL rows IF the value of Isexpedited in the last row in the group is true? I'm guessing you really only want to count the error codes where the Isexpedited is true. So instead, create a formula:

IF {Command.IsExpedited} = TRUE THEN
{Command.ErrorCode22}

Then insert a sum on this formula at the username group level.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top