Pass Multi-Value parameters to Stored Procedure problem


hello

i trying pass multi-value parameters stored procedure filter data, seems not work.

stored procedure:

  set ansi_nulls on  set quoted_identifier on  go    alter procedure [dbo].[test]    @startdate datetime,  @enddate datetime,  @firstname varchar(8000),  @lastname varchar(8000),  @location varchar(8000),    as  begin  set nocount on;     with cte as  (  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 staff  )    select cte.[date],cte.[location code],cte2.[first name],cte2.[last name],  cte.[item category code],cte.[product group code],cte.[price],abs(cte.[quantity]) as quantity,  (cte.[price]* abs(cte.[quantity])) as [sm],((cte.[price]* abs(cte.[quantity])*1)/100) as [pm]    from cte join cte2 on cte.[sales staff]=cte2.[id]   where (cte.[date]>=@startdate and cte.[date]<=@enddate)   and cte2.[first name] in (@firstname) and cte2.[last name] in (@lastname)  and cte.[location code] in (@location)   end  

in ssrs made datasets @firstname, @lastname,@location  after in main dataset's property made this:

parameters:                           value

@firstname         =join(parameters!firstname.value,",")

@lastname         =join(parameters!lastname.value,",")

@location           =join(parameters!location.value,",")

but returns nothing

hi lasha89,

based on information, want filter dataset store procedure utilizing several muitl-value parameters. actually, have added parameter store procedure, there no need add filters dataset again. off thread, if want add filters filter dataset, should type in expression format =parameters!firstname.value. make sure select in operator.

if misunderstand you, please feel free let me know.

thanks,

challen fu



SQL Server  >  SQL Server Reporting Services, Power View



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'