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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding running totals

Status
Not open for further replies.

NiteClerk

Technical User
Nov 9, 2009
15
US
Hello: I'm using CR 2008 version 12.0.0.683

I have two running totals, #OT-Hrs-room and #Reg-Hrs-room. This measures labor hours, Overtime and Regular. The running totals work, print and reset the way I want.

I'm trying to add the two together with the formula @Tot-Hrs-Rm. My problem is that this will not print unless I have Overtime in the group. No overtime and @Tot-Hrs-Rm does not print.
Code:
whileprintingrecords;

IF {#OT-Hrs-room} <> 0 THEN
      {#OT-Hrs-room} + {#Reg-Hrs-room}
        else
            {#Reg-Hrs-room};

Since either OT-hrs or Reg-hrs (my data) is null I've tried coding this with "IF ISNULL" but that doesn't change the results. whileprintingrecords; does not seem to affect it either.

Thanks for any advice.

~Bob
 
If isnull({#OT-Hrs-room}) then
{#Reg-Hrs-room} else
{#OT-Hrs-room} + {#Reg-Hrs-room}

-LB
 
Thank you LB. I beat my head against this on and off for two days. I appreciate you and all the rest here at tek-tips.com . I search the threads frequently for solutions to my question. Thanks again !!! ~Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top