.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

multi value parameters with ODBC connections

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

I am trying to pass in a multivalue value parameter as a report parameter.  I am able to preview it in the "Data" tab in Design view with the "Run" icon.  On the "Preview" tab, I am able generate the data for the 2 parameters.  But, when I try to view the report, I get an error.  It states, "An error occurred during local report processing.  An error has occurred during report processing.  Cannot add multi value query parameter '?' for data set 'EMS' because it is not supported by the data extension."

I have found some online suggestions that recommended joining the parameters.  So, on the "Parameters" tab of my Dataset, I have added =Join(Parameters!Location.Value, ", ").  This is pulling the values from the other dataset I'm using.

I also tried putting the entire select in the "Parameters" tab of the Dataset, sort of like this "=SELECT <column> FROM <table> WHERE <column> in ('" & Join(Parameters!Location.Value, ", ") & "')".  But, this doesn't work.  Maybe I didn't do it correctly.

I need to use ODBC connections because we need to keep our SQL environments abstracted as the reports are moved from development through to production.

Any suggestion

View Complete Post

More Related Resource Links

DVWP connections with multi-select lookup columns

I have a question concerning the Data View Web Part using SharePoint Designer 2007.   I have two list (A and B). List A has a lookup column (called B-items) with multiple selections to items in List B(using the Title column from B).   I create a web part page and insert a data view of using List A. I create another data view with data from List B. Next, I make a Web Part Connection between the two data views with A passing B-items column as parameter to List B data view. I then create a filter on the List B data view with a comparison of List B’s Title column equal to the parameter of List A’s B-items value when a user selects an item from List A data view. The problem is nothing appears in List B’s data view.   When I try the reverse of the above scenario it works fine.     I understand that this is properly functionality, but is there a way to achieve my first scenario? If so, how can it be accomplished?   I have looked through the web for help and found the answer here http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/749b7477-f37f-4724-94b3-b6ace770e73a seems to be what I’m looking for. However, I am unsure how to implement his code into the web part page.   I am a worse than a novice with xsl so if anyone gives an example I would greatly appreciate step by step on what code is needed a

Report parameters bomb out using wildcards with multi value parameters

SQL Server 2008 Latest release I have a report that I have setup (using BIS Visual Studio 2008) for user required parameters (multi valued possible). I have tried adding the like value in the report parameter values in Visual Studio and it just does not like it, example -  LIKE ('A%'). If I enter a valid value without wildcards it works fine Example employee id # A001234. Anyone have any ideas as to a solution?   SELECT        DATAAREAID, TRANSDATE, JOURNALID, PRODID, EMPLID, HOURS, HOURPRICE FROM            Production_Direct_Labor_Hours WHERE        (DATAAREAID = @DATAAREAID) AND (HOURS > 0) AND (PRODID = @PRODID) AND (EMPLID IN (@EMPLID)) AND (TRANSDATE BETWEEN @STARTDATE AND                          @ENDDATE)

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                                  

How to pass multi-value parameters to DDS (data driven subscription)?

Using RS2005, how should multivalue parameters be stored in a database field so that a data driven subscription can properly read and use them?  I have so far had no luck using syntax of: 1)  parm1, parm2 2)  parm1,parm2 Do single qutoes need to explicitly wrap the values?  Can you please provide an example and a SQL INSERT statement using parm1 and parm2 to demonstrate what to store in the database field?  Thanks!!

Setting multi-value parameters using ReportExecutionService

Does anyone know how to set multi-value parameters using ReportExecutionService in C#?   If I have   rsExec = new ReportExecutionService2005.ReportExecutionService(); . . . ReportExecutionService2005.ParameterValue[] parameters = new ReportExecutionService2005.ParameterValue[2];   parameters[0] = new ReportExecutionService2005.ParameterValue(); parameters[0].Label = "Report_Begin_Date"; parameters[0].Name = "Report_Begin_Date"; parameters[0].Value = "4/15/2007";   parameters[1] = new ReportExecutionService2005.ParameterValue(); parameters[1].Label = "SalesID"; parameters[1].Name = "SalesID"; parameters[1].Value = ???  //Here, this parameter should accept multiple values like 200, 201, 202, etc.   rsExec.SetExecutionParameters(parameters, "en-us");   How would I set the SalesID to take multiple values?

Linked Reports - Multi-Select Parameters


I have searched for this but have not found any answers, or similar questions even. I have a report with several multi-select parameters. These parameters are populated by datasets that use stored procedures. When I go to "Properties" and "Parameters" of the linked reports, they do not populate the drop-down menu for the parameter, the parameter is simply blank and has an area for me to manually type in data. Is there any way to force these parameters to populate with a selectable list of options? Like would occur when running the report from the front-end interface, or setting up a subscription.


