0
votes

I have a parameter Client in the report which takes Multivalues. When i run the value for one client, it's working fine, but when i include more than 1 client it's giving the error like:

"Error Converting Datatype nvarchar to int in SSRS for multivalued Parameter"

Here is the stored procedure which is giving the data based on the client parameter

Create PROCEDURE SampleLead 
@InvClientId int    
AS
begin

 SELECT [SourceSystemId]
  ,[SourceLeadId]
  ,[FirstName]
  ,[LastName]
  ,[Title]
  ,[TitleType]
  ,[Role]
  ,[CustomerName]
  ,[Address1]
  ,[Address2]
  ,[City]
  ,[State]
  ,[ZipCode]
  ,[Country]
  ,[InvClientId]
  ,[Campaign]
  ,[Email]
  ,[Phone]
  ,[InvUserId]
  ,[RevenueRangeId]
  ,[EmployeeRangeId]
  ,[Industry]
  ,[SICCode]
  ,[NAICSCode]
  ,[DUNSNo]
  ,[CreatedDate]
  ,[ModifiedDate]
  ,[LeadStatus]
 FROM [CRMIntegration].[dbo].[Lead]
 Where InvClientid in (@invClientID)

END
GO

invClientId is declared as int in the source table And SSRS parameter i have set the datatype as int.

Can you help me why it is not working for multiple values but working when i select single value?

1

1 Answers

1
votes

It cannot be done based on your stored procedure.

Refer to ..

Example of passing multi values from SSRS to Stored Procedure