Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Technical Questions
Topic: Only show last 5 years of data
Author
Message
TLG2005
Newbie
Joined: 10 Nov 2009
Location: United States
Online Status: Offline
Posts: 1
Topic: Only show last 5 years of data
Posted: 10 Nov 2009 at 1:18pm
I need to show the last 5 years of giving history.
Is there a formula that allows the report to show the last 5 years without specifying the dates?
in other words, i want it to be dynamic so in January of each year I don't have to go change my date ranges, etc.
Thanks!
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 10 Nov 2009 at 1:37pm
NOt sure which you mean...
5 years ago from today (e.g. >11/10/2004)
{Table.datefield} >= dateadd('yyyy',-5, currentdate)
or >Jan 1 of four years ago (e.g. > 01/01/2005)?
{table.field} >= date(year(dateadd('yyyy',-4, currentdate)),01,01)
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
BAEZL
© 2004-2026 Brian Bischof. All Rights Reserved.