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 6323535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:32:13+00:00 2026-05-24T16:32:13+00:00

I have a Microsoft ReportViewer control on my web page. However, if someone types

  • 0

I have a Microsoft ReportViewer control on my web page. However, if someone types in an invalid input for one of the parameters then it displays a rather unfriendly error message where the report should go. For example: The value provided for the report parameter 'pToDate' is not valid for its type. (rsReportParameterTypeMismatch)

The control prompts the user for the information with “To Date” and “pToDate” is the internal name of the parameter. The users won’t know this, nor will they likely react well to “rsReportParameterTypeMismatch” (what ever that means!? [while thinking like a user])

As I couldn’t find somewhere in the ReportViewer control to put any error or custom message, my solution was to create a label in which to put a more friendly error message. This works insofar as the friendly error message is displayed.

My problem is that once the user has corrected their mistake and clicks “View Report” the report is displayed but the error message is still visible. I’ve set the label text to string.Empty, I’ve set the label to Visible = false. I’ve tried this in various places, ensured the code is hit, but to no avail.

So, is there any way to get custom messages to appear and disappear with a ReportViewer control?

  • 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-24T16:32:14+00:00Added an answer on May 24, 2026 at 4:32 pm

    Okay – I’ve got something that works

    Previous I had this:

    <asp:Label runat="server" ID="ReportErrorMessage" Visible="false" CssClass="report-error-message">
    </asp:Label>
    

    which I was updating in the code behind like this:

    ReportErrorMessage.Text = GetErrorMessage(reportException);
    ReportErrorMessage.Visible = true;
    

    and then removing like this:

    ReportErrorMessage.Visible = false;
    ReportErrorMessage.Text = string.Empty;
    

    The latter part didn’t work.

    I eventually realised that the ReportViewer control is using partial rendering and so wasn’t actually changing the label at all (and consdering that, I’ve still not quite figured out how the initial display actually worked, but anyway…)

    The solution was to wrap the label in an update panel like this:

    <asp:UpdatePanel runat="server">
        <ContentTemplate>
            <asp:Label runat="server" ID="ReportErrorMessage" Visible="false" CssClass="report-error-message">
            </asp:Label>
        </ContentTemplate>
    </asp:UpdatePanel>
    

    UPDATE

    I’ve also added a full explanation onto my blog: Friendly Error Messages with Microsoft Report Viewer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a reportviewer (Microsoft.ReportViewer.WebForms) control on my page. All my reports use one
In Microsoft ReportViewer Web server control I have a report in RDLC that binds
1) I have a ReportViewer control on a page that's linked to a ServerReport
Is it possible for the Microsoft ReportViewer control to prompt for parameters in local
I have a simple .NET 4.0 web forms app that references the Microsoft.ReportViewer namespace:
Does anyone have a recommendation for an excellent reference on Microsoft's ReportViewer (VS 2008
Using the viewer control for display of SQL Reporting Services reports on web page
When working with ReportViewer in Winforms and Microsoft reports is possible to have a
I'm using the latest (2010) ReportViewer Web Control in an ASP.NET 4 project. My
I have an ASP.NET app that exposes a Microsoft ReportViewer (actually an MVC3 app

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.