Question

I have a multi-valued parameter TimeMonthOfYear(from cube) that contains January Februrary...December. I want to set a default value showing current month using MonthName(Month(Today)) (I tried it and it didn't work) when running report...

If I do this [Time].[Month Of Year].&[October] it works! October is selected in dropdown after previous dropdown (Year) was selected.

I don't want to do it the "hard coded" way...I have tried [Time].[Month Of Year].&[MonthName(Month(Today))] and ="[Time].[Month Of Year].&["&MonthName(Month(Today))&"]" without luck

Any help is very much appreciated!

Was it helpful?

Solution

Yup :) Well it's now working with may be a not so nice solution but will work for now with the help of vb code. in standard value I have ="[Time].[Month Of Year].&[" + Code.SetMonth() + "]" and custom code Function SetMonth() As String Dim x as STRING x =CStr(MonthName(Month(Today))) 'CStr not needed I think If x = "januari" Then x = "January" ElseIf x = "februari" Then x = "February" ... End If Return(x) End Function That is giving me the current month after selecting value in year drop-down :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top