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

Group by Fiscal Year 1

Status
Not open for further replies.

PCHD

Programmer
Nov 5, 2009
5
US
Hi,

I have a report which I want to group by fiscal year. The fiscal years are FY2009/2010 - 7/1/09 to 6/30/10 and FY2010/2011 - 7/1/10 to 6/30/11. How could I modify the formula I saw earlier in this thread (closed now)?

ex. {service.tran.datesvc)

I have tried this below but it does not render what I am looking for:

if month({ServiceTrans.DateSvc}) in [7 to 12] then
cdate(year({ServiceTrans.DateSvc})-1,7,1)
else
cdate(year({ServiceTrans.DateSvc})+1,7,1);

Thanks for the help.
 

Unless I'm missing something, your formula just had an extra "+1":

if month({servicetrans.datesvc}) in [7 to 12] then
date(year({servicetrans.datesvc}),7,1)
else
date(year({servicetrans.datesvc}) - 1,7,1)

 
I use Ken Hamady's solution:

"FY "+right(totext(year({table.date}+184),"0000"),2)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top