SSRS Toggle Parameter Between Multi-Value And Single Value Based On Another Parameter
Feb 4, 2008
I would like to be able to adjust the multi-value property of a parameter based on the value of another parameter in my report. The controlling paramter would be binary with two options for Single or Multiple selection. I would like my parameter to default to multi-value, which I can do on the screen selection. I have tried to add an IIF statement to the XML code, with no success. Any ideas would be helpful.
I'm using SSRS 2005 which connects to SQL Server 2005. I need to pass Multi valus for single parameter...
E.g. Command type : Text SELECT * FROM COUNTRY where CountryId IN ( @CountryID)
If i tried to preview using single parameter, it shows the record without any problem. However when i tried to put multi values, it gives error message?? I read somewhere which says, need to set to multivalue. But, i could not find the place to set the multi value option...
How to solve it?? Your suggestion/recommendations greatly appreciated.
Hi, I have a matrix report containing a parameter.The count of groups may change based on the parameter's value.Also these groups are connected to each other with toggle property. For example; --If the parameter's value is "year", the report have three (year, month, day) groups.Day is connected to month and month is connected to year with toggle property. --If the parameter's value is "month", the report have two (month, day) groups.Day is connected to month with toggle property. --If the parameter's value is "day", the report have one (day) group.There will be no toggle property.
The question is: I wrote expressions for this report and set the visibility properties of the groups, but when I select the "day" or "month" value for the parameter, no groups are shown.I think the reason is "being connected to each other with toggle property".
Hello I created a table adapter with the following query select * from building where buildingname in (@param1) I used the query builder to the test the query and it works ok if I pass a single value ex: name: @param1 value: Building1 but when I use the value: Building1, Building2 then it doesn't return anything If i do a direct sql: select * from building where buildingname in ('Buiding1','Buiding2') returns many rows. Now I have a class that has the following function<System.ComponentModel.DataObjectMethodAttribute(ComponentModel.DataObjectMethodType.Select, False)> _ Public Function getBuilding(ByVal building As String) As myDataSet.buildingDataTableReturn adapter.getBuilding(building) End Function When I call this function I try to pass the building value sorta like dim building as string = 'Building1,Building2' and it doesn't work. I tried a whole bunch of variations. How are you supposed to format the parameter string? Thanks Peter
I got issue when passing multiple values to a single parameter. Here is my stored procedure as following:
CREATE PROCEDURE [dbo].[School] @Grade AS varchar(50), @Class As varchar(50) AS BEGIN SELECT Name, Grade, Class FROM School WHERE Grade = (IsNull(@Grade, Grade)) AND Class IN (IsNull(@Class, Class )) END
In the front end, I got multiple values for Subject parameters such as Math, English, Reading, etc... in a specified class. How do I can modify my above stored procedure to receive multiple values for a single parameter.
DECLARE @ServerCIName varchar(5000) SELECT * FROM dbo.INC WHERE Status in ('Assigned','In Progress','Pending') and Description like '%' + (Select * from SplitDelimiterString(@ServerName,',')) + '%' and (select DATEADD(dd, DATEDIFF(dd, 0, (Submit_Date)), 0)) = (select DATEADD(dd, DATEDIFF(dd, 0, getdate()), 0)) In place of "and Description like '%' + (Select * from SplitDelimiterString(@ServerName,',')) + '%' ", if I use "and Description like '%' + @ServerName + '%' " and pass a single value, it works.
But @ServerName contains multiple values and it is dynamic (not constant).
how to handle space between multi-value parameter values in SSRS. For e.g. if the values are as follows -'KLO LUG', 'HGY KIU', 'LOT JUY', I know I can use the split function for the commas but its the space between the value which is the problem.
I have an SSRS report with several variables, some of which are multi-valued. The main query that feeds the report uses some table value functions. For example, the query looks something like this:
select tv1.a, tv1.b, tv2.x, tv2.y, tbl.m, tbl.n from tableValueFunction1(@MultiValueParam) as tv1 inner join tableValueFunction2(@MultiValueParam) as tv2 on tv1.xxx = tv2.xxx inner join regularTable as tbl on tv1.xxx = tbl.xxx
where tbl.abc in (@MultiValueParam).When I try to run this, I get an error saying that I'm feeding the wrong number of parameters into the table value functions. I've fed multi-valued parameters to stored procedures before and used a splitter function to split out the comma separated values, so I was planning to do the same thing in this scenario. However, this is different. When I look at the query in SQL Profiler, it shows discrete values for the multi value parameter. For example, the same query above looks like this when viewed through the profiler (using 1,2,3 as my multi-value selection):
select tv1.a, tv1.b, tv2.x, tv3.y, tbl.m, tbl.n from tableValueFunction1(1,2,3) as tv1 inner join tableValueFunction2(1,2,3) as tv2 on tv1.xxx = tv2.xxx inner join regularTable as tbl on tv1.xxx = tbl.xxx where tbl.abc in (1,2,3)
In other words, SSRS isn't converting the multi-value parameter to a comma separated string, like it normally does.
I am trying to get a null value to pass to a multi-select parameter in SSRS 2005. The multi-select box is getting its possible values from the following query:
SELECT NULL CMP_ID, '<all companies>' COMPANY UNION SELECT DISTINCT T1.CMP_ID, T1.COMPANY FROM VIEWCOMPANYLIST T1 WHERE T1.DIV_ID = 2 ORDER BY 1
This query is pre-pending a row with NULL as the first ID. The resulting data set is exactly what you would expect - Row 1 has a null in column CMP_ID, and <all companies> in column COMPANY. All the rest of the rows have proper data. My multi-select parameter box is of type Multi-value Int, with possible values populated by this query and a default of NULL. However, when I preview the report, the <all companies> row disappears.
It's not even in the list, and it's not getting selected by the default selector. So, of course, when I try to View Report without selecting anything, I get prompted to select a company. Why the prepended row in my dataset is getting dropped from the multi-select box at display time? And yes, I have to be able to pass a null value because the stored procedure on which the report is based expects this parameter to be optional.
I have two report , first is main report which is matrix and have one parameter User_ids which is multi value selection and my second report is basic chart of user_wise performance.
Now, my main report (matrix ) works fine for Multiple selection of users and i have putted one textbox on main report chart which has action properties set for chart report, when user click on chart button it must goes to chart with user selected in main report. Now , i have used expression for parameter to send it like ..
=join(parameter!user_id!value,",") which pass selected value to chart
And when I am selecting single user it passing that value to chart parameter list but , when it is more than one user it errors with conversion failed when converting the nvarchar value '121,128' to data type int. But my chart also works when passing 121,128 in user parameter in preview of report .
I have a question regarding how to use report prompts in SSRS reports that are based on SQL queries. When I added the prompt into the query for use as a filter value, it says that there is an error. It does not recognise the '!' inside the parameter prompt string. Example is parameter!month_prompt.Value, which the ! is not recognised.
I have created a report using Report designer (Visual Studio, using Data Model as a data source), in the report I had created few datasets (with single filed) to populate the report parameters, lets say I have created a multi valued Parameter CustomerName and assigned field from a dataset,
result are coming correctly and combo box is getting populated but the customers are not in alphabetical order!
I want to sort it and need to specify it in report (please note that I am using Report Model as a data source and I cant sort the source table in the data base to get the result sorted)
Please let me know if anybody has done that or forward me if know some link which talks about it.
There is a multi value parameter called "include" in the report where "Allow Multiple Values" is checked and it has 4 Available values as shown in the attached screen shots and preview of the report is also shown .There is no data set for this parameter and the values will get displayed on the report based on the visibility condition set in the report.Example : If first value is selected then 1 is passed and based on the visibility condition set in the report - the report output is displayed.None is default value and has value 4 and when the report is run with this option i.e. "None" then rest three parameter values are not applicable .
Requirement : -When the end user selects (Select All) Check box then (None) -check box must be disabled or must not appear for selection for the end user -When the end user selects check boxes either of the first three except None then also None check box must be disabled or must not appear for -selection for the end user -when the end user selects a combination of first three then also None check box must be disabled or must not appear for selection for the end user -The None is set as default with a value as 4 and is applicable only when the user does not select either of the first three values and the report will run.
I have 2 tables in my report, a multi value parameter (tp_title) is passed to the report. I am trying to hide the first tablix with this expression in the visiblity option of the tablix properties.
=IIF(Parameters!tp_Title.value = "Financial Years" or Parameters!tp_Title.value="ALL", False,True )
I get the error: The Hidden expression for the tablix ‘Tablix1’ contains an error: Overload resolution failed because no Public '=' can be called with these arguments: 'Public Shared Operator =(a As String, b As String) As Boolean': Argument matching parameter 'a' cannot convert from 'Object()' to 'String'.
When I render the report. How the tablix can be made invisible based on the parameter?
I created the report, which has 4 pages. Each page contains bunch of tables and charts, which display data in scope of dataset, created for each page and reflecting certain subject. Each page also has Header and Footer.
My users requested, the report has possibility to include or not include data on Page #4.
Other words, report should display 3 or 4 pages based on the entered parameter.
1. I created parameter named “Include #### metrics”, which contains options: Y, N 2. For each object on the page 4 I added dependency on the selected parameter in the visibility option.
Now if user select parameter Not include Page #4, report displays 3 pages as expected and page #4 is empty, but with Header and Footer.
The problem: Their preference is to not to show page 4 at all if someone chooses to not to include #### metrics.
My question is how to force the report to display just 3 selected pages.
ID Name Date 1 A null 2 B 01/01/2012 3 C 01/02/2013
Also, I have a sort parameter @sort and values are (Name, ID, Date)
I want to apply page break whenever @sort=Name. There should be no page break when user selects @sort = ID or Date. Page break should happen only when @sort value = Name
it should be like this...
Page 1: ID Name Date 1 A null Page 2: ID Name Date 2 B 01/01/2012 Page 3: ID Name Date 3 C 01/02/2013
Does anyone know if this is possible right out of the box in SSRS 2005 against an OLAP data source?
I have several parameters. My second parameter is to be filtered based on the first parameter (kinda like cascading), but how do I do this against an OLAP data source? Lets say I have param1 and param2 in a dataset. I want Param2 to show the locations only based on what I select in Param1. Same but a little different: I have Parameter1 and then my second parameter (Param2) is a boolean (True/False). I want to show Parameter 3/Paramater 4 based on selection of Param2 (So, if true, show Param3, if false, show Param 4) and remember we are doing this in a sequence. Can you do this thru SSRS? Any help would be great. Thanks for your time in advance. Kent
Is it possible to fill a parameter list with values based on another parameter value? Here's what I have so far (which hasn't worked)... I'd like to generate a report listing information for a student. The report viewer would first select a school from the first drop-down menu, and then the second drop-down menu would populate with the list of students at that school. I have a dataset that calls a sp which returns a list of schools (SchoolID and SchoolName fields from the database table). I have another dataset that calls a sp (with SchoolID as the parameter) which returns a list of students for that school. Both datasets return the appropriate data when tested individually, but when I set up the Report Parameters and build the report, these errors come up... The value expression for the query parameter '@SchoolID' refers to a non-existing report parameter 'SchoolID'. The report parameter 'Student' has a DefaultValue or a ValidValue that depends on the report parameter "SchoolID". Forward dependencies are not valid. ...Is it possible for the reoprt to generate a list of available parameter values based on the value selected for another parameter? Any help you can give me would be great!! Thank you
I am using reporting services 2012, Can we make visibility of report parameter dynamic, ie can we make parameter visible or hide on certain condition or its visibility depends on other parameters Is this feature available in any other updated version of ssrs?
I have a report parameter called para1 which is a drop-down list and what I want to do is display another report parameter based on the para1 selection.
So for example, para1 contains a, b, c choices. if a user selects b, I would like para2 to display but if the user selects a or c, I don't want the para2 to display.
I have a fairly complex report that was given to me that was hard coded for single parameters. There is a dropdown for each market (created from a query in SSRS). The users have to run for each market each week.
Is there a way to use this report as a Sub-report inside a list of a master report and then use a mult-value parameter?
I want this multi-value parameter to build the values for the list and then run the "sub-report" for each value.
I need "conditional" cascading parameters: In Report Manager when one changes parameter 1, parameter 2 get changed based on parameter 1. Optionally, one can also enter values to parameter 2 directly.
I was able to achieve this in SSRS 2000 (SP2) with the following setups. SSRS 2005 and SP1 no longer works - Parameter 2 always shows its default value regardless whether one select a value in Parameter 1 or not.
Parameter 1 available values: from query default values: non query (specify a value "<None>") Parameter 2 available values: Non query (no value specified) default values: from query (based on Parameter 1)
It seems to me that the default value in SSRS 2000 is considered as cascading parameter. But it is no longer the case in SSRS 2005.
Is this a SSRS 2005 bug? is there any other work arounds or suggestions?
I'll go to a dataset, open up the query designer, add a new parameter, then refresh the fields, but the parameter won't be added as a report parameter. If I go to the dataset properties under the list of parameters, the value in the dropdown will be blank. However, sometimes this will automatically add.
Is this a bug in Visual Studio? How do I get around this?
I have this semi-complex query that is selecting items from numerous tables residing on 2 different databases. So far the query works perfectly. Here is the problem: The user is given the option of selecting items based on whether a course is Completed (C) Incomplete (I) Passed (P) Failed (F) or (ALL). I am not really sure how to do the select all, the others I can do depending on the value...
Any thoughts??
Query:
sql Code:
Original - sql Code
ALTER PROCEDURE [dbo].[Sel_CourseActivityPerUser] ( @status varchar(25), @course varchar(100), @datesmalldatetime ) AS
I am not sure this is the correct place to post this question, but here it is. I am trying to pass some parameters to SSIS from a report using the report parameter, then SSIS will create the datareaderdest and return to the report to use.
Anyone have any idea, guidance or leads please share it out. Thanks in advance.