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

Error - Number of Days is Out of Range

Status
Not open for further replies.

YANKRAY

Technical User
Joined
Nov 7, 2003
Messages
283
Using CR 10

I am using this formula to calculate the Predictated Finish date of a Task.

if {Command.WO_DUE_DATE} < currentdate
then
currentdate + {@Flow Days Remaining (new)}
else
{Command.WO_DUE_DATE}

I continue to recieve the error "The number of days is out of range". Nothing I have tried is working. Any suggestions?

The FORMULA for @Flow Days Remaining is:

if {Command.WO_START_DATE} >= currentdate
then
{@Flow Days}
else
if {Command.WO_START_DATE} < currentdate
then
{@Flow Days} - ({@Flow Days} * (1 - {@ETC} / ({@ETC} + {Command.WLC_ACTUAL_HOURS})))

The FORMULA for @ETC is :

if {Command.ESTIMATED_HOURS}
- {Command.WLC_ACTUAL_HOURS} > 0
then {Command.ESTIMATED_HOURS} - {Command.WLC_ACTUAL_HOURS}
else
{Command.ESTIMATED_HOURS} * .1

Thanks,
Ray
 
what are the contents of the formula for {@Flow Days}?

 
As fisheromacse says, you need to display your fields to find out what's gone wrong. Put the data fields and formula fields on an extra detail line, just to debug.

I suspect that one of your database fields contains a null. You can get round this by doing as If IsNull({your.field}) test before trying to use the field for anything else.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
fisheromacse:

The formula for @FlowDays is:
{Command.WO_DUE_DATE} - {Command.WO_START_DATE} +1

There should not be a null value in either of these fields, but I will check.

Ray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top