Hi,
I am trying to impelement the report which will group either by
UserType or CompanyType depending on whichever field is returned by
Stored Proc. At any given point SP will fill only one of above field
while other will be blank. I need to display the name of the filled
group field in report.
Also would like to know how to use multiple expression in Group
property for a row/column group.
Thanks,
MaheshRather than return two fields use an isnull() in the SP and return one field.
"Mahesh" wrote:
> Hi,
> I am trying to impelement the report which will group either by
> UserType or CompanyType depending on whichever field is returned by
> Stored Proc. At any given point SP will fill only one of above field
> while other will be blank. I need to display the name of the filled
> group field in report.
> Also would like to know how to use multiple expression in Group
> property for a row/column group.
> Thanks,
> Mahesh
>|||You have to write custom code with a select case/switch statement.
Custom Code you get to by right clicking the gray area outside the
report page and choosing Propeties ... look for Code tab.
Then do function:
Shared Function GetGroupBy(byval incomingParam as string) as string
Select Case incomingParam
Case "abc"
Return "Column1"
Case "def"
Return "Column2"
..... etc
Then in the designer do = Code.GetGroupBy(') the question might be
filled in by a drop-down box of parameters that you defined.
Does that help?|||Thanks Chad,
Could you please eloborate the your solution. Here I am not using
dropdown box but is using data feild returned by dataset.
Actually I am trying to use a below expression in the group field.
=iif(
Fields!CompanyName.IsMissing,Fields!UserTypeNamee.Value,Fields!CompanyName.Value)
My SQL Stored proc will return ether CompanyName or UserTypeName
Please suggest the solution.
Many Thanks,
Mahesh
No comments:
Post a Comment