June 5, 2008 at 2:25 pm
Hi,
My report uses a parameter called "Publications" which I am filling with values from a stored procedure.
Issue is: Along with Stored Procedure values I also need to Add another list Item called "All" in that case I can display data regarding all publications.
But How can I Add different Item ("All") to my parameter list which is not present in the Stored procedure.
Any help is greatly appreciated.
June 5, 2008 at 3:37 pm
I know you are trying not to modify the stored procedure. But I don't think there is a way to add additional values to a dataset that is fetched from stored procedure.
We usually do queries like this
select value, description from view
union
select '%','All'
and use a "like" in the actual data query.
good luck
June 5, 2008 at 4:46 pm
I agree... it'll likely require a change to the sproc or a bit of very clever SQL Injection and then only if the sproc is vulnerable.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 6, 2008 at 10:23 am
Thank you guys. I guess I will change my stored proc as suggested.
June 7, 2008 at 2:11 am
You can use a script simular like this (set Command Type of the dataset to Text):
set nocount on
create table #temp
(
Publication varchar(50)
)
insert into #temp
execute sp_GetPublications
select * from #temp
union all
select 'All'
drop table #temp
Replace sp_GetPublications with your stored procedure. You will get an error when you enter this script. Add the field publication manually to your dataset (Field Name=Publication, Type=Database Field, Value=Publication).
Peter
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply