Reportviewer doesn't print first time I click print button

I use a WindowsForm Reportviewer. C# 2.0

I generate the report and all is OK but when the user try to print (print button in toolbar), the application open the printdialog, I select the printer and press Ok. But the application doesn't generate a document.

When I try again, all work fine.

If I close the application and restart, occurs the same (first doesn't works, second works, all time works).

somebody have any idea

Thanks form Spain.

 

 

 

 

 

 

 



Answer this question

Reportviewer doesn't print first time I click print button

  • klaus klaussen

    Nice to know that it has been fixed. Not in my version.
  • Josh K

    Yes, if you touch the dialog box in any way that sets the focus to the box and it will print. But you have to click on the box and do something first. That shifts the focus.
  • BANND

  • Nic Butler

    Are you using the RTM version of the controls and of the 2.0 framework   We saw issues like this with the .Net Framework 2.0 CTPs.
  • vgrigor

    I have been taking hit from clients repeatedly for these bugs. Today, I revisted one of issues again, found a workaround. Originally I put these lines after the line of

    Me.ReportViewer1.RefreshReport(), it often gives wrong total page number. Hope putting in the renderingComplete event will work perfectly.

    It still doesn't solve the print button in the print dialouge though.

    Private Sub ReportViewer1_RenderingComplete(ByVal sender As Object, ByVal e As Microsoft.Reporting.WinForms.RenderingCompleteEventArgs) Handles ReportViewer1.RenderingComplete

    Me.ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)

    Me.ReportViewer1.ZoomMode = ZoomMode.PageWidth

    End Sub

     



  • LordChaos010

    Yes I use a RTM version. But maybe my client has a diferent version (I'm going to see), because in my computer works fine, but in client's computer doesn't works.

    I'll download the last redistibutable.

    Thank for advice. I'll post the result tonight.

     

     

     


  • jimmyshu

    Yes, my clients version framework is 2.050727 (the last one).

     


  • Atomican

    I don't think they are fixed, I don't know why they claimed one of the two bugs is fixed, the clainm date is even in August.

  • Jay S

    Brian,

    Thanks for responding to this issue.  I think the long term solution to these types of bugs is to keep the feedback center open after rtm.  That way verified bugs can be rolled into the next service pack.  Just an idea.



  • Alex61291

    I haven't even gotten around to reporting this because I have too many other issues, but I have the same thing happening (VB2005 RTM). In fact, the print dialog does not have the focus even though it looks like it does. If you try to drag it by grabbing the title bar that doesn't work either. After that it will. It looks like something on the report is somehow hanging on to the focus and clicking on the PD gives it the focus, then you have to click again for anything to happen.
  • donald_hodges

    These are definetly not fixed.  I've been using the RTM bits for months on a cleanly formatted machine.  I hope there is a service pack to address these issues soon.  It seems like Microsoft said something about a Service Pack for .NET and SQL in the first half of the year.

  • bluej41

    We have reproduced the print dialog problem on the RTM build of Whidbey.  We're investigating a fix.
  • Lorenzom

    I noticed the same problem, but also discovered that if you enter the page range manually in the print dialog box the report will print the first time.

  • admoloc

    I am having the very same problem.  Using the winforms reportviewer the report nevers prints the first time.  It even appears to start spooling to the printer but disappears and does not print.  Also, the .autoprint method also fails to print the first time.  I can confirm this on multiple xp machines all running rtm 2.0 framework (not ctp or rc).  This appears to only be a problem rendering to a printer, rendering to any other format is not an issue.

  • Reportviewer doesn't print first time I click print button