Print Page | Close Window

Another date problem, im rubbish at dates :(

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=8507
Printed Date: 02 May 2024 at 6:51pm


Topic: Another date problem, im rubbish at dates :(
Posted By: robert
Subject: Another date problem, im rubbish at dates :(
Date Posted: 30 Nov 2009 at 2:52am
ok so i have this report and what the report does doesnt really matter, but the data it needs to show must be only of the current year, so in the select criteria i chose table.date_created  greater than or equal to 01/01/2009 which is fine for this year, but come 01/01/2010 i need it to display just that yaers data but dont really want to change the select cirteria at the begining of each year. so i need some sort of formula using table.date_created but what????????
 
help please :)



Replies:
Posted By: FrnhtGLI
Date Posted: 30 Nov 2009 at 6:42am
Well, assuming you are running the report for records whose created date is not greater than the current date at the time running the report (future dates aren't available in the record set) then maybe table.date_created in YearToDate.


Posted By: lockwelle
Date Posted: 30 Nov 2009 at 6:42am
if year({table.field}) = year(currentDate) then ...
 
 
 
does this help?


Posted By: robert
Date Posted: 30 Nov 2009 at 8:41am
thanks guys i will give both these a try and see what happens, will let you know tomorow.



Print Page | Close Window