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

Formula for Next Full Month? 3

Status
Not open for further replies.

loveyoursite

Technical User
Apr 14, 2005
100
US
CRV10 - Is there a formula for NextFullMonth? I see in the select criteria that there is an "in the period" LastFullMonth and next30days, but I don't see NextFullMonth. I have a report that when the user runs it, regardless of the day of the month they run it on, I need the report to show only the next full month (28, 30 or 31 days). Any assistance would be appreciated. Thanks!
 
Try this

Code:
{table.date} in [dateserial(year(currendate),Month(currentdate)+1,1) to dateserial(year(currentdate),month(currentdate)+2,1-1)

-LW
 
Thanks, but that didn't work. This is a report identifying all 90 day employee probationary appraisals coming due in the next month. That due date field is {@Hire Date + 90 Days}. I'm trying to keep the user from having to enter a date range if at all possible. When I used the formula you probided, instead of that field populating with the actual due date, it populated with "False" and brought back way too many records. Any other suggestions?
 
Then try this...

Code:
dateadd("d",90,{table.hiredate}) in [dateserial(year(currendate),Month(currentdate)+1,1) to dateserial(year(currentdate),month(currentdate)+2,1-1

-LW
 
Sorry - that didn't work either - got the same result as before.
 
Hi,

Can you try to compare only year and month in your selection formua, like:

ToText({table.hiredate, "yyyyMM") = Totext(DateAdd("M", 1, currentdate), "yyyyMM")

I didn't test it but it should work, and also if it works, you need to make sure check SQL Query to see if the formula will impact the performance or not.

Ted
 
I'm puzzled. I use the same formula in CR 8.5 and it works fine. Saying it doesn't work is not enough. Need more details of why it is not working. Where are you using the formula? Please post what you are getting as well as what you are expecting. Post the Show SQL Query, also.

-LW
 
It sounds like you are creating the formula in the formula expert instead of in the record selection formula area, where it should be.

-LB
 
Thanks LB, you were right! Now, how do I get it to show the 90 day out date instead of the date hired??

Here's what I get:

Employee Date Hired Eval Due
John Doe 02/21/2005 02/21/2005

Here's what I want:
Employee Date Hired Eval Due
John Doe 02/21/2005 05/23/2005
 
Create a formula, @EvalDue, and paste it on your report canvas next to the Hire Date

Code:
dateadd({table.hiredate},90)
 
Thanks everyone! - I can always count on this forum to get me through.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top