Solution to overcome the message “Report processing was cancelled“ while rendering report in VS.NET report viewer control

December 15, 2010 at 3:39 am 2 comments

This message will come if we have both the  SetDisplayMode() & RefreshReport() like below

ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
Me.ReportViewer1.RefreshReport();

The SetDisplayMode internally calls RefreshReport() and
at the same time as per the second statement above we also explicitly call the RefreshReport() hence the
previous call will gets cancelled hence the message “Report processing was cancelled”. The same applies if we call refreshReport() first and then SetDisplayMode()

To overcome this message, don’t call RefreshReport() when you have SetDisplayMode().

Advertisement

Entry filed under: Uncategorized. Tags: .

Informative and must know tips and details for Amazon Kindle e-Reader users nook color ebook reader is awesome

2 Comments Add your own

  • 1. Kutu kupret  |  February 26, 2011 at 3:25 pm

    Thanks for share this article, I have solved my problem :)

    Reply
  • 2. mike  |  October 26, 2011 at 5:34 pm

    where to call this from though? formload? renderingCompleted?

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 4 other followers


Follow

Get every new post delivered to your Inbox.