Passing multiple string parameters to a another report via "Go to report" Action - sql-server

I had similar question for sub report and was answered:
SSRS passing multiple string parameter to another report
However this time I would like to pass my parameters to a different report instead of a sub report.
For the first report, my ponum parameter consist of string like 'a-01', 'b-02', 'c-44'...
and then perform a query that like
select column_X from table_1 where ponum in (#ponum)
and then user click on a expression link which send the rows to another report to perform another action via a query. such as
update table_1 set column_A = '123' where ponum in (#ponum)
My problem is I can't send the parameter as a multiple values parameter. I added an expression for user to click and added the parameter in this window
I also tried
=join(Parameters!ponum.Value,", ")
="'"+join(Parameters!ponum.Value,"', '")+"'"
In Report_2, I set up the parameter as this
Unfortunately, the report it goes to only receive the first value or the query doesn't work and parameter being the problem.
Would like to hear any idea that might work.
Thanks in advance.

Related

SSRS Optional parameter

I'm not seeing another thread that quite encompasses my scenario: the report I'm modifying has a parameter that I want to make optional, but it is comprised of 3 fields. There is a first name and last name field in which you can start typing, and with the use of a LIKE operator, the actual parameter (Authority) used in the main data pull populates with options that match:
So I've attempted ensuring that the parameters (all 3) have the 'allow blank' and 'allow NULL' checkboxes marked. I've also modified that parameter within the dataset properties to account for NULL:
Lastly, my main query's WHERE clause has the following line: and (data.AuthorityName = #Authority or #Authority is null)
When I declare this variable and set it to NULL, the query does exactly what I want it to, it pulls the data irrespective of what's in this column. But for some reason, I cannot get the report to pull anything. I click View Report and nothing happens. Any ideas?

How to retrieve a parameter value that's not set in the report?

I'm working in report builder, calling a stored procedure that has a parameter that, when null, sets itself to a certain value. I want to display what this parameter is set to on the report. From experimenting, Report Builder's parameter collection only shows the parameter as it is sent from the report.
Alternatives that I've considered but can't get to work or are sub-optimal:
Adding the parameter to the select statement. The main drawback is this won't display a value if there are no results.
Using a return value or output parameter. There doesn't seem to be a way to do this.
Re-creating the "null" logic in the stored procedure. The correct output is displayed but this is a code fork.
How can I display this value? Is there a way to show a return value or output value?
You could change the procedure to return the parameter value in a UNION ALL select so that a row with the parameter value will always be returned. That row could have NULL for all the other columns so that you can filter it out in the rest of the report.
Another possibility is to add a second dataset to the report that does nothing but get the value of the parameter based on what you pass. That, however, is also a sort of code fork. The fork could be mitigated, however, by putting it in a UDF, and resourcing the same UDF in both datasets.
Yet another possibility is to replicate the logic of populating the parameter in a Custom Code block in the report. However, that is also a code fork.
I've never worked in Report Builder interface but I do have quite a bit of experience building reports in BIDS/VS... There it's a simple matter of setting the parameter default, in the rdl, to match the default in the stored procedure.

SSRS DataSet doesn't seem to update when depending on parameter

The issue:
I'm working on a SSRS report, but have encountered some quite strange behavior when I populate a DropDown (another paramter, named "Group") using a DataSet that uses another parameter that is passed in through the URL.
The problem is that I want the Group-parameter to be updated from the URL parameter TrackerTypeID, which works absolutely fine in other cases. Though this is the first time I have a parameter depending on another parameter in its DataSet.
However if I have TrackerTypeID as a visible parameter and manually change the integer value of the parameter the DropDown parameter (Group) is updated accordingly.
What I've done:
So I have a hidden parameter that is passed in through the URL called TrackerTypeID. This parameter is then used in the where-clause of the DataSet that populates another parameter:
SELECT
ID,
TrackerGroupDescription
FROM
vw_TRK_TrackerGroup_LK
WHERE
TrackerTypeID = #TrackerTypeID
Union SELECT Null, '-- Select All --'
As you may suspect it uses the Available Values in Parameter properties to set the available values from a query.
What I expect to happen:
As you might have already suspected I wish for the DropDown parameter to be

SSRS 2012 - Pass list of values to multi-select parameter in linked report

I have an SSRS report (report A) that currently generates a comma-delimited list of user ids based on a labor category. I'm trying to link report A to another report (report B), and pass that list of user ids (contained in a single field), to report B to use in its multi-select parameter 'User Id'.
The field value being passed from A to B is "1,2,3,4", etc., but when report B loads, the parameter drop down shows no value selected.
Is there a specific format the string needs to be in for the multi-select parameter to pick it up?
I've tried splitting the field, then using the JOIN() command, but no luck.
Thanks!
CodeGrue's answer to a similar question gives a solution for passing multi-valued integer parameters:
Passing multiple values for a single parameter in Reporting Services

SSRS 2012 issue around multi valued parameters

I have a parameter question in SSRS . I currently have 3 parameters set up, Permanent Employee then select P, Temporary Employee then select T and Partner Employee then select P.
So the user selects parameter one , Permanent and then selects parameter two, Temporary and then the third parameter, Partner.
This then feeds into my sql query to return the result set....like below .
AND (A.[EMPTYPE]=#EmploymentP1
OR A.[EMPTYPE]=#EmploymentP2
OR A.[EMPTYPE]=#EmploymentP3 )
So the question if I wanted one parameter that will allow one or more of the values to be selected, Permanent , temporary or Partner
to be selected. How to do this ? So a multi value parameter in SSRS. But how do you then feed those results into the query is the bit I dont understood yet. Any ideas?
If for example your single parameter was #Employment, you would use:
WHERE A.[EMPTYPE] IN (#Employment)
SSRS Internally parses this to valid syntax before sending the query to the database.

Resources