SSRS. How to merge cells using expressions?

I have 3 columns and here are 2 possible ways:

1. In all of them are values 
2. Only col1 keeps value (col2 and col3 NULL)

For now It looks like:

| col1 | col2 | col3 |
----------------------
| val1 |      |      |
| val2 | val3 | val4 |
| val5 | val6 | val7 |
| val8 |      |      |

It should be like this:

| col1 | col2 | col3 |
----------------------
|        val1        | -- merged cells, because col2 and col3 empty
| val2 | val3 | val4 |
| val5 | val6 | val7 |
|        val8        | -- merged cells, because col2 and col3 empty

I don't have idea If I need to create groups (I've tried row/column grouping, but really unsuccessfully, far away from what I need).

As I think I need to write expression something like:

IFF(col2 & col3 = NULL) MERGE(col1, col2, col3)

Just I can't get success with expression's structure.

August 27th, 2015 6:22am

Hi Santoshkum,

 The ColSpan property can't be changed using an expression however you might be able to accomplish the task by creating a second row within the row group, then use an expression to hide the merged rows when condition is false.

Please have a look on the following thread for more info.

http://social.msdn.microsoft.com/Forums/is/sqlreportingservices/thread/19c4d207-bc9c-459b-9220-421a1b580207

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 7:15am

Hi santoshkum,

In Reporting Services, we can only merge cells in design surface, its not supported to merge cells dynamically during report processing time.

In your scenario, you can insert two rows outside the group, then merge the cells to make those two rows contain one cells. Specify the value for the first row with First() function, the last row with Last() function. Please refer to screenshots below:

If you have any question, please feel free to ask.

Best regards,
Qiuyun Yu

August 27th, 2015 10:31pm

i am generating a report like this(calculating subtotal & total in sql code itself)

Sl. No.

State

District

count

1

ap

North 

                     280,527

2

up

Behar

                     227,096

.

Sub Total

.

                       72,653

.

Total

.

                       60,616

but i need report like this

Sl. No.

State

District

count

1

ap

North 

                     280,527

2

up

Behar

                     227,096

Sub Total

                       72,653

Total

                       60,616

How can i achieve it..................................


Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 1:41am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics