I am having a problem getting query-based parameters to refresh in SSRS when the View Report or Refresh button is clicked. To illustrate the problem, I created a report with 2 parameters. 1 parameter is set to get the timestamp Now() using the SSRS function. The other parameter is set to get the value GETDATE() from a SQL Server database query. When I view the report, both parameters accurately get the timestamp. When I hit the View Report button or Refresh, neither parameter refreshes. The only way I can get the timestamps to refresh is to re-open the page up in a new browser. Is there anyway to get these timestamps to update without having to open a new page/session? Thanks!
Fix: Build a main report with no parameters. Embed a subreport to your report. In the subreport, build a parameter called RandomTime. In the main report, go to Subreport Properties and feed the parameter RandomTime with the Value =Now(). To properly refresh all of the query based parameters in the subreport everytime you hit refresh, they must depend on RandomTime. The easiest way I found to do this add a column to the SQL query like this SLECT #RandomTime AS DummyColumn. It ensures that the query will repull and all the parameters will refresh everytime the refresh button is clicked
Do this: Create a master report and add your report as a sub report. Make a dataset on the master that runs your sql query. Then, pass the result into the sub report parameter as an expression.
Example--- =First(Fields!YourValue.Value, "DataSet1") ---
Related
I have a report. The report has a header. Sometimes, users view my report by itself. Other times, they view it as part of a larger combined report.
The combined report also has a header. So, in 'subreport mode' my report ends up with two headers.
I want to hide the header of the subreport, but only when it is a subreport.
I'm hoping for something like Visible=IsSubreport. Is there a way for my report to tell if it is running as a subreport? Or do I have to add a new parameter and pass it in from the outside, telling it whether it is a subreport or not?
You can add a parameter as isSubReport to you report like this:
And then pass "true" from the Sub report properties menu.
Scenario - I have a multi-value visible (user defined) parameter that I use in the dataset query, and I have a link in the report that directs the user to the same report (but it does something else that is irrelevant to this topic). However, when the report reloads, the user has to set the parameter again from the drop-down list.
Question - Is there a possibility to pass the parameter that the user already set the first time, and reload the report without forcing the user to set it again?
What I tried so far (with no success) - I tried passing the following parameter values to the report:
Parameters!param_name.Value(0)
param_name
[param_name]
The answer is - Yes, it's possible.
Have you tried - "=Parameters!param_name.Value" without "(0)" ?
Go to the Action tab of the Text Box Properties, select "Go to report" as Action, specify your current report as the destination report. And choose the parameters.
It works.
I have one SSRS report with two linked reports pointing at it.
One is for users to click and view their data. Behind the scenes, I need it to pass User!UserID as a parameter and hide it.
On the other report, I need to set up a data driven subscription that passes the UserID as a value from the database.
If I publish the report with the parameter defaulted to a value of User!UserID, it will not let me save the subscription and gives an error of
"The '/Admin/Subscriptions/Recruiting Sign Ups' report or shared dataset has user profile dependencies and cannot be run unattended. (rsHasUserProfileDependencies) Get Online Help"
If I remove the default value from the report definition, the subscription works but I cannot get the other linked report to pass UserID as a hidden parameter using the Parameters tab on the SSRS interface (rather than in the RDL definition).
Is there a workaround to this that does not involve VB?
So to rephrase you have report A which you use as a subreport in reports B and C. to be able to make a subsciption to report A you need to remove the default value for the user parameter. the user parameter in report A is hidden and with a default value because you don't want users to be able to set it to someone else.
so there are two ways to solve the issue: get data driven subscriptions accept a default value, or find a way to pass parameters from reports B and C
pass parameters from report B and C:
the interface won't allow you to set hidden parameters, but it works. just open report A, change the parameter to visible, open report B and C, map the parameter, go back to A, set the parameter to hidden again.
get data driven subscriptions to accept a default value:
SSRS tries to be smart by finding out that the parameter has a default value set, but it shouldn't be too hard to fool. try getting the default value from a dataset which uses a sql username function, or something in this direction..
Hi I am using SSRS 2008.
My set up is MainReport with dataset1 and 1 parameter - OrderID. One of the columns in dataset1 is ShippingID.
My other report called - SubReport has 1 multivalue paramter - ShippingID.
I am trying to use ShippingID from Main report as multi-value parameter for Subreport.
I tried different threads here but mostly they are diffrent than my scenario.
How do I go about setting this up, is that even possible?
I have been trying to set it up for whole day but unsuccessfully.
In my scenario one Order can be on multiple shipments.
One of the things I tried is creating new multi-value parameter in MainReport - call it shippingIDs_sub and mapping its default value to dataset1.ShippingID. But when I try to run report I get error "The 'shippingIDs_sub' parameter is missing value" - because my MainReport would sometimes return NULL in ShippingID column.
My scenario is very much similar to this
SSRS passing parameter to subreport
although I sometimes get NULLs in the column used as source for multi-value parameter.
Is there any way to filter out NULLs and run subreport only for existing IDs?
In the Action where you call the sub-report, where you map to shippingIDs_sub, use an expression to pass some valid value whenever the value in your dataset is NULL.
=IIF(IsNothing(Fields!ShippingID.value),"Some Valid Value",Fields!ShippingID.value)
As to this:
Is there any way to filter out NULLs and run subreport only for
existing IDs?
No, you can't turn off the ability to go to a subreport, but you can "hide" it by changing the appearance of whatever your user clicks on so that it doesn't look like it's clickable. For example, in our reports, when something is clickable, we make it underlined in blue. So if I don't want to user to click it, I just make it the same font color/style as all the other text. But it doesn't stop a determined user from clicking on it anyway if they want.
I am new to reporting services and have a reporting services 2005 report that I am working on to use as a base report template for our organization. I am trying to place the date that the report was last modified on the report server into the page header of the report. However, I keep getting a 'ParamX' parameter is missing a value error when I try to This is what I have done:
Set up a Parameter ReportName with a default value of Globals!ReportName. It is also hidden and internal.
Set up a Dataset ReportHeader that calls a stored procedure that returns the date the report was last updated or another date, if the report is not on the report server. It has a parameter #ReportName assigned to the Parameter!ReportName.Value. The Dataset returns values when run on the dataset tab in the BI tool.
Set up a Parameter ReportVersion that has a default value Query From based on the dataset ReportHeader and picking the ModDate column. It is the last parameter in the report parameters list.
I assign a textbox to the parameter.
When I preview, I get "The 'ReportVersion' parameter is missing a value whether I place it in the report body or page header (which is where I want it). I have deleted and added the parameter again, toyed with the hidden and internal settings on it.
What does this error really mean, what I am missing, and can I even do this with parameters?
Thanks In Advance
Jim
If I understand what you're doing, it sounds like you want to be using a field where you're implementing a parameter...
You are returning the ModDate from the data source, correct? If you're doing this, you can simply throw a text box in there, and use something like this: =Fields!modDate.Value to display it.
Parameters are values that go in to the query, fields are what it returns.
Hope this helps...
EDIT:: OK so are you trying to retrieve the mod-date column value from the reportserver db? If that's what we're talking about, you'll need to add a few things to the report. Add a datasource to report db, a dataset containing the date (query below), a list object in the report linked to the dataset, and a textbox in said list object to display the field. If you hit the report server with a query like this:
SELECT MAX(ModifiedDate) AS ModDate FROM catalog WHERE name='myReportName'
That will return your modifieddate from the ReportSErvices Database as a field that you can use.