SQL Server SSRS – How to Iterate Through All Parameter Values in Data-Driven Subscription

sql serverssrs

I am trying to build a data-driven subscription in SSRS (In SharePoint integrated mode, but I believe that's irrelevant). The rsds file I am running against has a certain parameter that is a hard-coded list of about 20 values. In the subscription, I need to run the report and generate a separate Excel file for each of the 20 values. Where do I assign those those values from within the subscription definition? I can specify a query but don't see where to point to the parameter list that is hard-coded inside the report file. Can't I just point to the list and have this run 20 different files automatically or do I need a separate subscription for each value?

Best Answer

You need to put those 20 hard-coded values into a table, instead, and then you can refer to that in your data-driven subscription. That will also make it easier to maintain because you can now just add or remove records from that table instead of having to change and re-deploy the entire report.