Reputation: 1038
I have dataset like these
Field "Type A" , "Type B" and "Type C" is a boolean type.
I made tablix for assign above dataset. At Type Column of Tablix is set by this expression.
= Switch(
Fields!TYPE_A.Value = 1 And Fields!TYPE_B.Value = 0 And Fields!TYPE_C.Value = 0 , "Regrinding",
Fields!TYPE_A.Value = 0 And Fields!TYPE_B.Value = 1 And Fields!TYPE_C.Value = 0 , "Coating",
Fields!TYPE_A.Value = 0 And Fields!TYPE_B.Value = 0 And Fields!TYPE_C.Value = 1 , "Modifying",
Fields!TYPE_A.Value = 1 And Fields!TYPE_B.Value = 1 And Fields!TYPE_C.Value = 0 , "Regrind & Coating",
Fields!TYPE_A.Value = 1 And Fields!TYPE_B.Value = 0 And Fields!TYPE_C.Value = 1 , "Regrind & Modifying",
Fields!TYPE_A.Value = 0 And Fields!TYPE_B.Value = 1 And Fields!TYPE_C.Value = 1 , "Coating & Modifying",
Fields!TYPE_A.Value = 1 And Fields!TYPE_B.Value = 0 And Fields!TYPE_C.Value = 1 , "Regriding & Modifying",
Fields!TYPE_A.Value = 1 And Fields!TYPE_B.Value = 1 And Fields!TYPE_C.Value = 1 , "Regriding,Coatin & Modifying",
1 = 1 , "None" )
At "Type count" Column I need to count each type by grouping with two data
1.TOOLS_CODE from Datset
2.String value which is result from expression at "Type" Column of Tablix
What should I do?
OUTPUT :
if Dataset has items like these
A report will show...
Upvotes: 1
Views: 2204
Reputation: 3509
The easiest solution would be to create a new view inside your database that does the necessary grouping. And then you can just show that inside your report.
Another solution would be to handle the grouping in C# and pass a custom list as a parameter to the reporter.
If you really need to get this work in reporter, you could work with nested lists on which you add textboxes fetching the data by using expressions. But I don't recommend this, as it gets really complicated. I would strongly suggest the first solution.
Upvotes: 2