Pass a parent datetime parameter to a drillthrough report - reporting-services

I have a main report and a drillthrough(child) reports. Both work very well. But there is an issue with passing parameters.
prodID and #Date. On the main report you would click on the prodID to provide the prodID for the child and that is good. Now, the issue is passing the second parameter(#Date) to filter the result set returned but it happened that there is no matching column to match the #Date parameter to when setting up the Action dialog box because there's no such a column as a datetime data type in the child report except in the where clause. Before now we would have to supply the #Date value manually. How do I modify my query or work around this so the #Date parameter is passed on to the child report as well at run time?
Thanks for the help

in the action dialog box, instead of selecting from the drop down insert the following
=Parameters!Date.Value
you could also press the fx button and the browse to your parameter

Related

Cascading parameters in SSRS reports doesn't work with one parameter value set to a default value

I'm trying to run an SSRS report with cascading parameters.
I have 2 parameters para1, para2.
I have made para1 as a hidden field and assigned para1 a default value.
I have set para2 to take available values from a dataset.
I'm trying to populate para2 drop-down based on para1's default value.
My query for populating para2 is
SELECT column2 FROM TABLENAME
WHERE (column1 = #para1)
(here column1, column2 from Database refer to respective para1, para2 parameters in report)
I have my query working fine with the database and I see filtered result but gives me an error when I click preview on BIDS.
Error:
The report parameter ‘para2’ has a DefaultValue or a ValidValue that depends on the report parameter “para1”. Forward dependencies are not valid.
I'm unable to figure out where I'm going wrong. Please help me find my mistake. Thank you.
Change the order of your parameters in the parameter list.
On the menu bar click View>Report Data
Then highlight one of the parameters and click the up or down arrow (depending on the highlighted param)
The up and down arrows are located at the top of the Report Data list. You should end up with Para1 being above Para2 in the parameters list.

ssrs forward parameter and available values

I have a drill down report in ssrs. Trying to pass the value of a parameter from parent report to child. Now in child report i already have a set of available values for that parameter. What i am trying to achieve is, when the child report loads the default value should be the one I am passing from the parent report and the report data should get loaded based on that and after the initial load the user can select form the drop down and refresh the report. For me the problem is when the child report is getting loaded its not taking the value of the parameter passed from the parent report.
Kindly help. Thanks.
I've set up a dummy report that does what you asked for and found that SSRS will just not work - not give an error at all - if you don't have it exactly right.
Here are the steps I followed to make it work.
Create the parameter on the parent report and ensure it is set and that you are setting it either at run time or via default.
Ensure that the parameter you want to SET exists in the child report and has NO default value (this may not be necessary, but will help with debugging if it goes wrong)
Make sure the child report parameter has the the available values for your drop down set and that the one you are passing is there
Set up the drill through using the action section of the properties and Go to report
Specify the drill through report
Choose the parameter from the Name drop down (the available parameters in the child report WILL be there) and set the Value to [#ParameterName]
Test
If you don't want a parameter on the parent report and just want to hard code the value you can skip step 1 and change step 6 to just use the value.
you need to set the default specific value to the parameter so it will not show you "Select Value" in dropdown list.
Once you send parameter from Parent report it will set the value.

dependent parameter does not refresh after first parameter is input

My SSRS report (2008 version) has two parameters. The first is a textbox receiving input for Supervisor' userid. The second is a drop-down which depends on the first parameter to show the all the staff name working under the supervisor. My questions is how the second parameter can refresh automatically after I input the first parameter in the textbox. Do I need a hidden parameter?
In parameter window go to advanced mode and select auto refresh always
In parameter properties for your first parameter, go to advanced properties an select always refresh.
Make sure that your first parameter name is the same as the #user_id used for your second parameter.
The first parameter doesn't need a default.

Using column from main dataset as multi-value parameter in subreport

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.

Parameter missing a value

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.