March 30, 2009 at 4:58 pm
hi,
i have 4 subreports(sub1, sub2, sub3, sub4)
in my MasterReport.
I dont want all the subreports to be generated when i run my MasterReport. i have a multivalue parameter which has 4 values.
The subreports should be selected based on the value of the multivalue parameter.
eg. if any any 2 values of multivalue parameter are checked then the related 2 subreports shoule be displayed.
how do i write an expression in Visibility of subreports to make it true if the value of the parameter is checked.
please help
March 31, 2009 at 3:09 am
Add the below code in report properties
public function IsFirstValueSel(ByVal SelectedMultiValue as String) as boolean
if SelectedMultiValue .Contains("1") then
return true
else
return false
end if
end function
Add the below code in the visibility proprty of subreport1
=code.IsFirstColSel(Join(Parameters!Report_Parameter_0.Value,", "))
Where Report_Parameter_0 is the multivalue parameter name(Parameter contains label and value as 1,2,3,4)
Repeat the same function for all the four sub report by replacing the number by 2,3,4.
Still if you not clear revert back to me.
March 31, 2009 at 9:43 am
Thank you so much Arunkumar,
i was able to work my way according to your reply and get the supreports working based on the parameter.
Thanks a lot
May 4, 2009 at 2:41 pm
Arunkumar, I am having a similar problem and appreciate your comments. However, I believe there to be a typo when calling the function from the visibility property. Your code shows the following:
=code.IsFirstColSel(Join(Parameters!....
I believe you meant to have it as:
=code.IsFirstValueSel(Join(Parameters!...
In any event, when using this expression in the visibility property I get the following message (represented by red line under the function name):
"Unrecognized Identifier".
Any ideas?
Thanks for your time!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply