How to programming Data-driven Subscription

  • How to programming Data-driven Subscription???

    OR How ti programming to export Reports to excel format by passing different parameters?

    Problem:: I have to generate excel files of reports by passing different parameters(generate excel files of reports by passing different month & year).

    Many Thanks,

    Waralees.

  • So, do you want to pass the current, or a specific past period to the report? For example, on the first of the month pass parameters that will output a report for the entire last month?

  • My report need to get month and year parameter. So if I want to export excel reports for three month past(1 report contain 1 month report), I have to create 3 data-driven subscriptions. Are there any solutions that i don't have to create lot of data-driven subscriptions????????

    Thanks

    Waralee.

  • Each row of data returned for a set of parameters in a data driven subscription will create a separate report. So, if your query returns 3 rows, one for each month and other appropriate parameters you will generate 3 reports.

    Return set

    Month, Parm1, Parm2, Parm3...etc.

    May, 1, 2, 3

    June, 1, 2, 3

    July, 1, 2, 3

  • Thanks for your answer...

    but I'm new for SSRS so could you explain more about your solution. I didn't get it now.

    Thanks in advance,

  • In a data driven subscription, you write a query to supply the report with parameter values. Each row returned by the query will generate a separate report. You have 2 parameters needed by your report @Year and @Month. You need to write a query that will return a list of those parameters. For example:

    SELECT MonthParm = Month, YearParm = Year

    FROM SomeTableThatWillSupplyValues

    WHERE YourCriteriaHere --for example WHERE Year = 2011

    Something like this should return a list like

    Month Year

    1 2011

    2 2011

    3 2011

    4 2011

    5 2011

    6 2011

    7 2011

    As you define your data driven subscription, you tell the subscription to fill the @Month parameter with the Month value(s) from your query and the @Year parameter with the Year value(s). When the subscription fires you should get 7 reports, 1 for each row of data returned from the query to the parameters.

  • Oh I See.

    Thank you so much for your helping....

    🙂

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply