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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:57:17+00:00 2026-05-25T23:57:17+00:00

Winform application contains one form with a reportViewer control. When the form is initialized

  • 0

Winform application contains one form with a reportViewer control. When the form is initialized the report is generated but when I try to programmatically run a PrintDialog on the reportviewer I get a ‘Operations is not valid due to the current state of the object’ error message.

When I comment out the PrintDialog line the report form shows fine. I think the problem is a lag as it generates the form/report. Is there a way to wait until the form loads before launching the PrintDialog?

Code excerpt:

this.reportViewer1.RefreshReport();
this.reportViewer1.PrintDialog();

UPDATE

Solution is (as suggested):

private void form_load(...)
{
    createReport;
    this.reportViewer1.RefreshReport();
}

private void reportViewer1_RenderingComplete(...)
{
    this.reportViewer1.PrintDialog();

}
  • 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-25T23:57:17+00:00Added an answer on May 25, 2026 at 11:57 pm

    This article suggestions you can’t/shouldn’t call PrintDialog until the RenderingComplete event fires:

    http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportviewer.renderingcomplete(v=vs.80).aspx

    http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/a8993f3e-7787-4e0a-b32f-fcfbf8df8001/

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

Sidebar

Related Questions

I'm tweaking a WinForms application. This application has a Form that contains a PropertyGrid
One of our clients has an old WinForms application that contains forms with a
I have a .NET application containing a WinForm. This WinForm contains an unmanaged ActiveX
I want to create grid view which contains CheckBoxes dynamically in my winform application.
In a VB.NET Winforms application, I have a form that contains both a datagridview
In a C# Winforms (3.5) application I have added a class that contains many
My winform application is launched by another application (the parent), I need determine the
I have a Winform application built with C# and .Net 2.0. I have a
I have my winform application gathering data using databinding. Everything looks fine except that
In a simple winform application, I call a function that endlessy create files on

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.