.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

Report parameters bomb out using wildcards with multi value parameters

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :Sql Server
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)

View Complete Post

More Related Resource Links

Passing report parameters by report viewer


I have 4 parameters in which 3 are passed in report and 1 is passed through report viewer. I have made a parameter in SSRS called CandidateId to which I want to pass the value. The code for report viewer is:

 intReportID = Convert.ToInt32(Request.QueryString["ReportID"
 CandId = Convert.ToString(Session["CandidateId"
lblReportName.Text = dtReport.Rows[0]["ReportName"
SSRSReportViewer.ShowCredentialPrompts =false

 SSRSReportViewer.ServerReport.ReportServerCredentials = new
SSRSReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.


 SSRSReportViewer.ServerReport.ReportServerUrl = new

SSRSReportViewer.ServerReport.ReportPath = dtReport.Rows[0]


 Microsoft.Reporting.WebForms.ReportParameter[] theparams = new

theparams[0] = new
, CandId);
theparams[0].Visible = false

Preview Crystal Report from ASP.net without passing parameters


Hi Everyone,

Sorry couldn't think of any better Subject..

I am developing a User Reports Module using C#.Net using Visual Studio 2005. Basic purpose of this module is to allow user to be able to run their own Crystal Reports. i.e. if Users have their own Crystal Reports specific to their needs then we allow them to save them and view them from our user reports module.

So when user saves any report we save it on server and save the Physical path of that report in database. Now when user tries to view the report I get the location from database and load it. Which works ok. The issue now is those reports which have got parameters. 

I am not saving any information about parameters in their reports. So I do not have any information about Report Parameters.

This same application exists in VB6. What that VB application does is opens the Crystal Report and then Crystal report asks for needed parameters exactly as it will do if we try to open a crystal report using crystal report and preview it from there it asks for parameter values. 

How can I do that in C#.Net.

VB has got code like this

Global Appl As New CRAXDRT.Application

Report parameters *, =<>constant

Hi I have filtered a report dataset depending on whether a field contains the string "Hong Kong". However I would like to present the user with the option to select the label 'All' not to bring back all records, or the label 'Excluding Hong Kong' to bring back all records where the value in the field is not equal to "Hong Kong", anyone know how to do this?

displaying parameters through expressions at the top of the report

Hi,   We developed around 70 ssrs reports for our new application.Its like,all the report names are menrioned in the left hand side and if we click it,.Net calls the SSRS reports and shows in the Right hand side.    At the top of Each and every report,we dispaly all the parameters using expressions. Now, the issue is, in the parameter if they select a single value, then it should display and if they select more than one, it should display like 'More Parameters are selected'. can you helpme how to do that?

How to export SSRS report to PDF from SSIS with parameters

Hello everyone.  I am trying to setup a process in which a user, who is using a vb.net 2008 application, will need to  trigger the creation of two items.  The first is  SSRS report which will need to be exported to PDF format to a shared folder on the network.  This report accepts one parameter.  The second thing that will need to be created at the same time is an excel file with data exported from SQL Server 2008 which is generated through an SSIS package.  A couple things to note.  The excel file and the pdf file need to have the same file name, other than the extension.  For example P00000001_20100831.pdf and P00000001_20100831.xlsx and will both be stored in the same network share.  The filenames need to be created dynamically at run time and will be based on a parameter being passed to the report. So far I have the portion that creates the excel file working fine.  The way I create that is as follows.  I have a stored procedure that creates a job which calls the SSIS package and passes the appropriate parameters to the SSIS package.  After the job is created I immediately run it and then delete the job.  Ok, everything works fine with that. Now I cant seem to figure out how to get the pdf created.  If possible I would like to keep this portion together with the already created job or package.&nb

Passing parameters from ASP.Net web page to SSRS report

I have a web page that displays some data.  The user first selects a date range on the web page and then can edit some data.  When they click a submit button, I want to run a report.  But I would like to pass the start date and end date values that the user already entered on the web page to the report.  Is this possible?  Can I use the value of a session variable in the report? Bob

Problems passing parameters to SSRS report from ASP.Net web page

I have a web page that displays some data.   When they click a submit button, I want to run a report.  But I would like to pass the start year/month and end year/month values that the user already entered on the web page to the report.  Here is what my url looks like when the report is displayed: http://xyzserver/Reports/Pages/Report.aspx?ItemPath=%2fReports%2fDevicesAllNew&rs:Command=Render&StartYYMM=201007&EndYYMM=201008 But my report displays the 2 textboxes for my StartYYMM and EndYYMM parameters as empty.  What am I doing wrong?  I did a google search and I saw something about using ReportServer instead of ReportManager.  I notice at the top of the browser when I run my report, it reads "Report Manager - Windows Internet Explorer".  Is this correct? Bob     Bob

Reporting services + report parameters and custom dropdown length

Hi, I have some report and plenty of parameters inside that report. One of parameter contains values stored inside dropdown list (that are downloaded from db). Is there any way I can set the maximum length of that dropdown control? The problem is that when I expand drop down list I have a horizonal scrollbar because some values inside that dropdown list are too long. How can I customize this parameter and dropdown control so there will be no horizontal scrollbar and values inside it will always be visible?

report manager parameters , back button do not show

Hi, not sure this is an expected behavior.  My drill through reports have parameters that are passed from the first report.  once drill through, somehow the parameters are not showing in report manager.  also the Back arrow is also missing from the second report.  is this expected?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                                  

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.


Reporting Services Report Parameters Problem


I have the next table, & I have the Id of the account as a report parameter @AccountID

|account |LastYear |Jan |Feb |Mar |Apr |May |jun |Jul |Aug |Sep |Oct |Nov |Dec |YTD  |Plan
| 00001  | 10.00    |  1   |  2  |  3  |   5 |  32  | 12 | 11| 10  |  8   | 87 | 54  | 54  | 123 | 250

I tried to build a Query that return me

Jan       |  1
Feb       |  2
Mar      |  3 ...

I already tried to build  a temporary table, but then Ignore my report parameter saying Must declare the scalar variable "@AccountID".
But If I eliminate the code of create #Table, The parameter works just fine.


Part of my query is :

Declare @IddeCuenta varchar(50)
set @IddeCuenta =

(Periodo varchar(30),
Informe_Ventas money)

INSERT INTO #VentasGraf VALUES ('LstYear',0)

    UPDATE #VentasGraf
    SET        Informe_Ventas =
    (SELECT  ISNULL(sum(new_acumula

Adding parameters via URL to a SSRS report stored in Sharpeoint 2007

I am trying to pass parameter to a SSRS Report via URL stored in Sharepoint 2007 (integrated mode) but that doesn't seems to work. The report opens without the parameters taken into account. Any sggestions on how to pass parameters to SSRSreport on sharpeoint?..Thanks for your help...

Report Builder 3.0 - Using Parameters


I have a report that is using Parameters. I found that when I have the same Available Value, then the report automatically changes the selection to the last Available Value in the list that matches the selected Value.


Parameter - @Selection

Available Values:

Label     Value

1            A

2            B

3            A

4            C

5            A

6            B


In this case, if I select 1, then the report automatically changes my selection to 5. If I select 2, the report automatically changes my selection to 6.


Does anyone have any ideas of how to keep the original selection?


Note: I assume people will next say, why have multiple Labels with the same value. The report I built is more complex than the example, but in any case the user needs to only select the Option for their area while they are not aware of what the Value is equal that filters the report.

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