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

Rolling 9 month report

Status
Not open for further replies.

birdie4me

Programmer
May 20, 2005
5
US
need to create a report. The main field is release date which can be just about any date but I only want to count the number of records by the month for the most recent 9 months. For example, if I were to run the report today it would have counts for Sept-Dec 2014 and Jan-May 2015... then when run in Oct - Sept would dropoff but June 2015 would be included.. I just need to know the number of release dates that fall within the month. There's other field/colms but got that working OK.. figure got toe do a compare for the year and month of the current date against the release date but really am a rookie and just cannot seem to get the formula to work properly. Any help would be very much appreciate... thanks in advanace.
 
If I understand your requirements, you need the report to return records where the Release Date is between the 1st day of the Current Month (1 Sep 2014 as of today) and the last day of the month in 9 months time (31/5/2015 as of today).

If my understanding is correct, place the following formula in the Record Selection Formula (Report => Selection Formula => Record):

Code:
{Table.ReleaseDate} in [Minimum(MonthToDate) to Date(DateAdd("M", 9, Minimum(MonthToDate)) - 1)]

, replacing {Table.ReleaseDate} with the actual table/field name from your database.

Hope this helps.

Cheers
Pete
 
I inserted the formula you recommended in my query detail query expression... {Release Date} in [Minimum(MonthToDate) to Date(DateAdd("M", 9, Minimum(MonthToDate)) - 1)] Release date is my field name. but I keep getting a parsing error... sure i'm misstating something.

 
I'm a bit confused by your reference to the "... query detail query expression ...", which is not Crystal Reports terminology. Is it Crystal Reports that you are using to write this report? Did you follow my instructions?

When replacing {Table.ReleaseDate}, you should select the actual field name from the list rather than typing it. What is the actual error message you are getting?

Cheers
Pete
 
Sorry, got it... operator failure - thanks for your help... yes, I am actually working with two different applications got them confused and then the light bulb went off... thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top