Pass Multi-Value parameters to Stored Procedure problem



I am trying to pass multi-value parameters to stored procedure to filter data, but seems it does not work.

Stored procedure:


ALTER PROCEDURE [dbo].[test]

@StartDate DateTime,
@EndDate DateTime,
@FirstName varchar(8000),
@LastName varchar(8000),
@Location varchar(8000),

SELECT [Item No_],[Sales Staff],[Location Code],[Date],
[Price],[Quantity],[Item Category Code],[Product Group Code]FROM [Trans Sales Entry]
cte2 as
SELECT [ID],[First Name],[Last Name] FROM Sta

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

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

SQL 2008 Command line Utilities for ODBC connections


Hi there,

as part of a VMware Virtual Centre install (4.1), I am required to create an ODBC connection to a SQL 2008 DB,

DB server - Windows 2008 R2 w/ SQL 2008

Virtual Center server - Windows 2008 R2

To create the system 64 bit DSN i must install the SQL 2008 native client on my Virtual Center server, when I attempt to install this I receive an error

Microsoft SQL 2008 command line utilities setup is missing an installation prerequisite- Microsoft SQL server 2008 native client -To continue install http://go.microsoft.com/fwlink/?LinkID=116207 and then run the setup operation again.

from here I had already choosen -X64 Package (sqlncli.msi) - 7963 KB

I am in a loop- can anyone help me please

Passing Multi-Value Parameters between reports



I have two Reports PropertySearch and PropertyDetails. In PropertySearch I have  2 parameters PropertyNameSearch (textbox) , City (multi-select from a drop down). It takes some propertyName and Few Cities as input and displays a list of properties matching these two. So the list has a link to PropertyDetails for which I just need PropertyID that passes internally to the PropertyDetails. Everything works perfect.

But when I was in second report I want to go back to the first report ( which was displaying results with based on parameters) to choose a different property. So for this I have created the parameters @PropertyNameSearch , @City in my second report and I set it to hidden. Now I'm passing these two values to the second report with actual parameter PropertyID.  I have placed a link to first report in the second report that passes the @PropertyNameSearch and @City to first report. I can pass @PropertyNameSearch successfully but my problem is I cannot pass multi-value parameter @City between two reports.

Any help or suggestions ?



Pass parameters into multi stored procedures



I have a code that want to call 2 stored procedures with a sqlcommand; I'm used :


        string sqlcmds = "EXEC ShowDetailsSp;EXEC ShowBannersSp;";
        cmd = new SqlCommand(sqlcmds, sqlcon);
        cmd.Parameters.AddWithValue("@Number", number);
        cmd.Parameters.AddWithValue("@Code", Code);

each stord procedure has a parameter :

@Number is for ShowDetailsSp and @Code is for ShowBannersSp, but when I run my page give error :

Procedure or function 'ShowDetailsSp' expects parameter '@Number', which was not supplied. 

Pass parameters into multi stored procedures



I have a code that want to call 2 stored procedures with a sqlcommand; I'm used :


        string sqlcmds = "EXEC ShowDetailsSp;EXEC ShowBannersSp;";
        cmd = new SqlCommand(sqlcmds, sqlcon);
        cmd.Parameters.AddWithValue("@Number", number);
        cmd.Parameters.AddWithValue("@Code", Code);

each stord procedure has a parameter :

@Number is for ShowDetailsSp and @Code is for ShowBannersSp, but when I run my page give error :

Procedure or function 'ShowDetailsSp' expects parameter '@Number', which was not supplied. 

Linq: how to share parameters between lambda expressions ?

When using Linq to objects, you will quickly feel the need to pass some parameters from a method to another but it's not so easy because each Linq method is not calling the following one. In a Linq sequence, each method is using the result computed by the previous one. So, local contexts are not visible from one method to another.
The compiler is using two technical different ways to let parameters go out of a method.

Multi-threading in .NET: Introduction and suggestions

This article uses the C# type shorthands throughout - int for Int32 etc. I hope this makes it easier for C# developers to read, and won't impede any other developers too much. It also only talks about the C# ways of declaring variables to be volatile and locking monitors. Developers using other languages can find the equivalents in their own preferred environment, I'm sure.

How to Encrypt Query String Parameters in ASP.NET

Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt

Multi File Upload Using JQuery!

Everyone knows about the file upload in .NET. But the multi file upload is some what difficult in .NET. For that purpose we can have some AJAX or JQuery!. Jquery is the latest advanced version. It will give some animated upload. You can try it for your own!!!!
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