Hi Experts,
I have a problem with creating a variable for previous month.
In my universe i have month code object it is in all reports at query filter level. Now i am scheduling the reports. But problem is every month i change the month in all reports. to overcome this problem i want to create a variable for the Month and automatically chaged based on system or server date.
Could you any body help to write the syntex for this below formula to previous month.If no selection is made then it should always take last month.
@Select(Time\Month Code)= case when @Prompt(Â’EnterMonth CodeÂ’,'DÂ’,mono,free) =‘1900-01-01′ then datename(mm,dateadd(m,-1,getdate())) else @Prompt(Â’Enter Month CodeÂ’,'DÂ’,mono,free) end
FYI
Database:- SQL server 2005
Business Objects : XI 3.1 + SP2 + FP2.1
same as i done in universe level by using of Previous month syntax.But when i am trying to parse in universe level for below mentioned code i get a error parse failed:Invalid definition(UNV0023).Error parsing Parameter.
Syntax i used for creating a variable:
@select(Time\Month Code)=Case when @Prompt(‘Enter Month Code’,‘D’,Mono,free)=‘1900-01-01 00:00:00.000’ then month(dateadd(m,-1,cast(convert(char(7),getdate(),23)+‘01’ as datetime))) else @Prompt(‘Enter Month Code’,‘D’,Mono,free) end
@Select(Time\Month Code)= case when @Prompt(’EnterMonth Code’,‘D’,mono,free) =‘1900-01-01’ then datename(mm,dateadd(m,-1,getdate())) else @Prompt(’Enter Month Code’,'D’,mono,free) end
i am trying to insert in Month code object in Universe. But it’s showing error-Invalid definition (UNV00023) and i ignore the error & export to server. Now i open the report on that it show invalid Promt definition.
My issuse is Scheduling the reports automatically(Without changing the every month)
In my report i have Year and Month as filters.
Sooo Plz can anyone help how to achieve the results.
Is it possible to impliment ?
If possible plz help me?
Database:- SQL server 2005
Business Objects : XI 3.1 + SP2 + FP2.1