.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SSRS Multi value Parameter

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :Sql Server

I Have a Report Parameter (single Value)@Path. The Available Values for @Path are from a Dataset.

The Values are like this. \a1\b1 , \a1\b1\c1, \a1\b2, \a1\b2\c1. Now if i select the value \a1\b1 , i will get  all of the values for under the  path \a1\b1. ie., it selects '\a1\b1%'. The Main dataset of the report has the query like this. Select Col1,Col2 WHERE path = '@Path+'%' It works fine until now.

Now I want to make this Parameter to select multiple values. So I changed the Properties of the Parameter and the SQL like        Select Col1,Col2 Where path IN (@Path). This works fine as i can select  multiple values \a1\b1 and \a1\b2 and also i can get the result correctly covering these two paths. But the problem is , i want to cover the total sub paths also. So if i select \a1\b1 and \a1\b2 i should get the result covering \a1\b1\c1 and \a1\b2\c1 also.

Please help!!

View Complete Post

More Related Resource Links

Issue with SSRS multi-parameter control


Hi Folks,

I am having the attached error with a multi-parameter filter control. This is happening only when there is just 1 value in the list.

Has anyone come across this issue and is there a solution to this? I am using SSRS 2005.

Sorry was trying to attached a snap-shot here but don't know if thats possible.

I'll try yo put the issue in words. The list box does not show the item in it. It does not render fully.



SSRS 2005 Error: Cannot add multi valued query parameter for data set because it is not supported b



getting the above error when running a report in SSRS 2005, using a stored procedure with many input parameters,

connected to a Sybase IQ database,

I want to have some of the prompts to be multi valued prompts.......

Please advise on how to fix......



MDX Query parameter from SSRS


I've a MDX Query that has where clause as shown below.
I'm designing report using SSRS 2008. How can i pass date as parameter ? I tried to setup @from and @to as parameter but not working ?
any ideas....

WHERE ( {[Date Central].[Calendar Date].[2010-04-01 00:00:00]:[Date Central].[Calendar Date].[2010-08-30 00:00:00]} )

need it to work as
WHERE ( {[Date Central].[Calendar Date].[@From]:[Date Central].[Calendar Date].[@To]} )



Data validation for datetime parameter in SSRS

Hi,   I wanted to know more about validation of SSRS parameters. I have a simple report which has a parameter called startdate of DateTime datatype. The datetime parameter in SSRS takes manual input as well. So, the user can enter any junk value. I want to ensure that the input parameter is in correct format and I want to display an error msg when the format is incorrect. My report has the following VB code for validation:   Public Function Validate( ByVal startdate As String) As BooleanIf IsDate(startdate) = True Then Return TrueElse Return FalseEnd IfEnd Function   And my report has a textbox which has the expression property set to; =Code.Validate(Parameters!startdate.Value) the textbox on the report has to display if the entered date is valid or not.   But, when i enter an erroneous date, SSRS doesn't render the report and throws a generic error. This happens even before the code written for validating the parameter executes.   Also couldn't find a way to disable the manual input for the datetime parameter. Even that would solve the problem.   Another alternative was to make the startdate parameter as string, but i want the calendar control button to be provided for the user.

ssrs 2008 R2 - report parameter with no default set throws java script error

We have recently upgraded from SQL Server 2008 to SQL Server 2008 R2....I am experiencing a problem with my report parameters on my SSRS reports. It seems that my report parameters that I do not have a specified 'default' value throws a java script error when I try and run/render the report under R2.  As soon as I put a 'default' value on the report param, everything is fine.  However, that is not the behavior we need for our reports...the user needs to pick their selection. Can anyone shed some light on this, it seems to be an AJAX problem...I need to be able to have report parameters with a list of values, but no 'default' value on the parameter.

multi-valued parameter

