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

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

Related

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

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.

How to display a multi-valued parameter onto a SSRS report in a specific way, separated in ranges and/or commas

In SSRS I need to display a multi-valued parameter onto the report in such a way that if values are chosen in sequence they appear as: 1-5, 7, 9-10, 15 and so on. And I have the following values in my drop down list of values: from '0' to '200'.
Thanks in advance for your help.
This is what I have done in SQL so far, so I am thinking to update 'String_To_Use' column so it would display: 0000-1020, 1199-1210, 1260, 1299. Then use this string to display onto the SSRS report. These are the values chosen in SSRS from the drop down box. I don't know yet how I would pass these values to the SQL code yet. Please help with this part as well.
This is the #tempTable1...column 'DPRTMNT' has the values chosen ...Checking_Dept has the value-2 when values in ranges
This is the #tempTable2..I need to update 'String_To_Use' column so it would contain: 0000-1020, 1199-1210, 1260, 1299. #tempTable1 can help to build the logic
replace dsBranchPlant with name of your data set that your using to supply data parameter. And "All" condition is if all params are choosen instead of showing each one. Game this up as an expression and see where you stand.
iif(Parameters!BranchPlant.Count = CountRows("dsBranchPlant"),"ALL",Join(Parameters!BranchPlant.Label,","))

Printing records with condition Crystal reports

I am using stored procedure in mssql as backend, vb.net as frontend (just info).
There are a lot of records in the database and I am printing in crystal reports.
Now I want to filter the records from crystal report and not by adding a new parameter to procedure or changing database structure or else.
For now,Say there are columns : Name , Amount.
I want to put filter in amount like only display records whose amount above 100 or something. So other records with less than 100 should not be displayed.
This filter will be passed by the user so it'll be random.
I can't find a proper answer on internet. Might be a duplicate question, if so please post the link of the question if it is duplicated.!
Thanx anyways...!
In general the idea is to:
Create the parameter (user choose what will be the input/value) - link
Set filters, what values should be displayed in regards to parameter - link
On right side there is a DataExplorer window, where You need to add a Parameter (define his name, what question will be shown to user and what type the param will be / what values can be set inside).
Once done, You can jump to Data tab of a report, click Interactive Filter and specify which column must fit what condition with what value = Parameter (that one user will enter in Report).
Example: I will create AmountParam, with message "What should be the minimum amount?". Type will be set to Integer. Going to Report->Data->Interactive Filter, choose Amount as a Column, AmountParam as a Parameter and set condition Greater then (>).

SSRS parameter returns a data type that is not valid

I got the Tumbleweed badge for this question.... :)
I've moved on a little from the original question but still looking at using internal/hidden parameters, this time passing to another report which runs a stored procedure (which sends an email).
The main report (report A) has a parameter called StudentCourses (originally called ReportParameter1) which I have tried both as Hidden or Internal, and currently has ticked Allow blank value and Allow multiple values.
(Its default value is a field from the result of a query, which shows the courses a student is enrolled on).
Action for my textbox no longer goes to URL (to open PHP form) but now uses Go to report to call report B. Under action options I've added two parameters; StudNetworkID and StudCourses. The number of courses can vary from 2 to 5.
The new report (report B) has two parameters also called StudNetworkID and StudCourses; both are Hidden and StudCourses has ticked Allow blank value. [All parameters are text, btw].
If Report A StudCourses is set to =Parameters!StudentCourses.Value(0) then the first course is shown on Report B. So far so good.
If Report B StudCourses is set to Allow multiple values, then Report B shows #Error and the Warning description given is "[rsInvalidExpressionDataType] The Value expression used in textrun ‘Textbox3.Paragraphs[0].TextRuns[0]’ returned a data type that is not valid."
If Report B StudCourses is set to NOT Allow multiple values and Report A StudCourses value is set to [#StudentCourses] then Report B shows the text "[#StudentCourses]".
If Report B StudCourses is set to Allow multiple values again, then I get the same invalid data type error as before.
Having turned off Allow multiple values on Report B to avoid the #Error issue...
Setting Report A StudCourses to =Parameters!StudentCourses.Value(0) & Parameters!StudentCourses.Value(1) then Report B shows course 1 and course 2 on one line. OK so far.
However, setting Report A StudCourses to =Parameters!StudentCourses.Value(0) & Parameters!StudentCourses.Value(1) & Parameters!StudentCourses.Value(2) gives me a runtime error that the Index was outside the bounds of the array (because there are currently only two courses). On clicking the textbox, Report B just says "The 'StudCourses' parameter is missing a value".
OK...
I turned off Allow multiple values on Report A StudentCourses parameter (the one holding the result from the query) and for the Go to report parameter StudCourses I added the other values, so eventually had value(0) to value(4), the result was interesting. For each parameter value used it gave me a letter from the first course on Report B. Hence when I included up to value(4) it gave me the first five letters of course one!
Yep, ok, this is because it is no longer reading multiple values and so specifying a number just returns the letter from that position.
SO...
How do I allow for up to 5 courses to be passed over???
What follows below is the original question
I have a small report designed in Visual Studio that displays courses that a student is enrolled on. The number of courses can vary from 2 to 5, depending on the student.
Also on the report is a text box, which when clicked will action a url to open a PHP form.
I have worked out how to pass the user id to this PHP form but, if possible, I would also like to pass the course titles.
If I use internal report parameters* I can add these to the url, like this:
="http://myurl/webform.php?param=" & Mid(User!UserID,InStrRev(User!UserID,"\")+1)
& Parameters!ReportParameter1.Value(0)
& Parameters!ReportParameter1.Value(1)
& Parameters!ReportParameter1.Value(2)
& Parameters!ReportParameter1.Value(3)
& Parameters!ReportParameter1.Value(4)
but unfortunately I get the runtime error "The Hyperlink expression for the text box 'Textbox7' contains an error: Index was outside the bounds of the array."
If I just put the first two report parameters it works fine.
I tried using parameter count, e.g. iif(Parameters!ReportParameter1.Count > 2, Parameters!ReportParameter1.Value(2), " "), but I still get the same error.
Please can someone show me how to get around this runtime error, or suggest another way to do this?
Thanks
PS * Report Parameters set up as Text, Allow blank value, Allow multiple values, Internal, Available Values = None, Default Values = Get values from a query; Value field = course title.

Conditional report parameters in Reporting Services

I have a report which requests a parameter value for customerNo. The report should return all values by default.
Once the user provides a single customerNo value, then it should display the specified record only.
I've found solutions for Multiple selection, but couldn't find for single text box entry.
Thanks guys..
Report Design
Change the report parameter to allow NULL:
Modify the WHERE clause of the data set to check NULL parameter value:
Report Execution
When the report is run, users can check NULL for all rows:
Or rows matching a specific value:

Resources