SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSRS Data Driven Subscriptions


SSRS Data Driven Subscriptions

Author
Message
ryan.h.maas
ryan.h.maas
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 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!
Daniel Bowlin
Daniel Bowlin
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4068 Visits: 2629
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.
ryan.h.maas
ryan.h.maas
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search