BusinessObjects Board

HOW TO INSERT PREVIOUS YEAR IN LIST OF VALUES

Hi,

Plz tell me how to insert previous year in list of values of year object.
And how to make condition object to select year,previous year.
Thanks in advance.


dipa (BOB member since 2016-06-23)

That should be similar in concept to including the word “All” in a list of values. Try searching here for “include All LOV”


charlie :us: (BOB member since 2002-08-20)

I am able to insert *previous year in list of values of year object as ALL .
But I am not able to write code of condition to select previous year,ALL,year
so that I can drag it in condition pan of report.Plz tell me how to do it.
Thanks in advance.


dipa (BOB member since 2016-06-23)

What I was thinking of was something like

year(DATEADD(year,-1,getdate()))

added to the UNION to get the previous year (that’s for Sql Server). See this by Michael Welter for more information on LOV’s, including how to write the custom sql.


charlie :us: (BOB member since 2002-08-20)

Use this topic to create relative date objects

Then in your data query, build a condition:
Transaction Date between Start of Previous Year and End of Previous Year

Or if you want it to be used in many reports, create it as a predefined condition.