Hi, I have a multiple columns report with 2 fix columns and 10 selectable ones.
I'm selecting the columns with a checklistbox an it works
The Header is easy just have to put "=Parameters!Columns.Label(0-10)" as an expression in each columns heading
The hard part that I'm not getting is that I'm currently using a Switch statement in the fields values and I want to put it into Custom Code.
Why Custom Code is that I was ask to insert 15 other fields value in my selection list. I just don't want to be ask to add more fields x 10 columns.
Here's part of my Switch, I have 10 of them (0-10) for each columns.
=Switch(Parameters!Columns.Value(0)="Phone",Fields!Phone.Value,
Parameters!Columns.Value(0)="FirstTime",SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value),
Parameters!Columns.Value(0)="ProcessTime",SSRS.Utility.TimeFromMilliSeconds(Fields!ProcessTime.Value),
Parameters!Columns.Value(0)="TalkTime" ,SSRS.Utility.TimeFromMilliSeconds(Fields!TalkTime.Value),
...
Parameters!Columns.Value(0)="Transferred",Fields!Transferred.Value)
Notes that some of the fields are FIELDS and others are call in function (assembly's)
Here's one of my many variation of custom code
Public Shared Function FixColumns(Byref Colonne as String) As String
SELECT CASE Colonne
CASE "Phone"
Return "Fields!Phone.Value"
CASE "FirstTime"
Return "SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value)"
...
END SELECT
End Function
in the value columns fields
=CODE.Fixcolumns(Parameters!Columns.Label(0))
I would greatly appreciate any help
I'm selecting the columns with a checklistbox an it works
The Header is easy just have to put "=Parameters!Columns.Label(0-10)" as an expression in each columns heading
The hard part that I'm not getting is that I'm currently using a Switch statement in the fields values and I want to put it into Custom Code.
Why Custom Code is that I was ask to insert 15 other fields value in my selection list. I just don't want to be ask to add more fields x 10 columns.
Here's part of my Switch, I have 10 of them (0-10) for each columns.
=Switch(Parameters!Columns.Value(0)="Phone",Fields!Phone.Value,
Parameters!Columns.Value(0)="FirstTime",SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value),
Parameters!Columns.Value(0)="ProcessTime",SSRS.Utility.TimeFromMilliSeconds(Fields!ProcessTime.Value),
Parameters!Columns.Value(0)="TalkTime" ,SSRS.Utility.TimeFromMilliSeconds(Fields!TalkTime.Value),
...
Parameters!Columns.Value(0)="Transferred",Fields!Transferred.Value)
Notes that some of the fields are FIELDS and others are call in function (assembly's)
Here's one of my many variation of custom code
Public Shared Function FixColumns(Byref Colonne as String) As String
SELECT CASE Colonne
CASE "Phone"
Return "Fields!Phone.Value"
CASE "FirstTime"
Return "SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value)"
...
END SELECT
End Function
in the value columns fields
=CODE.Fixcolumns(Parameters!Columns.Label(0))
I would greatly appreciate any help
Denis B.