Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Get professional advice from professionals, and not from friends
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

10
April

How Do I Concatenate the Year to a Custom Financial Year Start Date in SQL Reporting Services

During a current report design consultancy using SQL Server Reporting Services 2008 I was asked "How do I concatenate the year to a custom financial year start date?"

This particular customer's financial year starts in June, rather than April, and they wanted a way to create a default value for the parameter of the report to the financial year start date.


Solution:

To concatenate the correct year to the start of the financial year:

SELECT Case when Month(getdate()) >= 6 then 
CAST('06/01/' + CONVERT(nvarchar(4),YEAR(GetDate())) As Datetime) else
CAST('06/01/' + CONVERT(nvarchar(4),YEAR(GetDate())-1) As Datetimeend as FYS




If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us

MAKE A COMMENT

Name *

Email Address *

Comment *

To prove you are human what is:

97 + 97 =