Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4575548
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:04:46+00:00 2026-05-21T20:04:46+00:00

I have a report I am developing in BIDS for SSRS 2008 R2 that

  • 0

I have a report I am developing in BIDS for SSRS 2008 R2 that uses a stored procedure as its data source. I have set up parameters in the report and the report is passing them on to the stored procedure and everything works fine. However, I now need to convert the report so it gets its parameters passed to it from a ReportViewer control in a C# ASP.Net application instead of allowing them to be entered in the SSRS interface. I think I am fine on the C# side (using ServerReport.SetParameters), but I don’t know what to do in BIDS to route those passed-in parameter values to the stored procedure. Can anyone provide an example?

I also need to prevent the report from displaying the UI for entering the parameters. Should I set the parameters to Hidden or Internal?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T20:04:47+00:00Added an answer on May 21, 2026 at 8:04 pm

    I would set the report parameters as Internal but read up on this article http://msdn.microsoft.com/en-us/library/aa337234.aspx for the section Hidden and Internal Parameters and decided for yourself what is appropriate to the problem.

    Assuming you have a stored proc like

    CREATE PROCEDURE dbo.RepeatAfterMe
    (
        @inputText varchar(50)
    ,   @repeatFactor int = 10
    )
    AS
    BEGIN
        SET NOCOUNT ON
        DECLARE @count int
        DECLARE @hack TABLE (inputText varchar(50))
    
        SET @count = 0
        WHILE @count < @repeatFactor
        BEGIN
            INSERT INTO @hack SELECT @inputText
            SET @count = @count + 1
        END
        SELECT H.* FROM @hack H
    END
    GO
    

    Define 2 report parameters in SSRS (InputText as string, RepeatFactor as integer). Then, in your SSRS, your dataset would be defined like

    EXECUTE dbo.RepeatAfterMe @inputText,
    @repeatFactor

    And then on the Parameters tab of the dataset, it would look like

    @inputText =Parameters!InputText.Value 
    @repeatFactor =Parameters!RepeatFactor.Value
    

    For completeness of solution, this is an approximation of the code I use to pass parameters in to a report control with an ID of rvReportViewer

    Microsoft.Reporting.WebForms.ReportParameter[] reportParameters = null;
    reportParameters = new Microsoft.Reporting.WebForms.ReportParameter[2];
    reportParameters[0] = new Microsoft.Reporting.WebForms.ReportParameter("inputText", txtInput);
    reportParameters[1] = new Microsoft.Reporting.WebForms.ReportParameter("repeatFactor", 10);
    try
    {
        rvReportViewer.ServerReport.SetParameters(reportParameters);
    }
    catch(Microsoft.Reporting.WebForms.ReportServerException ex)
    {
        Response.Redirect("~/Error.aspx");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a report that renders data returned from a stored procedure. Using profiler
I have two report parameters that were set up automatically when I created their
I have a report that I created with Crystal Reports 2008. This report uses
I am developing a report generation application that could have tabular data across multiple
I have a report in SSRS 2005 that's based on a query that's similar
I have a report that uses a TChart that I am maintaining. One of
I have a report in SQL Server Reporting Services (SSRS) that I'd like to
I'm developing an SSRS in Visual Studio BIDS. In it, I have a link
I have a report in MS Access where the underlying data in the tables
I have a report that is used by a windows service and a form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.