Run reports/send emails from a list of parameters? - reporting-services

I've run into a problem that, although I feel in my gut there is a 'simple' resolution, I'm not getting anywhere with it! The reports I'm running are using a dataset that includes a username that I need to use to 1) Use as a parameter for running the report and 2) Use to create an email address and send it to the user. I really don't know enough yet about SSRS, or have the experience, to have already created the parameterized report (nevermind the iterating through the dataset that I'm assuming will be needed), nor have I ever set up a data-driven subscription. ANY help on either of these issues would earn eternal gratitude.
Thank you all....again!
Patrick

Its not too bad once you've been through it once. First you need to get the SQL out of your parameter dataset (it's redundant in the report definition). Then in Report Manager/SharePoint you can define the Data Driven Subscription. Paste in the SQL from your parameter dataset into the wizard as the Query, and then use the columns from that SELECT on the later pages of the wizard as required e.g. email address for ... email address.
No coding is required (beyond the parameter dataset which you already have) and the wizard is fairly self-explanatory and well documented.
Good luck!
Mike

Related

Stop subscription when no values returned in SQL Server Reporting Services

I am working on sending reports via emails to users. Now I am able to successfully send this reports my only problem is that for this reports there are times whereby the report shows no values. Now I want to ensure that when a report shows no values, it will not be send out.
I went through numerous forums with regards to this, in most times the solution I found is to create jobs, I have no idea how to go about in doing that.
Please note the I used just a normal subscription not the data driven subscription.
If you have any better yet simple solution I can use please assist. Please take me on a step by step work through in solving this problem.
I will highly appreciate your assistance
A service agent would be a big chunk of work to prevent the delivery of zero record reports. However, you will need to use a data-driven subscription to achieve your needs. Essentially, you would scan-ahead in your Stored procedure that produces the email recipient list to check for no records and return null as the list of recipients. I do not think this is possible without data driven subscription.
On a side note, if you are using an email server you could see if it's possible to do something similar on that side of things.

SSRS 2012 - Explain input parameters before report loads

When a user hits my report I require they select a parameter to continue. What I would like to do is explain to the user, before they have selected an option, a little about the parameter options. It is fairly straight forward in the report below, however I have others that are much more complex.
Currently, the user has to select options then view the report; at which time an explanation of the parameters is available as part of the report. To me, it seems silly that a user would have to pick something 'blindly' just to get an understanding of how that parameter will impact the results.
I realize that appropriate parameter naming goes a long way, and we do our best to make that happen. We have a few situations where a sentence or two would go a long way in clarifying something before a user runs a report.
I have also used default parameters in the past to get the report to fully load when they first hit the page but that is not the solution I am looking for here.
Thanks in advance for your help!
Not possible to do via any provided functionality. The only way you're going to get this is if you use custom CSS sheets when accessing the report (either as a URL querystring parameter, or replacing the default stylesheets), or otherwise creating your own report page(s) to house your reports instead of Report Manager.

Different reports with similar SQL

I am writing departmental reports for my company in SSRS. Each department will have access only to the report for their department. The thing is that the SQL will be pretty much the same for each report, with department being the only variable. I'm thinking that maybe each report would link to a sub-report that would be common to them all. Is there a better way to do this?
I'm not sure how you are planning to display or send out this report. But you can use the department as a parameter in the SQL query. That way you only need to use one report. This can be passed in various different ways depending on how you are making this report available. Example, the user's profile would have an associated department.
Using one report will help tremendously down the line when you are maintaining it or troubleshooting issues.
Here's what I wound up doing:
I set up a shared dataset that did the heavy lifting with a parameter that specified the department. Each report then used that dataset, passing it the department ID as the parameter to said dataset. Works like a champ.

Should I use SQL Reporting Services 2008 for my reporting engine?

I would like to use SQL Reporting Services 2008 to generate my reports, but I want to use my own UI for specifying the report type, columns, parameters and everything. I want to be able to take these criteria, and then kick off an asynchronous request to SSRS and have the report emailed to me. Is this possible? I don't want to go all the way down the road of researching SQL Reporting Services 2008 only to find that it doesn't do what I need it to do. Also, I will have a ton of DB partitions that the data will need to be pulled from. Some reports will need to pull data from only one of these, but other ones may actually need to span different databases. Is it possible when sending a report request to SSRS to specify what servername/database to pull the data from? Is it possible to tell it to take the data from multiple databases and combine it? Thanks.
Like Crystal Reports, ActiveReports and other report generators, SSRS has two basic elements behind each report: the SQL query and the report layout. No matter what tool you use for the SQL -- it can be inline SQL in the report or a call to a stored procedure -- it's going to be the same query. Multiple databases are fine as long as you can specify them up front.
You can have parameterized queries, so the user is prompted to input the relevant filters (customer ID, product group, date range, whatever).
Doing the report layout is similar to other tools -- you drag and drop controls like labels onto the report, and set their formatting.
SSRS does provide a lot of options for distributing the report, including email. You can embed the report in an ASP.Net web page, leave it on the report server site for users to browse to, run it in the wee hours of the morning and cache it so every user doesn't have to wait for the lengthy query to run.
It's a great tool. I think it will be worth your effort to experiment with it. I would wait on creating the customized UI until you've exhausted the possibilities inherent in the tool.
SSRS is not designed with this scenario in mind, for that matter I am not sure that any out of the box reporting solution is going to have an elegant solution for this. While SSRS can do what you are asking (as well as others), it is by no means quick or easy. You seem to be looking for an advanced ad-hoc solution with dynamic sourcing of the data. I would first question the requirements and determine if the business scenario really justifies such an implementation. I would weigh custom building a solution vs your learning curve with a BI reporting solution. You may find that it is easier to just build something on your own.
I think the heterogeneous dynamic database mashup is probably going to be the most challenging part.
Depending on what your scalability requirements are, one place that has that part covered, and a report writer, is Access. (Duck! Incoming!)
I think you may be creating a rod for your own back to a certain extent as RS ships with a few interfaces for report creation.
Mind you the end product is an rdl file which is nothing but xml, so you can write them by hand if you really like.
Multiple data sources are supported, but combining them on a single control/chart/etc are not, so you'll need to configure yourself a cross database capability from one of your data-sources prior to the report request if you want to do that.

I can share a SQL Server Reporting Services Data SOURCE... what about a Data SET?

I am developing a Reporting Services solution for a DOD website. Frequently I'll have a report and want to have as a parameter the Service (in addition to other similar mundane, but repetitive parameters like Fiscal Year, Data Effective Date, etc). Basically everything I've seen of SSRS 2005 says it can't be done... but I personally refuse to believe that MS would be so stupid/naive/short-sited to leave something like sharing datasets out of reporting entirely.
Is there a clunky (or not so clunky way) to share datasets and still keep the reporting server happy? Will SSRS2008 do this?
EDIT:
I guess I worded that unclearly. I have a stack of reports. Since I'm in a DoD environment, one common parameter for these reports is Service (army, navy, etc. for those non US users). Since "Business rules" cause me to not be able to use stored procedures; is there a way I can make 1 dataset and link to it from the various reports? Will Reporting 2008 support something like this? I'm getting sick of re-typing the same query in a bunch of reports.
I am not clear if you need to share a dataset, since you have some SQL results that you need to use twice, and don't want to re-compute the same data twice, or you want to do something regarding parameters. So with this "I didn't really understand the question" preface...
You cannot share a dataset. Meaning, you can't, lets say, have a dataset returning table A, and in dataset B try to join with A.
If this is really what you want to do, you could use temporary tables to store A and then in dataset B use the temporary table. There are best practices around that, but since I am not sure this is what you need, I won't spend time talking about that right now.
If you cannot use Stored Procedures, I hope you can use a view.
Else you could leave SQL Server and use CSV sheets as data storage.