Help With Sproc And Multi Parameter

Dec 11, 2006

I'm trying to build a sproc that will return rows even if some of the parameters are blank. For example; if a user does not enter a priority, a status, or a caller the sproce should still return rows based on the other parameters.

 Can anyone help me find a way to modify my sproc bellow to allow this? I think the way I have it  bellow will only return those rows where the user has entered a parameter or the record has a null in the field.ALTER PROCEDURE dbo.ContactManagementAction

(
@ClientID int,
@Priority int,
@TStart datetime,
@TEnd datetime,
@Status nvarchar,
@ConTypeID int,
@Caller nvarchar,
@Keyword nvarchar
)

AS
SELECT Task_ID, ClientID, Priority, ActionDate, Subject, Note, Status, CompletionDate, TaskDocument, ReminderDate, Reminder, ReminderTime, Sol_ID,
DateEntered, EnteredBy, Caller, ContactTypeID, DueDate
FROM tblTasks
WHERE (ClientID = @ClientID) AND (Priority = @Priority) OR (Priority IS NULL) AND (ActionDate BETWEEN @TStart AND @TEnd) AND (Status = @Status) OR (Status IS NULL) AND
(ContactTypeID = @ConTypeID) OR (ContactTypeID IS NULL) AND (Caller = @Caller) OR (Caller IS NULL) AND (Subject LIKE @Keyword) OR (Subject IS NULL)

RETURN 

View 15 Replies


ADVERTISEMENT

Reporting Services :: Multi-value Parameter Not Passing In Subreport Parameter List

Jul 29, 2015

I have two report , first is main report which is matrix and have one parameter User_ids which is multi value selection and my second report is basic chart of user_wise performance.

Now, my main report (matrix ) works fine for Multiple selection of users and i have putted one textbox on main report chart which has action properties set for chart report, when user click on chart button it must goes to chart with user selected in main report. Now , i have used expression for parameter to send it like ..

=join(parameter!user_id!value,",") which pass selected value to chart 

And when I am selecting single user it passing that value to chart parameter list but , when it is more than one user it errors with conversion failed when converting the nvarchar value '121,128' to data type int. But my chart also works when passing 121,128 in user parameter in preview of report .

View 2 Replies View Related

SSRS Toggle Parameter Between Multi-Value And Single Value Based On Another Parameter

Feb 4, 2008



I would like to be able to adjust the multi-value property of a parameter based on the value of another parameter in my report. The controlling paramter would be binary with two options for Single or Multiple selection. I would like my parameter to default to multi-value, which I can do on the screen selection. I have tried to add an IIF statement to the XML code, with no success. Any ideas would be helpful.

Thanks

View 4 Replies View Related

SProc Expects Parameter...Help

Aug 24, 2006

This code works EXACTLY as it should on a development server that has a Framework 1.1 hotfix (operating in the 'localhost' webserver environment) but not on a production server (in a live www. web app) that does NOT have the 1.1 hotfix. Is there a code problem (if so, why should it work in the localhost) or is the hotfix on the development server needed on the production server.
(in a button sub that does an update)...Dim currentUser As New AccBusiness.User( _                                      CType(Context.User, SitePrincipal))                Dim DDName As String = currentUser.DDName                Dim NosData As String                Dim AccountDetails As New SecureNums(txtDDPhone.Text, txtDDAddress.Text)                NosData = AccountDetails.EncryptedData()                AccountDetails.UpdateAcctDetails()----------------------(business object for the update)... Public Function UpdateAcctDetails() As Boolean            Dim DataUserAcctNo As New Data.SecureCard(myModuleSettings.ConnectionString)            Return DataUserAcctNo.UpdateAcctDetails( _                myDDName, _                myNosData)        End Function--------------------------------(data object)...Public Function UpdateAcctDetails(ByVal DDName As String, _                                            ByVal NosData As String) As Boolean            Dim rowsAffected As Integer            Dim parameters As SqlParameter() = { _                New SqlParameter("@DDName", SqlDbType.VarChar, 50), _                New SqlParameter("@NosData", SqlDbType.VarChar, 512)}            parameters(0).Value = DDName            parameters(1).Value = NosData            RunProcedure("sp_Accounts_UpdateAccount", parameters, rowsAffected)            Return CBool(rowsAffected = 1)        End Function------------------------------and the sproc:ALTER PROCEDURE sp_Accounts_UpdateAccount@DDNameVarChar(50),@NosDataVarChar(512)AsUPDATE Accounts_UsersSet NosData = @NosDataWHERE DDName = @DDName------------------------------------------------------------
It all works on the development server but on the production server it gives me an error :SProc sp_Accounts_UpdateAccount expects parameter "@DDName" which was not supplied.
Can anyone suggest why this works in one environment and not the other?
Thx for looking/Reid C. 

View 2 Replies View Related

SPROC With Optional Parameter

Jan 16, 2004

I need to use a parameter in a stored procedure that is optional and if it is optional I need all records returned, even if there is an entry in the field that the parameter is appllied to. Is this possible? I know I can assign a default value. but the value in the field could be one of many choices. I want to be able to specify a choice and have only those records returned or leave it blank and return all records.

Thanks for any help,

View 4 Replies View Related

SPROC: 'LIKE' Clause And Parameter

Sep 15, 2005

Hi,

I've tried that but it does not work:

SELECT Field FROM Table WHERE Field LIKE @parameter



thanks

View 4 Replies View Related

Parameter Value Not Being Passed For My SProc

Mar 19, 2007

I am quite new to SSRS and am having some difficulties in trying to develop a new report via Business Intelligence Studio based on a stored procedure which requires the input of 1 parameter, and also has an optional parameter which I default to NULL in the sproc.

When I create my dataset I select the given sproc I want and when I attempt to execute it, I am prompted for the parameters the sproc expects.

However, when I enter a value in the dialog for the required Parameter I get a SQL error indicating that the parameter the sproc expects was not supplied. I have profiled the call and see the attempt to execute the sproc, but no parameter value.

Can some one tell me why the value I enter is not being passed to the sproc in my database ? Is there some special syntax that I need to use ?

I have scanned a number of sites & through the books I have and can't find anything on this. From what I have read, when I exec my sproc the parameters get recongnized & I can just enter my values. This doesn't seem to be the case.

Any help and/or suggestions are appreciated !!!
Thanks.

View 8 Replies View Related

Declaring A Tablename In A Sproc As A Parameter

Oct 2, 2006

HiCan someone please shed some light as to how this can be done. With the below sql statement as you can see I don't want to declare the table name but would rather the table name be passed in via a parameter. I've tried declaring it as a varchar parameter but it doesnt seem to like it if I don't add a valid table name. Any ideas how this can be done. Thanks.select * from @tableName where condition = condition

View 5 Replies View Related

SQL Server SPROC Cutting Off Varchar Parameter

Feb 5, 2004

Hello,

I am having trouble with a SPROC and I was wondering if anyone has had similar problems. I have a web form where users enter in a large amount of text, the web app saves that data via a SPROC into a varchar(8000) field in a SQL table. However, any amount of text beyond 255 gets cut off. I have double checked and tested my code and I dont seem to find the problem. Below is the beginning of my SPROC and as you can see, I have the correct data type and length. I have also verified the data type and length on the table and it is set at varchar(8000). Any ideas?

SPROC CODE
-----------------------------------------------
CREATE PROCEDURE Add_ProductsReview
(
@Pros varchar(100) = null,
@Cons varchar(100) = null,
@Title varchar(100),
@Body varchar(8000) -- This is the parameter with problems
)
AS......

Thanks!

View 5 Replies View Related

Sproc Create View And Parameter Problem

Aug 21, 2006

In the below sproc I want to create a view based on the incoming parameter, which is a date passed on from VB in the format 01-01-2006.

Yet getting that to work, seems quite a challenge.

I've been dabbling a bit with the sproc and QA, passing the date parameter to it in varous forms, using both single, double and triple quotationmarks and changing the parameter type to datetime.

I either wind up with a syntax error " Incorrect syntax near '01' " or " Unclosed quotation mark before the character string ".

Anyone have a guess at how to fix this issue?

Cheers, Trinsan


REATE PROCEDURE KONTROL_DRdobbeltrapportering

@rapdato as varchar

AS

if exists (select * from dbo.sysobjects where id = object_id(N'[KONTROL_vw_DRdobbeltrappbasis]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [KONTROL_vw_DRdobbeltrappbasis]

EXEC('
CREATE VIEW KONTROL_vw_DRdobbeltrappbasis
AS
SELECT Gramex_DW.dbo.Programhoved.[Rettet af DR],
Gramex_DW.dbo.Programlinie.Stationskode,
Gramex_DW.dbo.Programlinie.Udsendelsesdato,
Gramex_DW.dbo.Programlinie.[Udsendelses starttid],
Gramex_DW.dbo.Programlinie.Rapporteringsdato, Gramex_DW.dbo.Programlinie.Mediekode,
Gramex_DW.dbo.Programlinie.MUSANummer, Replace(Left(convert(varchar, [Gramex-ID]),11),''.'','''') AS GramexID,
Gramex_DW.dbo.Programlinie.Side, Gramex_DW.dbo.Programlinie.Tracknummer,
Gramex_DW.dbo.Programlinie.ISRC, Gramex_DW.dbo.Programlinie.Producentlandekode,
Gramex_DW.dbo.Programlinie.Spilletid, Gramex_DW.dbo.Programlinie.Minuttakst,
Gramex_DW.dbo.Programlinie.[Afregnet Station],
Gramex_DW.dbo.Programlinie.[Afregnet den],
Gramex_DW.dbo.Programlinie.[Afregnings ID], Gramex_DW.dbo.Programlinie.[Ur-opførelse],
Gramex_DW.dbo.Programlinie.Talestof, Gramex_DW.dbo.Programlinie.[Betalt af DR],
Gramex_DW.dbo.Programlinie.Kending, Gramex_DW.dbo.Programlinie.[Oprettelses ID],
Gramex_DW.dbo.Programlinie.[Oprettet den], Gramex_DW.dbo.Programlinie.[Oprettet af],
Gramex_DW.dbo.Programlinie.[Ændret den], Gramex_DW.dbo.Programlinie.[Ændret af],
Gramex_DW.dbo.Programlinie.[Eventuel delskæring], Gramex_DW.dbo.Programlinie.Plademærkenavn,
Gramex_DW.dbo.Programlinie.Katalogbetegnelse, Gramex_DW.dbo.Programlinie.Tracktitel,
Gramex_DW.dbo.Programlinie.Selskabsnummer, Gramex_DW.dbo.Programlinie.Indspilningsår,
Gramex_DW.dbo.Programlinie.Fonogramtitel, Gramex_DW.dbo.Programlinie.Plademærkenummer,
Gramex_DW.dbo.Programlinie.[Antal opførelser], Gramex_DW.dbo.Programlinie.[Rec nummer],
Gramex_DW.dbo.Programlinie.Indslagsnummer, Gramex_DW.dbo.Programlinie.[Afspillet gange],
Gramex_DW.dbo.Programlinie.[Afspillet minutter], Gramex_DW.dbo.Programlinie.Spilletidsløbenummer,
Gramex_DW.dbo.Programlinie.Pointtildelt, Gramex_DW.dbo.Programlinie.[Rettet af Gramex],
Gramex_DW.dbo.Programlinie.[Pgmkorlinie løbenummer], Gramex_DW.dbo.Programlinie.[Tape Kilde],
Gramex_DW.dbo.Programlinie.[Hoved artist], Gramex_DW.dbo.Programhoved.Produktionsnummer
FROM Gramex_DW.dbo.Programlinie
INNER JOIN Gramex_DW.dbo.Programhoved
ON (Gramex_DW.dbo.Programlinie.Stationskode = Gramex_DW.dbo.Programhoved.Stationskode)
AND (Gramex_DW.dbo.Programlinie.Udsendelsesdato = Gramex_DW.dbo.Programhoved.Udsendelsesdato)
AND (Gramex_DW.dbo.Programlinie.[Udsendelses starttid] = Gramex_DW.dbo.Programhoved.[Udesendelses starttid])
WHERE Gramex_DW.dbo.Programlinie.Rapporteringsdato >= ' + @rapdato + '
AND (Gramex_DW.dbo.Programlinie.Mediekode <> 1) AND
(Gramex_DW.dbo.Programlinie.Spilletid >= ''00:01:00'') AND (Gramex_DW.dbo.Programlinie.Stationskode <> ''TV2'') AND
(Gramex_DW.dbo.Programlinie.Stationskode <> ''TV2 ZULU'') AND (Gramex_DW.dbo.Programlinie.Stationskode <> ''TV2 CHARLIE''')
GO

View 2 Replies View Related

Sproc Is Returning Output Parameter Inconsistently

Mar 6, 2015

We have a service written in c# that is processing packages of xml that contain up to 100 elements of goods consignment data.

In amongst that element is an identifier for each consignment. This is nvarchar(22) in our table. I have not observed any IDs that are different in length in the XML element.

The service picks up these packages from MSMQ, extracts the data using XPATH and passes the ID into the SPROC in question. This searches for the ID in one of our tables and returns a bool to the service indicating whether it was found or not. If found then we add a new row to another table. If not found then it ignores and continues processing.

The service seems to be dealing with a top end of around 10 messages a minute... so a max of about 1000 calls to the SPROC per minute. Multi-threading has been used to process these packages but as I am assured, sprocs are threadsafe.It is completing the calls without issue but intermittently it will return FALSE. For these IDs I am observing that they exist on the table mostly (there are the odd exceptions where they are legitimately missing).e.g Yesterday I was watching the logs and on seeing a message saying that an ID had not been found I checked the database and could see that the ID had been entered a day earlier according to an Entered Timestamp.

USE [xxxxxxxxxx]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

[code]....

So on occasions (about 0.33% of the time) it is failing to get a bit 1 setting in @bFound after the SELECT TOP(1).

change @pIdentifier nvarchar(25) to nvarchar(22)
Trim any potential blanks from either side of both parts of the identifier comparison
Change the SELECT TOP(1) to an EXISTS

The only other thought is the two way parameter direction in the C# for the result OUTPUT. I have been unable to replicate this using a test app and our test databases. Have observed selects failing to find even though the data is there, like this before?

View 1 Replies View Related

Change Sproc Where Clause Based On Parameter Null

Apr 7, 2008

I have an optional param passed to my sproc @Pid if that is populated i want to have it part of where clause, if it is null then not in where

I know this is wrong, and very new to sqlsrver:

WHERE (Pos = 'T') AND (ofDate= @OfDate)
IF not @PID is null
AND (PID = @PID )
GROUP BY
bla bla bla


Thanks

View 12 Replies View Related

Different Results With Sproc As Opposed To Simple SELECT (parameter Values)

Aug 9, 2006

Could someone please tell me why the following SELECT statement...

SELECT ID, SpecimenNr, ScientificName, Locality, TaxonFROM petrander.QueryViewWHERE (InstitutionCode = 1) AND (Collectioncode = 1) AND (ScientificName LIKE N'%le%') AND (Locality LIKE N'%Fakse%') AND (22 IN (ParentID1, ParentID2, ParentID3, ParentID4, ParentID5, ParentID6, ParentID7, ParentID8))

...gives me 9 rows back, but embedding the exact same statement in the following sproc...
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONGOALTER PROCEDURE [petrander].[DynamicQuery] @taxparent int = NULL, @museum int = NULL, @collection int = NULL, @binomen Nvarchar(254) = NULL, @locality Nvarchar(254) = NULLAS SELECT ID, SpecimenNr, ScientificName, Locality, Taxon FROM QueryView WHERE InstitutionCode = COALESCE(@museum, InstitutionCode) AND CollectionCode = COALESCE(@collection, CollectionCode) AND ScientificName LIKE 'N%' + @binomen + '%' AND Locality LIKE 'N%' + @locality + '%' AND (@taxparent IN (ParentID1, ParentID2, ParentID3, ParentID4, ParentID5, ParentID6, ParentID7, ParentID8))

...and passing the exact same parameter values to with the following execute statement...

USE [Geomusdb]
GO

DECLARE @return_value int

EXEC @return_value = [petrander].[DynamicQuery]
@museum = 1,
@collection = 1,
@binomen = N'le',
@locality = N'Fakse'

SELECT 'Return Value' = @return_value

GO

gives me 0 rows!? What is different!?

Any help is greatly appreciated...

View 4 Replies View Related

Multi Value Parameter

Jan 16, 2007

Hi,

In my report i have a multi valued parameter, when i view my report in the Web application with Report Viewer, The multi valued parameter is displaying in light color.Can we able to change this.

Thanks in advance

View 2 Replies View Related

Multi-Value Parameter

Sep 5, 2007

I have a stored procedure im passing into Reporting Services. Only problem is , What do i need to change to allow the user to select more then one value. I already know what to do on the reporting services side, but it keeps erroring with the data source IE my stored procedure. Here's the code:




Code Snippet
SE [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




what am i doing wrong?

View 1 Replies View Related

Multi-value Parameter

Jan 15, 2008



Hi:
I am building a report and have a few parameters. One of this parameters is set up as Multi-Value. When I only select one value everything is running fine. But when I select multi values I get an error saying I must declare my variable.

Any idea why this is happening?

Ben

View 3 Replies View Related

Multi Value Parameter

Sep 3, 2007

hi,
i read from this forum that to pass array to report is using multi value parameter . my problem now is
1. can i pass multi dimension array.
2. how do i show the multi value parameter in a table . for example i have a multi value parameter that may contain 10 or 20 array . how do i dynamic it show in table.

rgds,
charles

View 1 Replies View Related

Multi Parameter AND Statement

May 27, 2008

Is it possible for an AND statement to take mulitple parameters? See below code:

SELECT tblQuestion.Question, tblAnswer.Answer

FROM (tblAnswer INNER JOIN tblQuestion ON tblAnswer.QuestionID = tblQuestion.ID)

WHERE (tblAnswer.StateID = ?) AND (tblAnswer.QuestionID = 14)

Is something like this possible?:
AND (tblAnswer.QuestionID = 14, 26)

Thanks

View 2 Replies View Related

Multi-value Parameter Calculation

Jun 23, 2007



OK Guys....



If you answer this one, you will save my life...and you WILL be the MAN or WOMAN!!!!



Problem: I have a set of 24 matrix's that need to calculate the difference between the last two years and display in a field to the right of the last rendered column. Since I have been struggling with this, let's just assume there is no better way than how I currently have it set up. (one table that does the calculations for me and I set one field on the report to display the most recent two columns difference in my report)



what I can not figure out is: when I choose one of my parameters the report displays the information I want...but when I choose more than one...well there is the problem....



In order to obtain the most help for myself I will ask this in the most general way possible so as not to get bogged down into my specific solution...



Desired Result: How to pass all my parameter values from my multi-value parameter during runtime to a SQL Stored proc from my dataset within Reporting Services at runtime, Match the parameter to the field, get the result and store it in a variable, then do it again and add the second to the first within the variable, and so on and so on , until all of the parameters are used. Then sum the values and display in a field.



HELP, HELP, HELP Please....

View 3 Replies View Related

Allow Null Value In Multi-value Parameter

Jun 28, 2007

Hello,



I have a multi-value parameter field and each item comes from a table in the DB.

This multi-value parameter allows to select all or some of the items.

What if I don't want to select ANY item??



I read in the forum the several tray to do the same but the answers are not so clear..



If I say that at the end is a bug in SSRS... AM I right?



Thank you



Marina B.

View 1 Replies View Related

Empty Multi-value Parameter

Apr 24, 2007

Several people have asked about this, but I have not seen a response that works. I have several parameters that I want to use as filters. If a particular filter parameter is not entered, the report should not apply a filter on that criterion. It works fine to create a single value parameter which allows null, and use the following in SQL:

WHERE ( [Field1] = @Field1_Filter OR @Field1_Filter IS NULL )


How can the same effect be achieved for a multi-value parameter? If you try to create a multi-value parameter which allows null, the report builder gives an error. I can't use "allow blank value" because some of my parameters are integer parameters. Without the allow null, the report generator requires me to enter at least one value. So I don't know how you can get a value of "not entered" into a multi-value parameter.

I also don't know how you would check for the "not entered". Someone suggested the following SQL:

WHERE ( [Field1] IN (@Field1_Filter) OR @Field1_Filter IS NULL )

This generates an error when generating the report if multiple values are entered for the parameter (the normal condition). The error is " An expression of non-boolean type specified in a context where a condition is expected, near ',' ".

How is this supposed to be done?

Thanks for any insight

View 12 Replies View Related

Multi Value Parameter In Db2 Query

Mar 19, 2007

hi,

i'm trying to perform a query against a db2 database like this:

SELECT ... FROM ... WHERE (field IN (?))

Then i let reporting services pass the parameter to the report. When i try to preview the report, i get the following error:

An error occurred during local report processing,
An error has occured during report processing,
Cannot add multi value query parameter '?' for data set ... because it is not supported by the data extension

But when i type the query like this

SELECT ... FROM ... WHERE (field IN ('value1','value2'))

it executes flawlessly.

I am using the IBM ole db driver for db2 if that matters

Can anyone help me?

View 5 Replies View Related

Multi Value Report Parameter

Feb 1, 2007

HI there.

I have been working on this for quite some time and I can not figure out what I am doing wrong.
I have a report filter called ItemFilter and I have declared as a report parameter where the multi value checkbox is checked. The values from this filter are coming from the item table.
SO the users drilldown on the filter when they run the report an select the Items that they would like to display info for. I had the following code before in the where

where
([CRONUS International Ltd_$Item].No_ = @itemfilter). This only worked if they selected on item from the list.

I want them to be able to select multiple Items or all. The code above did not work because there were commas separating one item from the other and I was getting an error.

I changed to

whrere

([CRONUS International Ltd_$Item].No_ IN (@itemfilter)).

Now this only returns the first item that I enter on my Itemfilter parameter.

Does anyone have any clue in regards to this ?? I am sure I am using the wrong syntax, but I do not know what to change it too.



Thanks






View 1 Replies View Related

Multi-Value Parameter Width

Mar 27, 2007

Good afternoon,

I've designed a Reporting Services report that has a multi-value parameter. The report works just great. The only issue I'm running into is that the users are complaining that when they want to select the values, within the multi-value parameter box, they have to scroll it to the sides way too much. This also makes them select values by mistake.



Is there away to inscrease the width of the multi-value parameter box?



Best regards.

View 20 Replies View Related

Multi-Value Parameter And FireFox

Jul 6, 2007

I am experiencing a problem with the multi-value parameter dropdown in the ReportViewer when using FireFox, but in IE it seems to work fine. The symptom is when I click on the dropdown the list of options appears and then quickly disappears before I can select anything and I only experience the problem with multi-value parameters. I also have noticed that the dropdown is grayed out but I can still click it. Also, the position of the dropdown options are different in FireFox (pushed all the way to the left). I have created a very basic example at https://www.register4this.com/testreport.aspx to demonstrate the problem. There is no report, only the single "Orgs" parameter to keep things as simple as possible.



I suspect that I am missing something obvious because I haven't been able to find anyone else reporting this issue so any help would be appreciated. My ReportView control is configured as follows:




Code Snippet

<rsweb:ReportViewer ID="ReportViewer1" runat="server" AsyncRendering="False" Font-Names="Verdana" Font-Size="8pt" Height="400px" ProcessingMode="Remote" Width="400px">

<ServerReport ReportPath="/REG_Report/testreport" ReportServerUrl="http://reports.register4this.com/reportserver" />

</< FONT>rsweb:ReportViewer>



The report code is as follows:






Code Snippet

<?xml version="1.0" encoding="utf-8"?>

<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

<DataSources>

<DataSource Name="Members">

<DataSourceReference>Members</DataSourceReference>

<rd:DataSourceID>54f7f4de-9fe5-44e9-bcf0-467d024725cb</rd:DataSourceID>

</DataSource>

</DataSources>

<BottomMargin>1in</BottomMargin>

<RightMargin>1in</RightMargin>

<ReportParameters>

<ReportParameter Name="Organizations2">

<DataType>String</DataType>

<Prompt>Orgs:</Prompt>

<ValidValues>

<DataSetReference>

<DataSetName>Organizations</DataSetName>

<ValueField>orgID</ValueField>

<LabelField>orgName</LabelField>

</DataSetReference>

</ValidValues>

<MultiValue>true</MultiValue>

</ReportParameter>

</ReportParameters>

<rd:DrawGrid>true</rd:DrawGrid>

<InteractiveWidth>8.5in</InteractiveWidth>

<rd:SnapToGrid>true</rd:SnapToGrid>

<Body>

<Height>2in</Height>

</Body>

<rd:ReportID>504c91c0-4beb-421e-bae0-4d581303b3e2</rd:ReportID>

<LeftMargin>1in</LeftMargin>

<DataSets>

<DataSet Name="Organizations">

<Query>

<CommandType>StoredProcedure</CommandType>

<CommandText>REG_spGetOrganizations_org</CommandText>

<QueryParameters>

<QueryParameter Name="@orgID">

<Value>=System.DBNull.Value</Value>

</QueryParameter>

</QueryParameters>

<DataSourceName>Members</DataSourceName>

</Query>

<Fields>

<Field Name="orgID">

<rd:TypeName>System.Int32</rd:TypeName>

<DataField>orgID</DataField>

</Field>

<Field Name="orgName">

<rd:TypeName>System.String</rd:TypeName>

<DataField>orgName</DataField>

</Field>

</Fields>

</DataSet>

</DataSets>

<Width>6.5in</Width>

<InteractiveHeight>11in</InteractiveHeight>

<Language>en-US</Language>

<TopMargin>1in</TopMargin>

</Report>





Any help wpuld be greatly appreciated.

View 10 Replies View Related

Pass Multi Value As Parameter

Jun 1, 2007

Hi All,

Is it possible to pass a multi value parameter from one report to another using the "jump to report" feature?

ie;



I have report A that has a mutli value parameter (para1). This report has a link with the action property set to jump to another report(Report B). Report B requires the same multivalue parameter. I have tries setting the parameter in the interface as well as trying the join function. Nothing seems to pass the values correctly.



regards

View 3 Replies View Related

How Can I Print A Multi-value Parameter

Jul 29, 2005

I have a multi-value parameter and I need to print its value in report.

View 4 Replies View Related

Multi-value Parameter And Function

Mar 21, 2008

I have a report with the following dataset query:



Code Snippet
SELECT ...,
dbo.getActivitySinceBeginningYear(..., @countryId ,...) AS HoursYear
FROM ....
WHERE cast(detail.COUNTRY_ID as nvarchar(max)) IN (@countryId)
AND ...
GROUP BY ...




countryId is defined as a String multi-valued parameter.
The getActivitySinceBeginningYear is defined as follows:




Code Snippet
ALTER FUNCTION dbo.getActivitySinceBeginningYear
(
...
@countryId ntext,
...
)
RETURNS decimal(18,5)
AS
BEGIN
declare @return decimal(18,5)
set @return = 0.0

SELECT @return = SUM(detail.HOURS_WORKED)
FROM ...
inner join charlist_to_table(@countryId, Default) f on detail.COUNTRY_ID = f.str
WHERE ...
RETURN @return
END


This function works as expected if I transmit one ID or several.
The report works fine if I check only one ID.
If I check several IDs, the report displays this error:
Procedure or function dbo.getActivitySinceBeginningYear has too many arguments specified.

Why???

My second problem is with the Where clause:



Code Snippet
WHERE cast(detail.COUNTRY_ID as nvarchar(max)) IN (@countryId)


If I do:



Code SnippetWHERE detail.COUNTRY_ID IN (@countryId)


I have the following error:
Conversion failed when converting the nvarchar value '3,5' to data type int.
(I transmitted 3 and 5 for countryId)

That's why I tried to use a cast, but the data returned by the query is wrong when I transmit several value.
??

View 7 Replies View Related

Multi Value Integer Parameter

Jul 11, 2007

I am trying to create a report with a multi value integer parameter. I have tried



="SELECT * FROM vProjectRequestStatus WHERE ProjectRequestStatusCode IN (" + Parameters!StatusCode.Value + ")"



I get an error stating



An error occurred during local report processing.

An error has occurred during report processing.

Cannot set the command text for data set 'ProjectRequestStatus'.

Error during processing of the CommandText expression of dataset 'ProjectRequestStatus'.



Has anybody worked with integers?



Thanks,



Fred

View 8 Replies View Related

In Keyword And Multi Value In Single Parameter

Aug 29, 2007

Hello
I created a table adapter with the following query
select * from building where buildingname in (@param1)
I used the query builder to the test the query and it works ok if I pass a single value
ex: name: @param1     value: Building1
but when I use the value: Building1, Building2 then it doesn't return anything
If i do a direct sql: select * from building where buildingname in ('Buiding1','Buiding2') returns many rows.
Now I have a class that has the following function<System.ComponentModel.DataObjectMethodAttribute(ComponentModel.DataObjectMethodType.Select, False)> _
Public Function getBuilding(ByVal building As String) As myDataSet.buildingDataTableReturn adapter.getBuilding(building)
End Function
When I call this function I try to pass the building value sorta like
dim building as string = 'Building1,Building2'
and it doesn't work.  I tried a whole bunch of variations. 
How are you supposed to format the parameter string?
Thanks
Peter 
 
 

View 4 Replies View Related

Display Multi Value Parameter LABEL

Mar 6, 2007

Hello.
I have a multi value parameter in my report.
I want to know how can I display all of the selected values in this parameter in a text box.
Whan I try to use this parameter in a textBox it automaticly take the value:
Parameter.param.Value(0) Whice take only the first select value.

Is there a simple way of doing it?

Thanks.

View 1 Replies View Related

Report Parameter And Multi Value Prompt

Sep 21, 2007

Hi all

Basically I had 2 paramater which ComputerName and MemberName.

The membername was set as Multi-Value as sets as follow:
Label: Value:
Exclude Domain Admins Domain Admins
Exclude Local Install Local Install

And the query is:

SELECT id,
ComputerName,
GroupName,
MemberName,
ScanDate
FROM GROUPMEMBERS WITH (NOLOCK)
WHERE ComputerCN LIKE '%' + @ComputerName + '%'
AND MemberName NOT IN (@MemberName)
ORDER BY ComputerName ASC

The prompt is like this:
Computer Name [ ] Excluded by [ ]

The issue is in the second prompt I have to select
"something" which is I don't want to. I want the user to have this parameter as an optional.

Any ideas?

Thanks

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







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