SSRS set default parameter for subscription only - reporting-services

Is it possible in SSRS to set a default parameter value for a report subscription only, but not set a default when the report is run manually?
I have the default dates I want to use for the subscription generated in a dataset, but I'd like to only use default dates for the subscription.

Here is one idea.
Select the target report and click manage.
Select Create Linked Report and Rename it to denote Subscription
Set the desired parameters for subscriptions on the new linked report.
NOTE : Parameters can be set independently for linked reports.
Point your subscriptions to the linked report.
NOTE : If you modify the original report the changes will show up in all linked reports as well.

I was able to resolve the issue by using data-driven subscription and creating a query inside the subscription to generate default parameters

Related

SSRS report change date based on subscription

I'm trying to set two different dates for the same SSRS report.
What the report basically does is check a StartDate and EndDate these dates are default to yesterday.
But I have to implement a new subscription which has to look to the beginning of the month.
I've been investigating and I couldn't see any configuration rather than change the default date, but this will break the first subscription.
I'm thinking to add a boolean flag saying "check from the first" and an if inside the SQL query.
but I would like to know if there is any better approach rather than this "hardcoded" and ugly way, using the subscription if possible.
Thanks.
You can use a data-driven subscription to calculate the parameter values for the new subscription you want to create. Write a SQL query that gets the two date values you want to use. Then you can pass these in to override the defaults. You don't even have to edit the report and it will be dynamic.

Trigger SSRS Data Driven Subscription - with Parameters supplied

I have an SSRS (2016) report that accepts a date parameter. The user selects a date and the report runs and returns one page per customer. The report also has a data driven subscription which when triggered, emails the output relevant to the customer.
My current approach is to have a text box that only some users can see and clicking the text box triggers the subscription . I do this by :
Inserting the parameter selected by the user into a table when the user clicks "View Report" button and then use the following to trigger the subscription:
EXEC msdb.dbo.sp_start_job #job_name ='job name to be sent out'
The data set for the subscription/ report then uses the parameter inserted into the table to do it's thing. This all works fine.
The problem arises when more than one person runs the report.. the second persons trigger can potentially over write the first persons parameter insert resulting in the wrong set of data being sent out..
My questions is.. is there a better way to trigger data driven subscriptions where the report needs parameter values - but the parameter value cannot be predetermined?
If my approach is acceptable, how can I eliminate the overwriting of parameter values?
Better still, how can I determine the correct parameter and pass it to the subscription? e.g. session id / user id.. etc.,
Any ideas or alternate implementations are welcome..
I've run into the same issue before, where a default table value is overwritten during processing from another user. The way I resolved it was adding a column to the default table for the HOST_ID or HOST_NAME. It's a bit of a pain because then you have pass that parameter to the report as well.
SELECT HOST_ID(), HOST_NAME()
OR
In a report parameter you can use the following expression default value to get the current user.
=Right(User!UserID, Len(User!UserID)-instr(User!UserID, "\"))
Note: Your data-driven subscription will fail if you set this as a report variable. As a parameter, it will work.

make SQL Report hidden parameter visible when creating subscription

is there a way to make a hidden parameter visible in SSRS Subscription creation ?
Something like this
The Parameter IsSchedule will be hidden/internal(not visible to normal users) but should be visible when i create a schedule for the report.
Note: the reason i want this to be possible is for my SQL to know wether the data request it is getting is for a sql report schedule or for a person who is trying to view the report.
this way my SQL query will know if the End Date parameter data should/shouldn't be updated.
You should be able to see all Hidden parameters in the Create a Subscription wizard, which you can then assign a value to.
If the new parameter simply doesn't show up, you may need to delete and re-deploy the report:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/337c7ae9-f15a-4718-9fac-e5c1d6a73f30/boolean-default-parameter?forum=sqlreportingservices

Setting Default Parameter In SSRS 2005

I have to set up a report where the user can choose a name from a drop down list. Is it possible to set a default name from the drop down list? So when the report's delivered to the user's email address, the results should be displayed of the default name's results. Is this possible?
I have tried a method to setup a default value but I am not sure if I am doing it correctly. What I did was, Open up Report Parameters and under default values, I selected Non-Queried and entered the Name which I wanted to display, but that did not work
If I am unclear, ask me and I will try my best to explain.
Thank You
you are talking about a report being delivered to the user's email, so i suppose you have a subscription set up. if so, you can set the parameter value in the subscription. you will need one subscription per user, and set the parameter in each subscription.
if you want to automate this (have the parameter set depending on the recipient), one option is to use data driven subscriptions (sql enterprise edition).

SSRS 2008: is it possible to make a report parameter NOT query-based for some linked report?

I suspect the answer is no, but here goes..
I'm using the WebForms Report Viewer on a public-facing website to allow users to report on themselves or their users (if the user is an admin user).
A report has a parameter called Users where an admin can pick a user from the list and generate a report from it. Mundane users can also view this report, but I programmatically create a linked report for each user and set the UserID value to their ID so they can only view themselves.
This works well except that the UserID parameter is query-based, and not every user is visible in the list using default settings (the user list is based off date range parameters can provide, and only users we consider 'active' during the date range are visible).
This is blowing up for mundane users that are not active for the default date range (which is the previous month).
I suspect the flow of execution is something like this:
Report loads with default parameters
The linked report rules are now applied and the value of the UserID is overridden with the ID in the linked report
UserID field is now hidden to prevent the user from changing it
SSRS can't find the UserID default value in the query results (that I didn't even want it to run) so it displays an error The 'UserID' parameter is missing a value
Through some testing I've found a perfect correlation between users not inside the default date range and users who can't view the report.
Can anyone suggest a way to make the report usable for those users that aren't in the default list? The reports are created programmatically so I do have a fair bit of control over the situation.
I would love to simply be able to mark a parameter in a linked report as no longer being query-based, but those properties are all read-only.
I really, really don't want to have to create duplicate reports to accommodate these users but I'm at a bit of a loss right now.
Any suggestions are greatly appreciated!
Go into parameter section of linked report.
Disable 'Has Default'
Click 'Apply'
Re-enable 'Has Default'
Click 'Apply'
and you're good to go!
I haven't figured out yet how to re-enable 'Query Based' as a default after removing it :(
Would be very much obliged had you found out......
Can't you just mark the param as 'nullable' then pass null in from the linked report ( you may have to alter the back end to cope with this?
Alternatively add an extra row to the 'users' day something like -1 "unknown user" then you can just watch for -1 and handle accordingly