Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSRS Data Driven Subscriptions Expand / Collapse
Author
Message
Posted Wednesday, July 24, 2013 12:08 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 14, 2013 9:12 AM
Points: 5, Visits: 8
Hi all,

I'm relatively new to SSRS (my version is 2008 r2) so I apologize if this is a question that should have an obvious answer. Currently I am trying to set up a report that will generate unique data for each person in my DB. I have four parameters: personID, monthStart, timePeriodStart, and timePeriodEnd (for MTD and YTD values). I have a textbox that updates the person's name according to the inputted ID as well. I want the monthStart, timePeriodStart, and timePeriodEnd all static values (which I know how to do) but changing the ID poses a problem to me. If I can change this ID, I will be able to generate custom reports for each person-which is what I want. Do I change this via the query in step 3 of the Subscription Wizard, or does simply selecting 'Get Value from database' allow this? Or, as I expect, do I need a third alternative?

Thanks!
Post #1477195
Posted Thursday, July 25, 2013 9:47 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 29, 2014 12:18 PM
Points: 2,818, Visits: 2,561
It sounds like you have the enterprise version of SQL Server, so the first issue is out of the way. A data driven subscription will create a distinct report for each row returned from the subscription query. So you want to add the personID as a value in your subscription query and then return that value to the parameter input in the wizard a couple of steps later by selecting the Get Value from Database and choosing the personID.
Post #1477587
Posted Thursday, July 25, 2013 10:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 14, 2013 9:12 AM
Points: 5, Visits: 8
Ironic you mention that because I literally sorted the problem out about half an hour before you responded. I was doing that previously, but my queries for the dataset and report were causing the problem (they would drop a table if it exists then re-create it; instead I just made a separate update_table script and then made my select another script). Thanks.
Post #1477602
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse