Passing Multi Value Parameters To CreateSubscription

Feb 15, 2007

Hi folks,

I am trying to create a SSRS subscription from an asp.net app. I collect the parameter values from the client and make the arrangements to send them to the CreateSubscription method. When the report has single value parameters, my code works perfectly. But if there is a report param with multiple values, I get the error

System.Web.Services.Protocols.SoapException: Default value or value provided for the report parameter '<paramName>' is not a valid value

My parameter is string type and supports multiple values. I am passing the following string as its Value:

AVA,BEL,CAL,CAP,CCA,CEL,COC,COM,ECE,EDT,EMC,EMT,EPB,EPC,EPM,EPO,EPS,ETB,MET

where each element separated by comma is a valid param value. Here´s the code I use to set the params values before the call to CreateSubscription:

Dim ReportParams As New NameValueCollection

ReportParams = Session("ReportParams")

NumeroParametros = ReportParams.Count

Dim parametrosRpt(NumeroParametros - 1) As ReportService2005.ParameterValue

For i = 0 To NumeroParametros - 1

Dim parameter As New ReportService2005.ParameterValue()



parameter.Name = ReportParams.GetKey(i)

parameter.Value = ReportParams(i)

parameter.Label = Nothing

parametrosRpt(i) = parameter

Next

RS.CreateNewSubscription(Session("Reporte"), "Some description", scheduleXml, txtPara.Text, _

txtCopia.Text, txtCopiaOculta.Text, txtAsunto.Text, comboFormato.SelectedValue, memoCuerpo.Text, _

parametrosRpt)

Getting nuts on this one. Any help/code samples will be greatly appreciated.

Cato

View 9 Replies


ADVERTISEMENT

Passing Multi-Valued Parameters Between Reports.

Dec 20, 2007



Hello,

I have report A and Report B. In Report A I am using the Jump to Report functionality to go to Report B. I have a multi-valued parameter in botht the reports. So In Parmeters I am giving
Parameters!xx.value to pass the value from Report A to Report B. The multi valued parameter has values 1,2,3,4 in both the reports.

I have a scenario where I need to pass a value of 5 to the report B. When I try to hard code the value I run into error while going to the second reeport saying parameter not declared.

Can any one help me with this. Its very urgent.

Thanks,
SqlNew

View 1 Replies View Related

Passing Multi-Value Parameters To A Data Driven Subscription

Apr 24, 2007

Hi,



I've been asked to set up a data driven subscription for a number of reports which use multi value parameters. For example, show me all transactions against the following departments: IT, Building Services, Accounts.



As an interactive report it's simple, the user just selects the relevant departments, but as a data driven subscription I can't seem to find the correct format to pass the selections through.



Has anyone tried this before?



Thanks,



Dan

View 1 Replies View Related

How To Passing Multi Value Parameter In SQL Query

Jul 23, 2005

I have a query :Exec 'Select * From Receiving Where Code In (' + @pCode + ')'@pCode will contain more than one string parameter, eg : A1, A2, A3How can i write that parameters, I try use :set @pCode='A1','A2','A3'but get an error : Incorrect syntax near ','Please help meThanks

View 10 Replies View Related

Passing Multi-valued Parameter To A Sp

Jun 29, 2007

Hello,



I am forced to use a Sp in teh first place as my query is too long for the text dataset. I have a parameter Time_Period which ia a multivalued one but it is not allowing me to use this in the SP. using RS 2005.



Any help appereciated.



Thanks

View 1 Replies View Related

Populating And Passing Multi-value Param From A Url

Dec 1, 2005

I have a rs report with a parameter(named Site) that is defined as multi-value. What I am trying to do is call the report from an html form with the parameter populated with a comma seperated list of values. The html code is a minimally modified version of the code found in ch. 11 of the hitchhikers guide(code included below after the solid line). If I don't select any items, then execution is fine. 

View 6 Replies View Related

Passing Multi Value Parameter Between Reports

Aug 13, 2007

