HiI cannot see the fields in my Stored Procedure so I can’t drag them into my report. Plus, I cannot see my Stored Procedure’s InputDate and DealerId parameters in the Report Parameters screen. My stored procedure is at the bottom.When I execute SP below in SQL 2005 it asks for the two parameters. Once these are entered I can see the fields that I need to use in my report i.e. Provider, Dealer, Successful, Reject, TotalUpLoaded, CreatedDate – all show the data with no erros.Many thanks in advanceset ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER PROCEDURE [dbo].[PRC_MI_DailySummary_ProviderStats_SEL] ------------------------------------------------------------------------------- -- Modified By/Date -- ------------------------------------------------------------------------------- -- Accepts a date -- Accepts DealerId for Dealer viewing, can be null for Console viewing of all dealers -- Returns statistics for given dealer or all dealers if DealerId is Null for the given date. ------------------------------------------------------------------------------- -- ------------------------------------------------------------------------------- @InputDate DateTime, @DealerId As UDT_Id = NullAsSET DATEFORMAT DMYDECLARE @SQL_Select As nVarchar(500)DECLARE @SQL_From As nVarchar(2000)DECLARE @SQL_Where As nVarchar(100)DECLARE @SQL_Order as nVarchar(50)DECLARE @SQL_Statement As nVarchar(4000)DECLARE @SearchDate Varchar(10)SELECT @SearchDate = CONVERT(VARCHAR(10),@InputDate,103)SET @SQL_Select =N' SELECT CAST(dp.Name AS VARCHAR(20)) AS Provider, dd.Name As Dealer, ba.TotalNew + ba.TotalDuplicated + ba.TotalUpdated As Successful, ba.TotalRejected As Rejected, ba.TotalNew + ba.TotalDuplicated + ba.TotalUpdated + ba.TotalRejected As TotalUploaded, ba.CreatedDate 'SET @SQL_From =N' FROM dbo.MI_TransactionLog tl INNER JOIN dbo.MI_BroadcastActivity ba ON tl.TransactionLogId = ba.TransactionLogId INNER JOIN dbo.MI_DataProvider dp ON tl.DataProviderId = dp.DataProviderId INNER JOIN dbo.MI_DealerActivity da ON da.BroadcastActivityId = ba.BroadcastActivityId INNER JOIN dbo.MI_DealerDetails dd ON dd.DealerId = da.DealerId 'SET @SQL_Where = N' 'SET @SQL_Where = @SQL_Where + N' WHERE CONVERT(Varchar(10),tl.CreatedDate,103) = ' + char(39) + @SearchDate + char(39) + ' 'IF @DealerId IS NOT NULLBEGIN SET @SQL_Where = @SQL_Where + N' AND da.DealerId = ' + CAST(@DealerId AS nVarchar(12))ENDIF @DealerId IS NULLBEGIN SET @SQL_Order = N' ORDER BY dd.Name,dp.Name 'ENDELSEBEGIN SET @SQL_Order = N' ORDER BY dp.Name 'ENDSET @SQL_Statement = @SQL_Select + @SQL_From + @SQL_Where + @SQL_OrderEXECUTE sp_executesql @SQL_Statement
Woolly