tidge tidge - 5 months ago 33
SQL Question

Blank out duplicate column values in SQL Reporting Services

This has to be stupid easy to do, but I'm not seeing it.

I have a SQL Reporting Services (SQL 1008 R2) report.

I'm using a tablix to basically show:

COL 1 | COL 2 | COL 3 | COL 4
----------------------------------
100 | 100 | 100 | Item 1
100 | 100 | 101 | Item 2
100 | 100 | 102 | Item 3
100 | 110 | 110 | Item 4
100 | 110 | 110 | Item 4
100 | 110 | 111 | Item 5
100 | 110 | 112 | Item 6


But I want to suppress repeating values in those first two columns so it looks like this:

COL 1 | COL 2 | COL 3 | COL 4
----------------------------------
100 | 100 | 100 | Item 1
| | 101 | Item 2
| | 102 | Item 3
| 110 | 110 | Item 4
| | 110 | Item 4
| | 111 | Item 5
| | 112 | Item 6


I thought it might be as easy as right clicking the column and selecting "Hide duplicate values", but I'm not seeing that.
I'll apologize now because I'm going to feel stupid when someone points out how easy it is to do or find.

lc. lc.
Answer

It is probably best to simply use groups, but if you want to keep it this way, try:

=IIf(Previous(Fields!Col1.Value) = Fields!Col1.Value, Nothing, Fields!Col1.Value)

Or you can set the textbox's HideDuplicates property to the containing group name (in your case, presumably Tablix1_Details)