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!

Need formula help

Status
Not open for further replies.

bubu2006

MIS
May 2, 2006
157
US
I have a formula number of days which calculates number of days

I want to write a formula called age and create a group on that in the report.

formula logic

If the number of days >=120
Then display 0 to 120
Else for each next 30 days
display
Previous maximum days +1 to previous maximum days +30
(e.g. 121 to 150 days,151 days to 180 days and ….)


I have a number variable which is
Numbervar Previous maximum days:=120

Can anyone help me to write the code? Is there anyway I can use for loop?
Thanks for the help in advance.
BB
 
I have tried o write this but for loop is not working

stringvar str;
numbervar nod:=120;
if {@number of days}<=nod
then
str:='0 to 120 days'
else
if {@number of days}>nod
then
(for nod:=120 to 5000 do
str:=totext(nod+1,0)+'to'+totext(nod+30,0)+""+'days')
;
str
 
what is the content of the formula (@number of days}?
or did i miss it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top