I need to do something like this: DECLARE @SalespersonCode SET  @SalespersonCode = '''smith'' + ',' + ''jones'''@SalespersonCode = '''SMITH'',''JONES'',''ADAMS''' SELECT * FROM Salesperson WHERE SalespersonCode in (@SalespersonCode) but I cannot get any results to return.  Is there a way to put multiple parameters in a single variable to use with in IN statement? John Schroeder* FROM Salesperson@Salesperson Varchar(100)

SSRS Report Parameter Auto selection

HI All    I have a report paramater 'ParamBranches' which list all branches say aa,bb,cc etc ... and another report parameter is 'ParamBranchStartswith' So when i type in 'a' in Branh Starts with paramter -  the 2nd parameter that is ParamBranches will be filled with "select ",  "aa"   As there is only one Branch starts with 'a' ,  Is there any way to autoselect the Branch 'aa'  in Branches list , rather than user manually selects 'aa'       Regards Sooraj

SSRS 2008 Export to PDF fails for large data with System.Exception: Parameter is not valid

Hi, We are working on Range Bar Chart using SSRS 2008. The report has huge data. It is properly displaying the data, but when we tried to export to pdf it is failing with the following exception. Exporting to excel works fine. Also if the report has small/medium data it is property exporting to PDF. It is failing only in case of huge data (we have custom page size of 28" X 14"). Of course the report has lot of expressions we used to customize the colors/text as per our requirements.   Server Error in '/Reports_SQLDEV2008' Application. Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Exception: Parameter is not valid. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:   [Exception: Parameter is not valid.]   [Exception: An error occurred during rendering of the report.]   [Exception: An error occurred during rendering of the report.]    Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream ou

Multivalued parameter & Data driven subscription for SSRS 2005

I need to create data driven subscription for our reports. Most our reports have multi valued parameters (7-12 parameters with at least 4-5 with multiple values)and need to be send to a users between the range of 25-200. So standard subscription is really not a choice.I have gone through most of the threads before. Question 1:Does any one have a solution for the SSRS 2005 regarding passing mutiple values for a parameter for the Data subscription table. If yes, could you please share the information. Question 2:I found some solutions using the SOAP API. Can any one explain that in detail- how we can do it ?Reference:http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/8ab615b4-1373-4258-bf49-c2843cfea8e9/http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=516735&SiteID=1 Question 3:Here is the other solution I found in one of the postsApparently passing in values like {A, B, C} only works when you configure the parameter values not to come from a dataset so that SSRS doesnt check for ValidValues.Reference: http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/b2c50aea-2032-4025-a155-306c00fcb856/Any commends about this solution?Thanks

Having problem accessing multi-choice parameter in SQL Query in Report.

Hi, I have a report with a multi-choice input parameter. My report contains a dataset that uses CHARINDEX on this multichoice parameter. The dataset query is in text, not in stored procedure. When I run the report I get "the charindex requires 2-3 arguments the reason being that the SQL is run as follows (You can see the multi-choice list screws up the string: exec sp_executesql N'Select test.Region [Region], test.Location [Location], nvarchar3 [Year], nvarchar4 [StatisticType], nvarchar5 [StatisticType2], ntext2 [Detail], float1 [Amount]   from [WSS_Content].[dbo].[AllUserData] UD   inner join [WSS_Content].[dbo].[AllLists] AL on AL.tp_ID = UD.tp_ListId and AL.tp_Title=''Statistics''   left outer join   (       Select UD.tp_id [ID],nvarchar1 [Region],     nvarchar3 [Location]   from [WSS_Content].[dbo].[AllUserData] UD   inner join [WSS_Content].[dbo].[AllLists] AL on AL.tp_ID = UD.tp_ListID and AL.tp_Title=''Regions''   where UD.tp_ListId = AL.tp_ID   and UD.tp_ListId = AL.tp_ID   and UD.tp_DeleteTransactionId = 0x0   and tp_IsCurrentVersion = 1   ) test on test.id = UD.int1   where UD.tp_ListId = AL.tp_ID   and UD.tp_ListId = AL.tp_ID   and UD.tp_DeleteTransactionId = 0x0   and tp_IsCurrentVersion = 1  &n

