Print Page | Close Window

Back date

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=354
Printed Date: 03 May 2025 at 2:23pm


Topic: Back date
Posted By: brreid
Subject: Back date
Date Posted: 19 Mar 2007 at 10:06am
I am running Crystal X, and I am looking for all people that was born on a specific date (21 and older) in my database today, this is easy, however I would like to know how many people (21 and older) was in my database in December of 2006, how do I back date a search, pretending that today is 12/2006
Thank you


-------------
Thanks for sharing the knowledge



Replies:
Posted By: BrianBischof
Date Posted: 19 Mar 2007 at 11:53am
Are you wanting to exclude people that were registered after December 2006? If so, you need to have the date that they were added to your database as one of the fields. Then take your current report formula and add on the condition
AND {table.DateAddedfield} < CDate("1/1/2007")


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: brreid
Date Posted: 20 Mar 2007 at 6:42am

I am not looking for date of registration,  we run reports based of how many people in the database are 21 yrs or older, but if I ran it today it will show that I have 100, but if I had run this seem report in December,  the number would be different because some people  may not have turn 21 yet.   I don't know how to go back in time, I don't know how to backdate the report date to see how many 21 yr old we had in December.

Thank  you


-------------
Thanks for sharing the knowledge


Posted By: BrianBischof
Date Posted: 20 Mar 2007 at 11:44am
Interesting. There is a property to set the report date, but I don't know if it effects formulas. I'll have to look into that (or you can check it out and report back). You could create a parameter with mock report date in it and use that in your formulas. Then you can back date it to whatever. The key is to exclude records appearing after that date and then you are simulating running the report in the past.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window