1

I have a requirement in which I have to display dynamic columns and tables in SSRS. I have to create a generic report RDL which can have 1 or 2 or 3 tables and each table can have any number of columns and is configurable based on report type. This master data will be stored in a database like below:

Report 1 :

  • Table 1 - Column1_1, Column1_2, Column1_3
  • Table 2 - Column2_1, Column2_2
  • Table 3 - Column 3_1, Column 3_2

Report 2 :

  • Table 1 - Column1_1, Column1_2
  • Table 3 - Column 3_1, Column 3_2, Column3_3

Report 3 :

  • Table 2 - Column2_1, Column2_2
  • Table 3 - Column 3_1

Is there any efficient way of achieving this?

All this needs to be configured in a single RDL and no separate RDLs for separate reports should be there.

Nishant
  • 11
  • 1

1 Answers1

0

SSRS is very flexible in terms of what you can do with dynamic expressions. In general, here are a couple of attributes that you can control dynamically:

  • Table visibility
  • Column visibility
  • Column Group visibility
  • Which field a Group is grouped by

Using combinations of these features, you can design a report that groups and displays data dynamically. In your specific example, you may need to have all 7 tables, each with the correct number of column groups predefined. Then set the table visibility and column grouping to be dynamic based on the selection.

To generalize this even further, you may be interested in making a table with 3 column groups that are completely dynamic. This is also possible by toggling the visibility of the unused Column Groups. Hopefully you can use these principles as building blocks to achieve a solution that works for you.

StevenWhite
  • 5,907
  • 3
  • 21
  • 46