SSRS Report, Dynamic Field Selection

I want to create a report where my report fields should change according to my input parameter values.

For example, if I select 2 months

, the result should be 2 fields that have a monthly calculation. If I choose 3 weeks

, there should be 3 fields for each weekly calculation instead of a 2 month field.

How can I achieve this?

+1


source to share


1 answer


I'm still new to SSRS, but I've heard of several ways to do this:

  • To a certain extent, you are really talking about separate queries, depending on the parameters. So, use a dynamic query (create your query as a string expression). The easiest way I've seen is to use IIF in an expression to select one or the other stored procedure based on parameter values.
  • To the extent that this is almost the same query, but you want different columns to be visible, you can bind the visibility of the columns to an expression based on parameter values.
  • If too much of the structure of the report differs depending on the parameters, you can use multiple reports. Have one front report that calls one of the other reports based on parameter values, passing parameter values ​​to another report.


Hope this helps. If you have already identified a solution, then please tell me!

0


source







All Articles