sql server - How to get Financial year by using expression in ssrs report -


how financial year using expression in ssrs report. out put required (i.e fy 1617) using from_date or to_date parameter.

now question becomes bit tricky. want put output? if parameters contain more 2 years? e.g. = 2014 , = 2017? depends on business requirement now. anyway, below expression should give ideas, if year part of parameters same, use parameter base, otherwise use both , parameter:

= "fy" + iif(year(parameters!fromdate.value) = year(parameters!todate.value),      format(parameters!fromdate.value, "yy") + " " + format(dateadd(dateinterval.year, 1, parameters!fromdate.value), "yy"),     format(parameters!fromdate.value, "yy") + " " + format(parameters!todate.value, "yy")) 

Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

java - How to implement an entity bound odata action in olingo v4.3 -