NULL label doesn't appear on drop down or multi-select parameter.

Hi, I am using SSRS 2005 SP3. I have the following query that I use for my parameter: SELECT 0 AS c1, 'NOT Specified' AS c2 UNION SELECT 1 AS c1, NULL AS c2 UNION SELECT 2 AS c1, 'Test 1' AS c2 UNION SELECT 3 AS c1, 'Test 2' AS c2 Let's call my parameter prm1. The type of prm1 is string and it has "Allow null value" and "Allow blank value" options ticked. C1 is the value field and C2 is the label field for prm1. When I preview the report, and I didn't see NULL in my drop down list,  but that record has been shown as 1 (which is the value). I am wondering if this is a normal behavior of SSRS? It's not a big deal. I can replace NULL with something else, but I am just curious. Cheers, Uzzie

SSRS 2005 Drillthrough chart Passing Wrong parameter value

Hi I have a drillthrough report that in Report A I have a week of data, showing Sunday through Saturday on the X-axis. When a data point is clicked on this chart, it shpuld pass the date of the weekday for that data point to Report B. But sometimes, it passes the prior weekday date, eg click on the Monday date data point, but Sunday's date is passed to the next report. Has anyone observed this type of behavior? I should mention that it is intermittent.   Thanks all.   Bobrpress

ReportViewer 2008 multi-select parameter alignment

We are using SSRS 2008 SP1 & ReportViewer 2008 SP1. The multi-select parameter options are left aligned in the drop-down listbox on the Report Server but when run thru ASP.Net & reportViewer, they are aligned in the center of the drop-down list. This is very problematic because the width of the drop-down is also narrow compared to the text size of the fields. I tried wrapping the ReportViewer in a Div tag (<div style="vertical-align: left; text-align: left">), but still no joy.  Would appreciate any help thanks.

How to pass current user's login name as parameter to a RDL . (SSRS integration with sharepoint)

I have a webmethod which has two parameters. One is for year and another is for Currently logged in user. I call this method in RDL file. From RDL File how can we pass Currently logged in user's login name? I tried  with USER!UserID. It is passing the USERID but i need to pass the login name(SPWEB.currentuser.loginname)  

MDX Query for Defualt Value in SSRS Parameter

Hello everybody, I am new to MDX and struggling to come up with a query that works.  I have a  SSRS report  that filters by week. I need to write a query that will run for last week as default. The query i have cooked up is: WITH MEMBER Measures.Lastweek as [Time Dimension].[Report Week].currentmember.lag(1) Select Measures.lastweek on 0, [Time Dimension].[Report Week] on 1 from [sales] This returns a null value. I have searched and searched the internet for the answer but i have found nothing. I would really appreciate some help.   Thanks.

How to use Multi DataSet in ssrs

Hi All , Am using ssrs 2005. In my Report (rdl) am using Stored Procedure to return multiple Results. For Example , While Executing Stored Procedure , it' s returning 3 select Statements .SELECT FROM Table1SELECT FROM Table2 SELECT FROM Table3 .. While using this Stored Procedure in Reports , Getting First Table Result alone ..There is no relationship with these Tables , so i can't able to use JOIN QUery also .. What's the Solution ? I want to write separate Procedure for all select Statements ??? Please any body have idea about this , help me...Thanks & Regards,Chitra.

Problem with Report parameter inside SSRS Report Viewer webpart with deployment from one server to a

Hi all,I've got this problem.me and my team have developed a lot of reports by using a SSRS configured in Sharepoint Integration Mode.For accessing these report we are using the Sql Server 2008 Report Viewer Webpart.One of its parameter is the Report ur that is an absolute url so the problem is when I move our solution from server1 to server2 I have to re-editing all pages where I've added the Report Viewer webpart for updating the report url with the new servername otherwise it's impossible to view the report.Is there any official or unofficial way to solve this problem ?many thanks
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend