Hi all,
This is for Limit no.of columns in matrix report
Step one: copy the following code to the custom code area
Dim FlagTable As System.Collections.Hashtable
Dim Flag AS Integer
Function MyFunc(ByVal NewValue As Object) As Integer
If (FlagTable Is Nothing) Then
FlagTable = New System.Collections.Hashtable
End If
If (NewValue Is Nothing) Then
NewValue = "-"
End If
If (Not FlagTable .Contains(NewValue )) Then
Flag =Flag + 1
FlagTable.Add(NewValue, nothing)
End If
MyFunc = Flag
End Function
Step two: Add a list to your report
1. Right-click the list ,and then select Properties.
2. Click Edit details group… button
3. Type in the expression=Ceiling(Code.MyFunc(Fields!Productname.Value)/2)
Note:
1) Fields!Productname.Valueis your column group datafield
2) 2 is the number of the columns you want to display in a row
Step three:Sort the dataset by column group field, and then drag the matrix into the list
1. Switch to the data tab.
2. Add ‘order by datafield’ to sort the dataset by the column group datafield here is a example:
select * from vProductProfitability
where Year=2003 and
MonthNumberOfYear in (1,2,3,4,5,6,7,8,9,10,11,12)
order byProductname
3. Drag the matrix into the list and preview the report.
Can you explain second step briefly
i drag and drop the list from toolbox to the report area,when i right click on the list it shows Rectangle properties.
In that i am not able to see (Details) in the Row Groups
List means list data region are some other list
please could you explain
Thanks
srujitharam