I've seen some theads on this but cant seem to get this right. Report A has 5 parameters 2 of them are multi value-- when I click on part of Report A I want to jump to report B and pass all parameter values from report A. The single value ones work but multi value only passes on value and not all values selected-- what am I missing here? Do I need to pass the values in the multi value parameters in an array??


thanks
k

View 1 Replies View Related

Passing Multi Value Parameter To Stored Procedure

Aug 7, 2007

I wrote a Stored Procedure spMultiValue which takes Multi Value String Parameter "Month". The stored procedure uses a function which returns a table. when I Execute the stored procedure from SQL Server 2005 with input "January,February,March" everything works fine.
In the dataset , I set command type as Text and typed the following statement.
EXEC spMultiValue " & Parameters!Month.Value &"
its not returning anything.
can anyone tell me how to pass multivalue parameter to stored procedure.
Thanks for your help.

View 2 Replies View Related

Passing Multi-Valued Parameter To Subreport

Mar 9, 2007

I have a multi-valued parameter that I want to pass to a subreport. The values are 11, 12, 13, and 14.

So here's what I've done:

1. For the properties of the clickable field of the first report, I have gone to the Navigation tab and chosen the subreport in the "jump to report" pulldown.

2. Then I clicked on the Parameters button and added a parameter name for the multi-valued parameter I am trying to send. For the Parameter value, I have tried 11,12,13,14. I have also tried =Split(11,12,13,14)

3. On the subreport, I create a report parameter with the same name, data type is string, multi-value is checked, and the available values pulldown is populated by a query.

So I run the first report and click on the link that brings me to the subreport, but all the subreport shows is the results for 11, not 12, 13, and 14.

How can I get the second report to understand that I want it to show all the records related to 11, 12, 13, and 14? If I bypass the first report and simply use the drop-down to choose 11, 12, 13, and 14 in the subreport, it works fine. I just can't seem to figure out how to correctly have the first report tell the subreport that it wants 11, 12, 13, and 14.

Thanks in advance for any advice!

Dan

View 4 Replies View Related

Question On Passing Multi-value Parameter For Multiple Branches

Apr 6, 2007

Hello. We are using asp .net and reporting services, and trying to pass a multi-value parameter into reporting services that will show data for multiple branches.





Dim paramList As New Generic.List(Of Microsoft.Reporting.WebForms.ReportParameter)



paramList.Add(New Microsoft.Reporting.WebForms.ReportParameter("BranchNumber", 1))



ReportViewer1.ServerReport.SetParameters(paramList)



pInfo = ReportViewer1.ServerReport.GetParameters()





Let me know if you have any suggestions!



Thanks.

View 4 Replies View Related

Passing Multi-Selected Items To Reporting Server Using A URL

Nov 6, 2007

I have designed a report that allows the user to select multiple values to be passed to SSRS. When I deploy and run the report from Report Manager I can select 1 to n values and then run the report. It works great. Now I attempt to call Reporting Services from my Web Site. I format the URL and attempt to pass the mutliple values in the URL. An example would be http://YadaYada&rs:Command=Render&rs:Format=HTML4.0&rcarameters=false&OrderTypeID='1,2' The report uses a Stored Procedure that is expecting @Ordertype Varchar(1000). And Yes, the Stored Procedures handles the multiple values being passed to it. What I receive is an error message (rsReportParameterTypeMismatch). Any suggestions on how to pass these values?

Thanks in Advance
Tom

View 2 Replies View Related

ReportingService2005 API / CreateSubscription Permission

Oct 16, 2007

I have successfully used the ReportService2005 services to create a subscription. The problem I am running into is I need to create subscriptions on behalf of other people. This would mean that they would be owners of these subscriptions. The CreateSubscription web service does not take the owner as a paramter. This leads to a problem where someone would not be able to unsubscribe if I programmatically subscribed them. I need the subscription to show up in the "My Subscriptions" section.

Any help is greatly appreciated.
Thanks,
Lee

View 4 Replies View Related

Multi-Value Parameters

Apr 12, 2005

 I have a dataadapter on my asp.net page and am having issues passing values to the sql statement.  See below:
 
SELECT tblTemp.SensorID, tblSensor.SensorNum, tblTemp.TempTime, tblTemp.TempVal FROM tblTemp
INNER JOIN tblSensor ON tblTemp.SensorID = tblSensor.SensorID
WHERE (tblTemp.TempTime BETWEEN @From AND @To)
AND (tblTemp.SensorID IN (@Sensor))
ORDER BY tblTemp.TempTime
 
@Sensor is populated in vb with the selected values from a checkboxlist control.  I attempted to test this in the "Data Adapter Preview" window, but continually get an error.  Is there a way to pass multiple values to a parameter?
Any help would be appreciated, thanks!

View 2 Replies View Related

Multi-value Parameters

Jun 29, 2007

I and trying to get some help with Multi-Value parameters in Reporting Services 2005 in VS 2005.
I’m new to the product and struggling with the TSQL syntax.

(I have simplified my SQL statement for the purposes of this question)
I have a dataset below which has 1 parameter;

="SELECT * " &
" FROM dbo.Table" &
Iif(Parameters!Sex.Value = "ALL",""," AND dbo.Table.Sex = '" & Parameters!Sex.Value &"'" )

The Sex parameter dataset contains F, M, U and ALL – the above parameter allows me to select on any of the 4 options.
I would like to use the multi-value parameter but am struggling to grasp the syntax. Believe me I have tried a few things.

Could someone provide me with an idiots guide on how to make my basic parameter a multi-value parameter?

Any help would be great.

View 1 Replies View Related

Multi-value Parameters

Jun 24, 2007

Now do you know how to take multi-value parameter array values and pass to Sql Stored Proc for summing ?

View 3 Replies View Related

Multi-value Parameters

Mar 9, 2007

Greetings - I see a few postings regarding problems regarding multi-value parameters, and see no solution responses.

Am attempting to filter on data using a multiple values drop-down parameter. Dataset has been created and runs correctly. The Multi-value parameter setting has been checked. When report is run and 1 value selected from drop-down, report runs fine. If multiples (or all) are selected, then receive "Query execution failed for dataset "mydataset" incorrect syntax near ','" error.

Can someone please advise a solution to this? Tks & B/R

View 6 Replies View Related

Multi-Value Parameters!

Nov 4, 2007



Hi every body!
I have two reports ,in first i have one multi value parameter .in first report i select more than one value ,then in second report i want to have these values becuse i have another multi value parameter ,when i join these reports via navigation
in parameters (in first report) i put the values of multi value parameter in fisrt report for value of multi value parameter in second report,but in this case fore example i have it:
in first reprt-> navigation->parameters->
ParameterName ParameterVaue
EmployeeID =Parameters!EmployeeID.Value(0)

but in second report i need all of my selections in first report not just first value

Can anybody help me?

View 1 Replies View Related

Multi-Value Parameters

Jan 21, 2008



I know that there have been a number of Posts with reference to Multi-Value Parameters, but none have helped me resolve my issue.

I am relatively new to SSRS, and use it in it's simplist form. i.e. I do not use xml code or SQL Statements, I just use the Menus.

I have created a Multi-Value Parameter (Report > Report Parameters) and have assigned a number of Non Queried Labels and Values. I have also assigned this to the Filter Tab via Table Properties.

When previewing, if I select each parameter individually and view the Report everything is fine. If I select one or more, the report only returns values for the first parameter listed.

Have I missed a step, is there a bug or do I just need to be trainied to use SQL Statements? (Hopefully not the latter!!)

Help would be very much appreciated.

Shodman

View 5 Replies View Related

Multi Value Parameters

Sep 5, 2007



I'm using a sql server Stored Procedure, that uses a defined parameter to pull the records. How can i make this stored procedure a multi value parameter. I select multi value in report parameters, and changed the where clause to "IN" but its still not working, when i select more then one parameter from the drop down list. Here is my stored procedure.




