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!

Automatically set months 2

Status
Not open for further replies.

rewob65

Technical User
Nov 13, 2004
110
GB
Hi

I have a report where each month I have to re set up with a formala to look at data to see if it is in the range of the current month. i then have a history going back several years.

I thought if I set a date I can make the formula take off 30 days 60 days etc. i would like the formaula to work the exact month period so some month 30 others 31 and of coure February.

Is there any way of automating this?

Thanks
 
Crystal has this all set up, use something like
Code:
Year({your.date}) & "/" & Month({your.date})
Depending on your Crystal version, you might also be able to group by date and then specify that dates should be lumpled by week, month or whatever. It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Try:

{table.date} in currentdate-day(currentdate)+1 to
dateserial(year(currentdate),month(currentdate)+1,1)-1

The advantage of this is that it will pass to the SQL, resulting in a faster report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top