SQL Reporting Services Problem
Hi Scholars, I'm new to SSRS, I was trying to generate a report by taking Dynamic stored procedure into query designer. I could see only the parameters of that stored procedure in my "Report Data". But not the columns in the Dataset, to display the report. Below is how my stored proc looks like. Please help me. Thanks in advance CREATE PROCEDURE [dbo].[Tag_List_URL] ( @AcctAffinityID varchar(200), @ProductGroup varchar(30), @UserName varchar(50), @CurrentLevelAcctID varchar(200), @AcctLinkNum varchar(10), @AcctCustNum VARCHAR(200) ) AS DECLARE @wherecon varchar(2000)=' ' DECLARE @sql nvarchar(2000); IF @ProductGroup is NOT NULL BEGIN set @wherecon=@wherecon+ ' and (GROUP_DESC='+''''+ @ProductGroup+''''+' OR TYPE_DESC=' +''''+ @ProductGroup+''''+' OR BRAND_DESC=' +''''+ @ProductGroup+''''+' OR PRODUCT_DESC=' +''''+ @ProductGroup+''''+' ) ' +''; END if @AcctLinkNum is not null begin set @wherecon=@wherecon+' and [Acct Link Num]='+''''+@AcctLinkNum+''''+'' end if @AcctCustNum is not null begin set @wherecon=@wherecon+' and CUSTOMER_NUM='+''''+@AcctCustNum+''''+'' end SET @SQL='SELECT * from dbo.View_Aura_Rptg_Tag_Detail where [Acct Pty ID]='+''''+@AcctAffinityID+''''+@wherecon exec sp_executesql @sql
November 23rd, 2010 10:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics