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

Week - Year

Status
Not open for further replies.

Steve95

MIS
Nov 3, 2004
265
US
Hi All

I have a formula in my details section which brings back weekno and year as:-

38-2006
39-2006 etc etc

I have a graph which points to this and also has a range option available.

Since the new year, the user did not run this report and now needs a urgent fix, Typical user!

When individual selecting the weekno for a year they come back fine eg. 38-2006, 40-2006-, 48-2006 and the same when soley selecting weekno from 2007. As soon as I select a range or random weekno from both years for example 38-2006 through to 10-2007 the report is only bring back data for this year. I have heard this is a problem to do with the week and year and how crystal reads it. I am looking for a formula which sayes if last record = 52 - year then move onto 01 - new year.

I hope I make sense and have not missed anything.

Many Thanks
 
Please post the formula. It probably needs a test like
Code:
year({your.date}) < Year(currentdate)

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]
 
Thanks for your help......

I have managed to resolve......it was a case of making the year first and then weekno as a 01-2007 was getting confused with 52-2006...in a calendar 52-2006 is first but crystal not read like that it was reading 01-2007 and then 52-2006.

Many Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top