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

Fiscal Year-To-Date 1

Status
Not open for further replies.

LOW

Programmer
Sep 27, 2000
45
US
I have created a report that uses a date range for a parameter (?DateStart and ?DateEnd).

What I am trying to do is run a fiscal year-to-date total on a field I&quot;ll call transaction_amount. If the date range month is > June, then I want the ytd to start at 7/1 and end at ?DateEnd. If the date range month <=June then I want the ytd to start at 1/1 and end at ?DateEnd.

Anyone have any ideas how to do this? Is there a function for FiscalYTD?

Linda-
 
There is no function, and it wouldn't help you since you are using two different start dates at the same time.

To calculate what you describe based on an input date you do this formula called FiscalStart:

If Month({input}) >= 6
then Date( Year({input}), 7 , 1 )
else Date( Year({input}), 1 , 1 )


Now you can use the following boolean for selecting or after an if:

{Date} in {@FiscalStart} to {?EndDate} Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
This is great! Thank you so much.

Linda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top