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

IfThenElse 1 and 0 Sum doesn't work

Status
Not open for further replies.

Hi2uDavid

Programmer
Apr 18, 2001
2
US
I am trying to get a total sum since I am unable to sum a DistinctCount. Therefore, I put in code:

if({@newdate}>date(2000,01,01) )then
tonumber(1)

My result is 1's and 0's. This is perfect except I am still unable to sum this formula. Any suggestions? I am using ReportWriter 7.0.2.

Thanks,
David
 
Try this, just to tidy up your else statement:
If {@newdate} > date(2000,01,01) then 1 else 0 ;

If that doesn't work then @newdate is likely the problem. What does this formula contain?
 
Thanks, Idle. I have tried your suggestion too and it still won't work. The @newdate is a datetimetodate(replogin) formula. The purpose is to get a distinct count of dates instead of a date every time the rep logs on/off/on/off etc. This works until I want a sum of all dates for all reps. The distinctcount will only work for the rep grouping or the date grouping.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top