显示标签为“depending”的博文。显示所有博文
显示标签为“depending”的博文。显示所有博文

2012年2月17日星期五

Disable grouping

I would like to be able to disable grouping depending on the value of parameter. At the moment I have the following expression for grouping:
=IIf(Parameters!Group2.Value.equals(""), false, Fields(Parameters!Group2.Value).Value)

What I am trying to do is if the value of the Group2 parameter = "" turn off grouping. Group2 is assigned a value from the following custom code:

Function Group2Value() As String
Dim Group As String
Group = ""
Select Case Report.Parameters!ReportType.Value
Case "1"

Group = ""

Case "2"

Group = "CategoryID"

Case "3"

Group = "StockFamilyID"

Case "4"

Group = "GroupID"

Case "5"

Group = ""

Case "6"

Group = "SaleableGLCodeID"

End Select
Return Group
End Function

However this is not working.

Can grouping be disabled and if so what am I doing wrong?

Thanks in advance.
can't you just set grouping to =1 ?

this technique can also be used in a matrix when you need an extra grouping for e.g. to display count AND amount but don't physically want to group the data|||

Yes, Grouping can be disabled.

Try doing the entire calculation in the custom code and place the name of the function in the expression for Grouping.

The Grouping expression as =Code.Group2Value()

Now based on whatever value is returned from the function Group2Value, the grouping will be done accordingly.

Regards,

Pradeep

2012年2月14日星期二

Disable and/or Hide Parameters

Is it possible to conditionally disable or hide parameter prompts, depending
on other already selected parameter values? For example, if I have two
parameters p1 and p2, is it possible to somehow disable or hide p2 if
P1="Yes"? Also, is it possible to conditinally set the default value of a
parameter, based on the user-selected value of another parameter? for ex: If
P1="YES", set default value of P2
to "2005"
Thanks in advanceSorry, conditionally hiding parameters dependent on other parameters values
is not supported natively at this point. The closest you can get right now
is to write your own custom parameter application that knows about your
business logic and once all parameters are satisfied, you use a SOAP call
(or URL access) to trigger the rendering of the report.
Adding the ability to conditionally hide parameters is a good suggestion and
it is under consideration for future releases.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"isaak" <isaak.peretsman at usa.dupont.com (no spam)> wrote in message
news:F0F8CE1D-6A38-4821-AEBA-30EA647CA913@.microsoft.com...
> Is it possible to conditionally disable or hide parameter prompts,
> depending
> on other already selected parameter values? For example, if I have two
> parameters p1 and p2, is it possible to somehow disable or hide p2 if
> P1="Yes"? Also, is it possible to conditinally set the default value of a
> parameter, based on the user-selected value of another parameter? for ex:
> If
> P1="YES", set default value of P2
> to "2005"
> Thanks in advance