Column Visibilty based on dates
I have a report which has four columns based on each quarter like 1-quarter,2quarter,3quarter,4quarter. and i have a date parameter called YTD. I want the columns to be visible on dates selected like if the date falls between 1/1 to 3/31 then only 1 quarter
column to be visible and rest three hidden like wise if the date selected is 4/1 to 6/30 then 1 quarter and 2 quarter to be visible and 3 quarter and 4 quarter to be hidden similarly if the date selected is 7/1 to 9/30 display 3 columns and hide 4 quarter.
How can i do this ??? i am using SSRS 2005.
Display column 1 if the date parameter is between Jan 1 - Mar 31.
Display column 1,2 if the date parameter is between Apr 1- June 30.
Display column 1,2,3 if the date parameter is between July 1- Sept 30.
Display column 1,2,3,4 if the date parameter is between Oct 1- Dec 31.
Please HelpHoneyBunch
July 25th, 2012 11:59pm
HI Crust !
You might get the desired output using below expression;
For Quarter 1 : You need to set column visibility -> Show or Hide based on Expression -> Set below expression there
=IIF(Parameters!END_DATE.Value >= "20120331", TRUE, FALSE)
For Quarter 2 : You need to set column visibility -> Show or Hide based on Expression -> Set below expression there
=IIF(Parameters!END_DATE.Value >= "20120630", TRUE, FALSE)
For Quarter 3 : You need to set column visibility -> Show or Hide based on Expression -> Set below expression there
=IIF(Parameters!END_DATE.Value >= "20120930", TRUE, FALSE)
For Quarter 4 : You need to set column visibility -> Show or Hide based on Expression -> Set below expression there
=IIF(Parameters!END_DATE.Value >= "20121231", TRUE, FALSE)
Please let me know if this doesnt work for you. Hope I have answered you correctly.
Thanks, Hasham
Free Windows Admin Tool Kit Click here and download it now
July 26th, 2012 12:47am
Hi You can use the expression in Column visibility
Colum1: Iif(Month(Parameters!EndDate.value) >= 3, False, True)
Column2: Iif(Month(Parameters!EndDate.Value) >= 6,False,True)
Column 3: Iif(Month(Parameters!EndDate.Value) >= 9,False,True)
Column 4: IIf(Month(parameters!EndDate.Value)>= 12,False,True)
Hope this will Help u.
Regards,
Bharadwaj.
July 26th, 2012 12:52am
When i do this itis working partially like if i enter todays date that is in 3rd quarter it is giving 1 and 2 quarters and hiding 3 and 4 instead i want it to show the current quarter as well... like if i enter todays date it should give me 1,2,3(current
quarter ) as well ...Please helpHoneyBunch
Free Windows Admin Tool Kit Click here and download it now
July 26th, 2012 9:00am
Hi hasham
When i give these expressions i get an error
'Conversion from string "20120331" to type 'Date' is not valid. HoneyBunch
July 26th, 2012 9:03am
1) when i enter a date in 1 quarter that is any time before march then all columns hidden
2) when i enter a date in 2 quarter only 1 quarter column visible rest hidden
3) when i enter a date in 3 quarter only 1,2 quarter visible and 3,4 hidden
4)when i enter a date in 4 quarter only 1,2,3 visible 4 hidden
i want the current quarter to be visible too like when i enter sometime in 1 quarter i want to see 1 quarter like wise for rest of the columns.
ThanksHoneyBunch
Free Windows Admin Tool Kit Click here and download it now
July 26th, 2012 9:12am
Thanks Bharadwaj i got it, only thing i had to do was give the beginning of the month instead of the end of the month like
Iif(Month(Parameters!EndDate.value) >= 1, False, True)
HoneyBunch
July 26th, 2012 9:27am