Code Snippet
USE [RC_STAT]
GO
/****** Object: StoredProcedure [dbo].[PROC_RPT_EXPENSE_DETAIL_DRILLDOWN_COPY] Script Date: 09/05/2007 13:49:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[PROC_RPT_EXPENSE_DETAIL_DRILLDOWN_COPY]
(@Region int = Null)
AS
BEGIN
SELECT Budget_Reporting_Detail.Budget_Report_Detail_Datetime, Budget_Reporting_Detail.Budget_Report_Detail_Document_Type,
Budget_Reporting_Detail.Budget_Report_Detail_Code, Budget_Reporting_Detail.Budget_Report_Detail_Description,
ISNULL(Budget_Reporting_Detail.Budget_Report_Detail_Amount, 0) AS Actual, Budget_Reporting_Detail.Budget_Report_Detail_Qty,
Budget_Reporting_Detail.Budget_Report_Detail_Responsible, Territory.Name+'('+Code+')' as [Name], Region.Region, Round((Forecast.Budget_Amount/13),2) AS Budget,
Forecast.Budget_Type_Code, Forecast.Budget_Year, Budget_Forecast_Period,
Forecast.SalesPerson_Purchaser_Code
FROM RC_DWDB_INSTANCE_1.dbo.Tbl_Budget_Reporting_Detail AS Budget_Reporting_Detail RIGHT OUTER JOIN
RC_DWDB_INSTANCE_1.dbo.Region AS Region RIGHT OUTER JOIN
(SELECT Budget_Type_Code, Budget_Year, SalesPerson_Purchaser_Code, Budget_Amount
FROM RC_DWDB_INSTANCE_1.dbo.Tbl_Budget
) AS Forecast INNER JOIN
RC_DWDB_INSTANCE_1.dbo.Territory AS Territory INNER JOIN
RC_DWDB_INSTANCE_1.dbo.Tbl_Territory_In_Sales_Responsible AS Territory_In_Sales_Responsible ON
Territory.Code = Territory_In_Sales_Responsible.Territory_Code INNER JOIN
RC_DWDB_INSTANCE_1.dbo.Tbl_Territory_In_Region AS Territory_In_Region ON Territory_In_Region.Territory_Code = Territory.Code ON
Forecast.SalesPerson_Purchaser_Code = Territory_In_Sales_Responsible.SalesPerson_Purchaser_Code ON
Region.Region_Key = Territory_In_Region.Region_Key ON Budget_Reporting_Detail.Budget_Type_Code = Forecast.Budget_Type_Code AND
Budget_Reporting_Detail.Budget_Year = Forecast.Budget_Year AND
Budget_Reporting_Detail.SalesPerson_Purchaser_Code = Forecast.SalesPerson_Purchaser_Code
WHERE (Region.Region_Key IN( @Region)) AND (Forecast.Budget_Year = 2007)



END

View 5 Replies View Related

Transact SQL :: Passing Multi-valued Data As Single Parameter In Query

Jul 2, 2015

I have a sp where query is as below.

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 do I query the data?

View 6 Replies View Related

ReportingService.CreateSubscription Sample Code

Apr 18, 2008



Hi,

If somebody have worked on providing the code for the selection of delivery method and delivery schedule page in aspx . Then please share it with me. I am working on creating a Subscription page using aspx rather then reporting services page.

Please let me know if there are any controls provided by reporting services or some 3rd party for this.

Thanks & Regards,

Sam

View 3 Replies View Related

IIF And Multi-Valued Parameters

Jan 14, 2008

I have a MultiValued parameter called Owners, which stores Owner Ids.

I wish to set the value of a textbox to the following:

=iif(3 IN(Parameters!Owners.Value),"foo","bar")

but the "IN" is not recognised.

How can I achieve this functionality using an expression?

Thanks,
Kate

View 1 Replies View Related

Help With Oralce 8 - Multi-Value Parameters

Nov 8, 2007

I need help in creating a custom string for a multi-value parameter going against an Oralce 8 database.
I'm trying to build a string that looks like ('1401', 'HACT', '1504')
If I do it as an expression in a test report the results are perfect but in production it does not like it.

This is what I have based on some examples I have found but it complains it needs a )
These are the last few lines of the query

and f.shipto = a.shipto
and f.salesman in & " ('" & Join(Parameters!Salesrep.Value,"','") & "')"
GROUP BY a.company_id, a.whse#, f.salesman, .product_line, d.product_group, e.name
)
order by conoxx, whsexx, slsrepxx, sortcode

View 8 Replies View Related

Drill Down In Multi-value Parameters

Jul 21, 2006

Hi,

can anybody tell me if it is possible in RS2005 to create a multi-value parameter in wich it is possibility to drill down? Say i want to use a multi-value parameter to show data for one or more specific years or months. Then the multivalue parameter would contain a list of years, with a + sign next to them, making it possible to drill down to the specific months.

Any help greatly appreciated.

Christopher

View 5 Replies View Related

Blank Multi-value Parameters

Jul 19, 2007

Hi,



Lets say I have two multi-value parameters on a report. One is required, the other is not. The multi-value parameter that is not required is allowed to be blank. In the WHERE clause of my query I wanted to do this:






Code Snippet AND
EXISTS
(SELECT * FROM SomeTable AS ST_1
WHERE (MyCode IN (@My_Codes2)) OR @My_Codes2 IS NULL)








Of course I can't do that since multi-value parameters are not allowed to be null. I see that they are allowed to be blank, but how do I check for that? I tried






Code Snippet

OR @My_Codes2=''



That doesn't work. I can set a default value of 'None' and say:






Code Snippet

OR @My_Codes2='None'



Unfortunately this doesn't work. As long as the default value is 'None' it's fine. When I fill in the parameter I get the following error:



An expression of non-boolean type specified in a context where a condition is expected, near ','.

Please note that I am not using a TSQL stored procedure here. It's just a plain old embedded SQL statement.



Thanks,

DD

View 3 Replies View Related

IIF And Multi-valued Parameters

Apr 15, 2007

Hi



i have a report that can show upto 8 charts, dependant on the selection(s) made in a multi-valued parameter.



basically, the report gets loads of data back from DataCube.



if the user has selected (for example) 2 categories in the multi-valued parameter (e.g. "beverages" & "confectionary") , the the first chart will show the results filtered for "beverages" and the second chart will show the results for the "confectionary" category.



but

i want to hide any charts that are not used - i.e. the user only selects 3 categories, i want to show 3 and hide 5 charts and am trying to do this with IIF in the FILTER properties of the chart



so for each chart, i am checking to see if a Category selection has been made for that chart - and if it has, filter the results and display the chart. if no selection has been made, then filter the results for "XXXXX" (no data with this category)



am doing this by trying to get the selected value or "xxxxx" if noting selected

to hide the second chart when only one category has been selected, tried



e.g. for the third chart

=iif(

Parameters!LOOKUPITEMCategoryDescription.count>2,

Parameters!LOOKUPITEMCategoryDescription.Label(2),

"xxxxx")



doesnt work - gives an #Error as a reult



But it works fine when there are > 2 categories selected



also



this works fine when there is 2 or >2 category selected

=iif(

Parameters!LOOKUPITEMCategoryDescription.count>2,

"more than 2",

"not more than 2")





it would appear that IIF is trying to evaluate the TRUE condition(Parameters!HydraCORELOOKUPITEMCategoryDescription.Label(2)) even though the condition is false !!!



help please

thx

View 4 Replies View Related

Linked Multi-value Parameters

Apr 3, 2008

Hi,

I have a report that needs to use two multi-value parameters that are linked.

The report shows stock availability for the production of trial kits and the requirement is to enter multiple quantities of multiple kits as shown below:

Parameter 1 Parameter 2
Kit A 10
Kit B 15
Kit C 25

Is there a way I can select multiple kits and then enter a specific quantity for each selection?

Any help or advice is greatly appreciated.

Thanks.

View 1 Replies View Related

Null Multi-value Parameters

Apr 26, 2007

How do you configure a multi-value parameter so it will allow the user to not enter the parameter?

I'm using integer multi-value parameters. I can't set the parameter to allow null, and when I preview the report and leave the parameter blank, it tells me to enter at least one value. I tried it with string parameters, and the report just doesn't run in preview if you don't enter any values, even if you choose "allow blank".

How do you specify a multi-value parameter to allow "empty" or "null"?

View 5 Replies View Related

Parameters Passing

Mar 14, 2008

Hi,
 how to pass paremeters in sqldataadapter? here iam checking authentication using sqlcommand and datareader
like that if iam checking authentication using dataset and sqldatareader how to use parameters?
 
SqlConnection cn = new SqlConnection("user id=sa;password=abc;database=xyz;data source=server");
cn.Open();
// string str = "select username from security where username='" + TextBox1.Text + "'and password='" + TextBox2.Text + "'";
string str = "select username from security where username=@username and password=@password";
SqlCommand cmd = new SqlCommand(str, cn);
cmd.Parameters.AddWithValue("@username", TextBox1.Text);
cmd.Parameters.AddWithValue("@password", TextBox2.Text);
SqlDataReader dr = cmd.ExecuteReader();

if (dr.HasRows)
{
Session["username"] = TextBox1.Text;
FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, false);


}
else
{
Label1.Visible = true;
Label1.Text = "Invalid Username/Password";
}
-------------------------------------------------------------------------------------
like that if iam checking authentication using dataset and sqldatareader how to use parameters?SqlConnection cn = new SqlConnection("user id=sa;password=abc;database=xyz; data source=server");
cn.Open();ds = new DataSet();
string str = "select username from security where username=@username, password=@password";da = new SqlDataAdapter(str, cn);  //how to pass parameters for that
da.Fill(ds, "security");
Response.Redirect("dafault2.aspx");

View 2 Replies View Related

Passing Parameters To DTS In C#

Apr 17, 2004

I have a dts package file. I am able to execute the file thro C#. I want to pass userid, password, datasource through program. How to do this?

DTS.PackClass package = new DTS.PackClass();

string filename = @"c:abc.dts";
string password = null;
string packageID = null;
string versionID = null;
string name = "DTSPack";
object pVarPersistStfOfHost = null;

package.LoadFromStorageFile(filename, password, packageID,
versionID, name, ref pVarPersistStfOfHost);
package.Execute();
package.UnInitialize();
package = null;


Thanks
Jtamil

View 2 Replies View Related

HELP! Passing Parameters

May 30, 2006

Still need help passing a criteria parameter query from a SQL Function (i.e. @StartDate) to a report header in Access Data Project where header = 'Transactions As Of [StartDate].

If anyone knows anywhere I can get help on this, I would really appreciate it. Thanks.

View 1 Replies View Related

T-SQL (SS2K8) :: Appropriate Query For Multi Parameters?

Mar 13, 2014

I am using the following code in my query to fetch data for my ssrs report which have a parameter @auditCode, where multiple auditCodes can be inputted to generate the report.

Is there any other way I can achieve the same functionality avoiding the part charindex(LU.auditCode,@auditCode)<>0 , as it will return wrong results.

For instance, it will return, the results for the audit code ‘INPS45’ and ‘INPS450000’ when audit code ‘INPS45’ is inputted.

SELECT distinct Ac.activityCode,
Ac.ActivityName + isnull(Ac.description,'') AS ActivityName,
Ac.activityStartDate, Ac.activityEndDate,
LU.auditCode,
LU.AuditName,
St.studyCode AS StudyCode,
St.StudyName AS StudyName

[Code] ....

View 3 Replies View Related

Dynamic Query With Multi-value Parameters

Jun 1, 2008

Is anybody here knowing how to create a dynamic query based on a multi-value parameter?

e.g. there is a multi-value report parameter called names. For a static query, the where clause of a select statement likes the following

select * from students where name=@names

For the dynamic one, I tried something like the below, but it did not work.

="select * from students where name=(" & Join(Parameters!names ,',') & ")"

Any suggestion would be great appreciated.



Thanks,
KY

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved