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

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

Dynamic SQL in SSRS - Multi Value Paramaters

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

I am tring to pass comma split multi values in for a paramater in to ssrs.  The Sproc that is points to uses dynamic sql and the paramater is nested in a an oracle query

in visual studio I have multi values selected but it does not seem to work..  below is the stored procedure





--SET @EM_ITEM_NUM = '1100015' 
--SET @TIMEFRAME = '18 Months'

 declare @sqlQuery VARCHAR(8000)
declare @finalQuery VARCHAR(8000) 

SET @sqlQuery = 'select
			sum(oss.SLS_QTY) as QTY
			,sum(oss.SLS_AMT) as AMT

View Complete Post

More Related Resource Links

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.

Multi language in SSRS

hi all ,I'm a software manager that want to select a Reporting engine and develop international application , i want to know Dose SSRS support multi-languages environments(Special in Report Builder for end users) or not ? and if yes , how? thanks

Multi Value Parameters in SSRS 2005

Hi Guys, I am having a parameter 'Employee' and it is multi valued. This parameter gets values from Dataset 'Emp_Data'. It has the follwing query: Select Employee_Code, Employee_Name from Employee_Table. I tried to do this but didnt get What I exactly want. What I have done is : IN the Report Prameters tab, went to Default Values section and selected From Query option and given the dataset name as 'Emp_Data' and Value Field as Employee_Code. Now When I view it in the Preview tab. I am getting as this in the Parameter Employee text box: Employee - James, Ross, Steve, Mark, Kevin........ For some reason, the client did not like this and they wants to see default as ALL Employees (instead of all those names displayed in the text box). So Is there a way to make it as ALL Employees as default (when all employees are selected). Note : I tried in this method also : Select 'ALL' as Employee_Code, 'All Employees' as Employee_Name                                         Union                                  

Range bar chart having multi-color bars + SSRS 2008

Hi, I want to display 2 different colrs on the same bar in range bar chart. My chart is displaying project risks (MS project kind of chart). Each risk has its own start date, end date. In case of dependent risks, the start date of dependent risk becomes the end date of the risk on which it depends. Each risk has 2 parts. Lost opportunity & Remaining opportunity. I want to display Lost in red & remaining in Green. Can I display 2 different colors on the same bar? Regards, Neeraj

API SSRS 2008 for php multi-select

Hi, I use API SSRS 2008 for php .  We have create with a report builder  a report to use multi-select. In the manager web SSRS we can use  multi-select filter option. But with API i don't see the possibility to use multi-select. Is-it possible ? Regards Marc       

SSRS report, doesnt show default value in paramaters when viewed in reportserver

Hi   We have a problem where we have a report that we have deployed to the production SSRS server, when I view the paramater list on the production reporting srver the particular report has the HAS Default paramater ticked, but the default value drop down selected value is blank yet the values are available in the drop down.   When looking at this in system test the default value is loaded.   When comparing the two RDL's they are identical and when loading the report files in Development tools the default value is selected, has anyone come accross this before ?   Ben

Help with multi-dimensional dynamic datagrid in ASP.NET

I'm designing a web application in ASP.NET and I have the requirement of a dataset that expands in two directions.  The user can add any number of rows vertically, while scrolling through dates horizontally.  An extremely simplified version of the scenario would look something like:                           <---   9/1/2010  - -->Customer           # of orders   Total $John                         1         $10Bill                            2         $50Dave                         1         $30Mary                         5     

How can i generate dynamic TOC or TOC as link while making .rdl in SSRS.


hello ,

well  how can i generate a Table of content dynamically or TOC as a link so that while clicking in the TOC section it goes to the same page in pdf report output.


so can any one help me how to make TOC in .rdl design in SSRS ...plz help me out soon.



how to run dynamic sql in ssrs


I wrote a dynamic SQL. How to run it in the SSRS?




Create dynamic dropdown list when we export data to excel using SSRS.


Hi All,

I have assigned a work to create a report, that should render in excel with dropdown list. i.e. report should contain a input parameter as a table names, when user selects the table name, report should show only the field names of the selected table. Some of the field name have look up values that values should be displayed as dropdown when we export to excel.

Can any one have any idea how to proceed with this report?



Pass paramaters to SSRS Subscriptions using VS2005



Newbie here. I have created SSRS reports and built a user UI to run these reports. Now when creating SSRS subscriptions in report Manager, is it even possible to programmatically pass the delivery method (email or file share), To email address, scheduled time and date, etc from my front-end UI to the Report Manager?

Any help will be greatly appreciated. Thanks

SSRS Report Viewer WebPart dynamic dispaly in SharePoint 2010


dynamic layout or zone  for Report Viewer Webpart, the report as to take all the space possible, and I don't want the scroll bars.

Any Suggestion

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.



Integrating PPS Multi level filter into SSRS which uses SQL to pull data



I'm trying to integrate PPS filter (which is created using MDX query and its a multi select tree filter) with an SSRS report, for which the background is SQL Query. Can you please guide me to achieve this. I'm not sure how we can link the multi level hierarchy to an SQL query which is been used in the content part of the SSRS report. For example I have a geography hierarchy in a cube and I use an mdx query to create and populate PPS filter. I need to use this filter in an SSRS report for which the query is 'select col name(s) from table'. Also my hierarchy in the cube is not a natural hierarchy.

Any guidance would be really great and thank full.

- Arvind


Issue with multi valued parameters in SSRS using Oracle data source


Hi All,

I have a dataset which is getting data from oracle datasource and my Dataset query expression is

="select To_Char(Time_Stamp,'Month') as Month, Node_Name as Device,Connection,MSNAME,Monitor,Avg as Average,Max as Maximum FROM OracleDataVW where ((monitor='X' and msname in ('Y')) or (MONITOR = 'CPU Utilization' AND MSNAME = 'utilization')) and TO_Char(Time_Stamp,'Mon YYYY') in  ('"+ Join(Parameters!Parameter1.Value,",") +"')"

My parameter is multiValued parameter. The above query is working good if i select one value,however if select more than one value or all it is not giving me the data. I tried to put Ltrim and Rtrim in Join but it is giving me another syntax error.

Please help me with this

SSRS Multi value Parameter


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!!

how to call multi-value parameters in SSRS from asp.net application?


hi all

i am trying to call an SSRS report (in VS 2005) from my asp.net (web application) implemented in VS 2008 (don't ask me why, i am kind of confused by this weird arrangement too). report has been deployed to report server and it contains a multi-value parameter.

when i call report from asp.net app, i set the value for this multi-value parameter as a string and all selected values are separated by comma. i.e. i have 5 options (a, b, c, d, e), and i selected first two, the string is then "a,b".

the multi-value parameter on the report side is defined as: Multi-value selected, Allow blank selected, Avaliable values are from query (a dataset that contains a, b, c, d, e) Value field and Label field are both mapped to dataset filed (there is only one field in the dataset). the default values are from query too (same dataset). value field is mapped also.

i have two problems:

1: it looks to me that all available values are selected on the report side, regardless what i really selected and passed over (when i turn on paramters).

2: when i turn off parameters, i need to display what values being selected as a string, the join statement, join(Parameters!TeamLead.Value), gives a list of all available values for the multi-value parameter, however, i only need selected values. h

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