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: YTD and LYYTD From 1st April not 1st Jan
Oldest Post First
Newest Post First
Author
Message
twistednerve
Newbie
Joined: 28 Feb 2013
Online Status: Offline
Posts: 5
Topic: YTD and LYYTD From 1st April not 1st Jan
Posted: 20 Jan 2014 at 5:23pm
Hi,
I have been racking my brain trying to work this out!
Does anyone have an ideas on how to return data that is YTD and LYYTD with the beginning of the year being 1st April instead of the 1st of January?
The data returned would have to be between 1st April and 31st March.
The reason for 1st of April as it is the beginning of the companies financial year.
IP Logged
lolly54
Groupie
Joined: 25 Sep 2011
Online Status: Offline
Posts: 58
Posted: 20 Jan 2014 at 9:39pm
I have used three formulas to get the FY period.
{@CurrentMonthStart}
//1st of Current Month
Date(Year(CurrentDate),Month(CurrentDate),1)
{@FY Start}
if month({@CurrentMonthStart}) in 1 to 3 then
Date(Year({@CurrentMonthStart})-1,4,1)
else
Date(Year({@CurrentMonthStart}), 4, 1)
{@FY End}
if month({@CurrentMonthStart}) in 1 to 3 then
Date(Year({@CurrentMonthStart}),4,1)-1
else
Date(Year({@CurrentMonthStart})+1,4,1)-1
If you run the report as of today (Jan 2014), it will return the FY period from April 1st 2013 to March 31st 2014.
IP Logged
twistednerve
Newbie
Joined: 28 Feb 2013
Online Status: Offline
Posts: 5
Posted: 23 Jan 2014 at 4:52pm
Thanks for your help, it works perfectly and I learnt something about using dates
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
This page was generated in 0.016 seconds.
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
CLICK PLAYS
|
COACH FORUMS
|
TROPICAL FISH
© 2004-2024 Brian Bischof. All Rights Reserved.