MultiValue Integer ReportParameter In ASP.NET

Apr 1, 2008

Hi,

I'm calling a report based on values collected from an ASP.NET page. It worked fine until I tried to pass a multivalue integer value.

ReportParameter seems to take a string[] just fine, but not a int[].

For example...

int[] incidents = prevPage.IncidentIDs;
string[] assets = prevPage.Assets;

ReportParameter[] parameters = new ReportParameter[2];
parameters[0] = new ReportParameter("IncidentID", incidents);
parameters[1] = new ReportParameter("Assets", assets);

throws the error: cannot convert from 'int[]' to 'string'

but changing incidents to a string like so:

string[] incidents = prevPage.IncidentIDs;
string[] assets = prevPage.Assets;

ReportParameter[] parameters = new ReportParameter[2];
parameters[0] = new ReportParameter("IncidentID", incidents);
parameters[1] = new ReportParameter("Assets", assets);

results in "The 'IncidentID' parameter is missing a value"

I've verified that incidents has values.

Any help is appreciated.

Thanks,
Tonya

View 14 Replies


ADVERTISEMENT

Pass Multivalue Parameter To A Stored Procedure For Integer Lookup

Feb 19, 2007

I'd like to pass a multi-value parameter to a stored proc to satisfy an integer field lookup.

example -

CREATE PROC SSRSQuery

@InPublicationId VARCHAR(500) = NULL AS

SELECT * from Table where PublicationId IN (@InPublicationId)

where PublicationId is defined as an int

I've seen various posts on how to split up the input string parameter to use in a string-based lookup but nothing useful for an integer-based lookup.

Any tips or tricks for this?

View 3 Replies View Related

ReportParameter.ValidValues

Jul 23, 2005

lfarr...@setfocus.com Jan 12, 8:28 pm show optionsNewsgroups: microsoft.public.sqlserver.reportingsvcsFrom: lfarr...@setfocus.com - Find messages by this authorDate: 12 Jan 2005 20:28:28 -0800Local: Wed, Jan 12 2005 8:28 pmSubject: ReportParameter.ValidValuesReply | Reply to Author | Forward | Print | Individual Message | Showoriginal | Remove | Report AbuseI have been assigned to create a new report subscription form. I havedone everything but prompt the user for values. So there are a bunchof reports with varied parameters. Some of these parameters arehard-coded lists and others are DataSetReference. How do I provide thesubscriber with an accurate list of valid values?I was thinking something like:ReportParameters[0].reportParameter.ValidValuesbut that comes back null.I tried reportService.GetReportParameters(report, historyID,forRendering, values, credentials)Values comes back null.Please help!Thank you!--Larry--

View 1 Replies View Related

ReportParameter Dependency Problem

Sep 20, 2007

Hi,

I have a bunch of code for integrating reporting services 2000 with our application, which has been running fine for quite a while. We've recently encountered a problem and i can't quite figure it out.

There is a set of code that creates controls for entering parameter values for our reports, which takes an array of ReportParameters as an argument. We loop through the parameters and create controls as appropriate. The check to see if we need to create a dropdownlist of parameters populated through a query looks a bit like this:

if (oParam.ValidValues != null)
{
//Create ddl based on the list of valid values.

}

This is where i am encountering a problem. One of our reports, that has been running fine until recently is now not getting a dropdownlist created for it's second parameter. When i run into the code, i can see that this parameter now thinks that it has a dependency on the first parameter (which it does not), and the list of ValidValues is null.

If i go into the report designer and change the order of the two parameters in the report, then it works fine, the list is populated and there seems to be no dependency. If i change it back, it is broken again. I've checked the query that populates the list, it is not parameterised and is a very simple kind of SELECT A, B FROM TABLEA. I've looked in the report parameters and i can see nothing there either.

Your help would be very much appreciated here. I am running SSRS with SP2 applied.

Paddy

View 1 Replies View Related

DB Design :: Convert Integer Date (MMDDYY) And Integer Time (HHMMSS) To DateTime Format?

Jul 20, 2015

Working on a new database where the Date and Time are stored in a Date Time Field.

Then working on an OLDER database file within the same SQL Database contains these 2 items as integers:

transDate = "71615" (July 16, 2015)
transTime = "12345" (01:23:45 AM)

How do we convert both of them into a single SQL DateTime field such as "2015-07-16 01:23:45.000" so that it can be used in a join restricting to a date time in a different SQL File that properly has the DateTime in it?

This works well for converting the transDate Part in the select statement:

   dbo.IntegerToDate(at.transDate) as transDate

   * That returns: "2015-07-16 00:00:00.000"

* The resulting data must work directly in a Microsoft SQL Server Management Studio Query using either using the "on" statement or part of the "where" clause. In other words, NOT as a stored procedure!

Also must be able to be used as a date difference calculation when comparing the 2 files Within say + or - 5 seconds.

View 3 Replies View Related

MultiValue Parameters

Sep 21, 2007

Hi. I am fairly new to reporting. I have a report that currently displays queried data in both a table and a matrix. I'd like for the data that is displayed to be based off of my report parameters. I have three, all of which are multivalue. Currently, I am able to display the report, based on the only the first value of TWO of the three parameters. I tried using the dataset parameters, but was not successful with linking them to my report parameters. Please help! In addition, is there a way to set multivalue parameters to only display distinct values? Thanks, in advance, for any help.

View 3 Replies View Related

SP2 And Multivalue Parameters

Jan 17, 2008

Hi,

I need to set a label in my report when all the values in a certain multivalue parameter are selected. In other words, i would need to check whether this parameter has the value "Select All" selected or not.
How do i accomplish this?

Thanks in advance,
Claudio

View 3 Replies View Related

Using Multivalue Parameter

Mar 27, 2007

We have a report that has a banner page. The user can select categories from a multi-select parameter and then this is passed into the report as a csv file. The actual report works doing this, however, we need the banner page to use this parameter's value (the multiple selected labels) to display a string of the selected values. For the textbox expression, we are using =Parameters!Cat.Value, but it always wants to reference Paramaters!Cat.Value(0). We were thinking of using a function in code to pass in the parameter and then concantenate each value into on string and return that string, but isn't there an easier way to do this?



Thanks for the information.

View 3 Replies View Related

MultiValue Parameter Help

Jun 7, 2007

I have passed a list of parameters to a multivalue parameter in a SQL Report.

I can click the drop down and see the list of parameters that were passed.



In my select statement for the report, here is the condition I am using in the where clause.



AND (SUBSTRING(C.CHARTOFACCTSACCOUNTNO,9,3) IN (@RUs))



Nothing is returned in the result set if more than one value is passed to the multivalue parameter.



Shouldn't the above conidition have the effect that no matter how many account numbers there are, the last three digits in the account number will be compared to each element in my multivalue parameter and if there is a match, it will be selected on the report.



For example, in the multivalue dropdown list, there are the following values:



211

212



If I pass 211 to the report, data is returned. If I pass 211, 212 to the multivalue parameter no data is returned.



View 60 Replies View Related

Multivalue Parameters

Apr 18, 2007

how do I create a multivalue parameter that has a default value of 'All' Or how to I I get the "Select All" option as the default parameter?

View 3 Replies View Related

Multivalue Parameter!!!

May 11, 2007

I have multivalued parameter in my report. I have text box to display heading of the report. the report heading is dependent on the parameter selected.

with single value parameter the text box displays the correct parameter but it cannot with multi valued parameter. Is there any way to display the last value of the parameter in the heading of the report in case of multivalued parameter?



Ex. multivalued parameter is "YEAR"

my report shows the data for 3 years say 2003,2004,2005. report header should show 2005(last of the parameter list) report.



regds,

View 6 Replies View Related

MultiValue Parameter

Mar 20, 2007

Hello,



I have in my report a text box that lists the user selection. When the user select a few of the values I display the selection but when the user select "All" I would like the text box to say "Parameter: All".

Is there anyway to know if "All" was selected, I don't want to list all the values because sometime there are too many of them.



Thank you,



Itzhak

View 3 Replies View Related

Multivalue Parameters - Is This Possible ??

Dec 6, 2006



i am trying to build a report that uses multivalue parameters - the report is a simple listing report that lists out a list of cases as a table - the data is obtained from a view which just returns all details for all cases

there is no user input for the selection details - am going to be calling the report and passing over the parameter values directly to it.

there are several parameters for the report - they all default to "All"

for each of these parameters, i need to be able to either use the default value of "ALL" or to enter a list (comma separated ?)

q1) could i just enter the list as a string comma separated list (rather than as multivalued parameters) and then use this list to filter the data using the FILTERS tab on the dataset

q2) if q1 is not possible, if i use multivalue parameters, how do i get my list of parameters into the report as the application calling the report just has a list of values

thx

mark

View 11 Replies View Related

Multivalue Subquery In The On Of A Join

May 13, 2008

I know I can't do this but I dont know will work. any help is much appreciated. the code below in red will always return more than one value, and yes the ?? is actually data (dont ask i didnt do it).

I am basically coding this because of the ?? someone before me thought was a good idea.

inner join MHDDTest.dbo.Admin_tbl_Vendor f on
(case when len(b.vadr) > 0 then
(case when (b.vadr = '??') then
(select vendorNumber from MHDDTest.dbo.Admin_tbl_Vendor
where (substring(afunction,3,2) + object) = '42305' and substring(vendorNumber,1,5) = b.vend)
else
b.vend + '-' + b.vadr
end)
else
b.vend
end
= f.vendorNumber)

View 9 Replies View Related

Multivalue Parameter With A Comma In A Value

Nov 28, 2007

Is there an easy way to handle a multivalue parameter where the values could have comma's? I have County and State in a single column and want to select one from the multivalue parameter but when the string is passed it is not being found because I am parsing the parameter on comma. Here is what the drop down list looks like.

Dade,CA
Marion,CA
Brown,CA

Thanks,
vmon

View 1 Replies View Related

Error On Multivalue Parameter

Oct 1, 2007



In SQL Server 2005 reporing services, I am using the syntax in the documentation for a multivalue parameter.

AND c.Track IN (@Track)

It works fine when I just select one value, but if I select 2 or more, I get an error about the commas being wrong. Is the syntax correct? Is there a way I can see the SQL generated by the report so I can see what is wrong?

Thanks,
Linda

View 17 Replies View Related

SSRS Multivalue Parameter

Mar 4, 2008

There is a select all option for each multivalue parameter. If this option is selected, I would like to display in the report that the parameter selected is "ALL" instead of using the Join(parameter!parametername.value,",") to display all the values. Any idea how I check to see if the select all at the beginning is checked?

View 13 Replies View Related

Passing Multivalue Parameters

May 22, 2007

Hello Friends,

I have a report (Say Report 1)which is asking for a multivalue parameter Period. The user selects three period from the dropdown list available for the Parameter. Lets say that the user select 0407,0507,0607. Now is this report 1 there is a particular field which is linked to another sub report. So if the top level Report 1 supplies the revenue for 3 regions say for the periods selected then clicking on any of the regions would open a second detailed report, say Report 2 for the three periods as selected.

Till this everything is fine.

Now the problem is that in this detailed Report 2 there would be a particular text box as "Click here to naviagate back to parent report". So that when the user clicks on this cell he is taken back to the parent report, Report 1 which was originally generated for the 3 periods.

Can anyone please advise as to how the Multivalue Parameter which was passed from Report 1 to Report 2 can again be looped back to Report 1 from Report 2.



Thanx Friends,

Raktim

View 2 Replies View Related

Output Multivalue Parameters

Jun 16, 2006

I'm trying to output all the values selected through a multivalue parameter, but I am having difficulties. In the text box, the parameter contains only four member functions (value, label, count, ismultivalue). However, to output a value or label for the parameter you need to specify an index in the form of:

Parameters!Names.Value(0)

Ideally, I would like to be able to obtain all these values with a function call, but it doesn't look like there is one. Any ideas of how to get all the values?

Thank you!!

View 4 Replies View Related

Multivalue Parameters And Wildcards

Dec 14, 2007



Greetings all
trying to get a multivalue parameter to accept either typed in data ex: 111111111,111111112 or if I want to return all id numbers type in %. Problem is when I test it by typing in 111111111,111111112 it throws an error saying " Incorrect syntax near ','.



I can enter 111111111 or % and get results, the error comes when I try to type in two or more id numbers. the parameter in the dataset looks like

where a.id_number LIKE (@id_number+ '%')


any suggesstions? Im sure there are threads out there but Im pressed to meet a deadline and wanted to see if there were any quick solutions

thanks
km

View 5 Replies View Related

Need Help Normalizing Multivalue Column

Jan 23, 2006

Hi!


I have a table with the following columns:

account_nr, account_totaling_members, account_type



the account_totaling_members column contains a pipe sperated list of accounts in a varchar: "1001|1002|1003"

I need to normalize this so that i get records like:

"10", "1001", "sum"

"10", "1001", "sum"

"10", "1002", "sum"

..and so forth



Does anyone have any idea how to accomplish this?

View 3 Replies View Related

Multivalue Parameter Against Oracle 9 Datasource?

Jan 22, 2007

Everything I have read says that this is possible in Oracle 9 and greater versions, but I can't get it to work...

Here is my query:

select * from employee where employee_id in ('111','222')

This works fine in the data tab until I replace the values with a parameter. I get the pop-up to enter the parameter values but no matter how I enter them, I don't get any rows returned. I've tried entering them as '111','222' and as 111,222 and changing the parameter type from a string to an int, but nothing seems to work.

I am running this on SQL Server RS 2005 and my Oracle driver (Oracle in OraHome92) is version 9.02.

View 6 Replies View Related

Deselect All On Multivalue Paramater When Other Value Is Chosen

Dec 26, 2007



I use "All" as default value in my parameters, my parameters are multivalue.
Now if a user chooses a value it will mark the value but the All will also remain marked. Isn't there a way that it deselects the all when one or more individual values are chosen ?

I thought that the reporting services just didn't have that functionality but someone told me that its possible but i haven't found it anywhere.

View 3 Replies View Related

Filter Multivalue DateTime Parameter

Apr 16, 2007

Hi all,



I am using stored procedure dataset. i tried filtering the dataset values with the parameter of type datetime.I am able to view and select multiple datetime value from the list. but its not filtering the values.

i changed the parameter datatype to string but it works only for the first value

(parameter. <pname>.value(0)). if i filter with the array value (parameter. <pname>.value) am getting error (Failed to evaluate Filter expression).



I guess the problem with datatype. Pls help me if anyone have idea about this.







View 5 Replies View Related

HOW Set Default Value =All Values In Parametr With Multivalue

Oct 29, 2007

HOW set Default Value ="All Values" in parametr with "multivalue" - Report Services

View 2 Replies View Related

Multivalue Parameter Textbox Size

Jan 16, 2007



Hi,

In my report,I have multivalue parameter for this parameter the Available values are from the Dataset.Suppose the dataset contains Names like this:
'AL - Alabama Center (Tuscaloosa)',
'AL - Regional Control Center (Birmingham)',
'AR - Arkansas & Rock)',
'Arizona Department of Health'
But my problem is the Multivalue parameter TextBox is of fixed size.Now i want the size of the text box to the size of the name which is of length long in the Name.
Whether it is possible or not.
How to achieve this.

View 3 Replies View Related

How To Set Selected Multivalue (from Aspx) For Report

Apr 9, 2008

The report seems to render just fine if a parameter has just 1 value. However, when I try to pass multi values(comma seperated) to the report from aspx - the report viewer is unable to check the selected values. I have set ShowParameterPrompts to true - for multivalues the parameter selection is blank and hence unless the values are reselected the report wont render.

I tried to loop thru the multi values by dumping it in a array and adding the individual value while iterating thru the RDL's parameter collection. In that case the error message that I get is parameter xyz has been specifed multiple times.

Has any one come across this? How to fix this?

TIA

View 1 Replies View Related

Multivalue Parameters For Filter Not Working

Jan 12, 2008

Hi,

I've tried using the same method mentioned in the dozens of posts dedicated to this topic but it's not working.

My SQL statement is:

SELECT [University Origins].Origin, COUNT([University Origins].Origin) AS TotalCount, Hospitals.Name
FROM Posts INNER JOIN
Hospitals ON Posts.HospitalID = Hospitals.[Hospital ID] CROSS JOIN
[University Origins] INNER JOIN
Incumbents ON [University Origins].[Uni Origin ID] = Incumbents.[University Origin]
WHERE (NOT ([University Origins].Origin = 'No answer')) AND (Hospitals.Name IN (@HospitalFilter))
GROUP BY [University Origins].Origin, Hospitals.Name


The HospitalFilter parameter is set to Multivalue and it's populated with it's own SQL statement giving the Distinct Hospitals.

I have setup a filter on my table with the following expressions:

Expression: =Trim(Fields!Name.Value)
Operator: = IN
Value: =Trim(Parameters!HospitalFilter.Value.ToString )

I have used Trim to remove leading and trailing spaces.

Running the report always returns zero results and I'm puzzled by this. Would appreciate any advice and suggestions

Thanks,
John

View 8 Replies View Related

Multivalue Parameter SQL Server 2005 SP1

Apr 21, 2006

Hello, I've installed SP1 for SQl Server 2005 and I noticed that the option "Select all" on a multi value parameter drop down (using web browser) is missing. Even if I can see it on VS 2005.....
Anyone can help me?
Thank you very much.

View 12 Replies View Related

Passing (Multivalue) Report Paremeters In Url

Oct 15, 2007

Is it possible to pass multiple values for a report parameter through a url? For example I am using multi-select list in my asp.net page, when I click a button I want to pass the values selected in that list and generate the report on report server with the multi-select list populated with exactly the same values as in asp.net page. So there are essentially two questions: First, how to pass multiple values, second how to populate multi-select in report with these values.

Thanks.

View 4 Replies View Related

Passing Multivalue In Stored Procedures

Jun 7, 2007

Hi guys,

I'm new in SSRS, Im having problems passing multivalue in stored procedures. Can someone help. please.



Thanks in advance.

View 10 Replies View Related

Restricting The Selection Of Multivalue Parameters...

Apr 25, 2007

hi all,



Is there any way to restrict the user from selecting the parameters. For example: I have a list of 100 values in a multi-value parameter. I want to to restrict the user to select at the most N number of values.

If possible, process only the N number of values will also do.



Thnx in advance...

View 3 Replies View Related

Pros/Cons Of Multivalue Database Columns

Jun 27, 2004

I'm just wondering what any pros and cons of using multivalue columns in a database are.

I'm designing a database which will have a column for FABRIC_TYPES_AVAILABLE for a certain FURNITURE_ITEM. Each FURNITURE_ITEM can have multiple FABRIC_TYPES_AVAILABLE of course. So I was just going to store a 2 or 3 digit number of the FABRIC_TYPES_AVAILABLE in that row. So I would have something like....34,24,453,32,23,45,67,65,43,21,21,45.

Anyway....thanks in advance for any information. Links I could read would be great too...b/c I did do a bit of searching, but didnt find much.

View 6 Replies View Related







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