© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
2 replies
FR

❔ SQL SERVER | SSRS | Dataset Column not Refresh When Using Stored Procedure with Parameter

so i have a Report with multiple dataset and i want to make it easy for maintenance
so i created sp that store multiple select data and access it with parameter
but when i implement it to SSRS the default column always use the first query even the param is different i try to spam the refresh button but didnt work....

any solution/alternative or did i do something wrong ? ty..

sample SP and Picture :
ALTER Procedure [dbo].[sp_reportMonthly] 
    @inputReportPart varchar(20)
as      
begin 
    IF(@inputReportPart = '1' or @inputReportPart = 'debug')
    BEGIN
      select a,b,c from table1
    END
    IF(@inputReportPart = '2' or @inputReportPart = 'debug')
    BEGIN
      select q,w,e from table2
    END
end
ALTER Procedure [dbo].[sp_reportMonthly] 
    @inputReportPart varchar(20)
as      
begin 
    IF(@inputReportPart = '1' or @inputReportPart = 'debug')
    BEGIN
      select a,b,c from table1
    END
    IF(@inputReportPart = '2' or @inputReportPart = 'debug')
    BEGIN
      select q,w,e from table2
    END
end
image.png
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Stored Procedure Help
C#CC# / help
3y ago
❔ SQL Server | How to format column using BCP?
C#CC# / help
4y ago
❔ Dapper - Call stored procedure error
C#CC# / help
4y ago
❔ [Sql Server] invalid column names
C#CC# / help
3y ago