locked
Report Viewer Control Print Problem? RRS feed

  • Question

  • Hey all,

     

    Going nuts here with a report viewer control that is bound to a dataset and datatable in a windows form app.

     

    On my development machine when I select the Print Icon the report prints fine but after deployment when the Print Icon is selected by the user (this is a one page report) the print dialog will say printing page 1 of .... then the print dialog will display is 1 of 2 and fail the first time the Print Icon selected.

    • However, if you change the default print command to One Page... the control works fine on the first pass! Not working from a single click or simply by selecting the Print Icon at all!

     

    • It also works after failure on the first pass and will print the report no matter what default print options are selected! Freaking me out!

     

    Has anyone experienced this before and please... what is the cure?

     

    All the best,

    billb

    Tuesday, September 11, 2007 7:41 AM

Answers

  • Hi, billb59 and PSilva,

     

    After some research, I found this is a known issue for ReportViewer control.

    You can check this kb article for details.

    http://support.microsoft.com/kb/916812

     

    As described in this article, this fix is available but still under testing.

    You can get it through contacting the Microsoft Product Support Services,

    and the available service can be found http://support.microsoft.com/contactus/?ws=support

     

    Before that, the workaround is to click the print button twice.

     

    Hope this helps,

    Regards

    Friday, September 14, 2007 1:40 AM
  •  

    Hey PSilva,

     

    Here's what I did to make it work:

    1. Un-Check the the bootstrap reference (Microsoft Visual Studio 2005 Report Viewer) from the prerequisites in your Publish tab from project properties.
    2. Reference in your app from a browse to: C:\Program Files\Microsoft Visual Studio 8\ReportViewer\Microsoft.ReportViewer.Common.dll and the also reference C:\Program Files\Microsoft Visual Studio 8\ReportViewer\Microsoft.ReportViewer.WinForms.dll libraries... reference the Microsoft.ReportViewer.WebForms.dll if using asp.net
    3. Highlight in your project references (Microsoft.ReportViewer.Common) and be sure that the copy local is set to True and the Specific Version is set to False
    4. Highlight in your project references (Microsoft.ReportViewer.WinForms) and be sure that the copy local is set to True and the Specific Version is set to False as well.
    5. compile and deploy your app.... it should work.

    Turns out this is a known bug from MS and this is the workaround.

     

    Hope this helps,

    billb

    Wednesday, September 26, 2007 6:08 PM

All replies

  • Hi, billb59,

     

    Could you tell us the failure message?

    Does it help if you start from print preview?

     

    Regards

    Thursday, September 13, 2007 8:37 AM
  • I have the exact same problem!

    I would also like to add one information:

     

    The first time the user tries to print and clicks on the print button of the Report Viewer, the Print Dialog shows and, in the Page Range section, it only shows "1" on the text box next to the "Pages" option button, independently of how many pages the report has (I've tried it with a 2 pages report and also with a 51 pages report).

     

    On the second time he tries to print, the Page Range appears correctly (ie 1-2 on the first report and 1-51 on the second)...

     

    I can't do anything now and would really like to get some help on this because all the users (+70) are complaining that they always have to press 2 times on the report viewer print button, plus they all have to trash a whole load of paper (1st pages)...

     

    Thursday, September 13, 2007 4:45 PM
  • Hi, billb59 and PSilva,

     

    After some research, I found this is a known issue for ReportViewer control.

    You can check this kb article for details.

    http://support.microsoft.com/kb/916812

     

    As described in this article, this fix is available but still under testing.

    You can get it through contacting the Microsoft Product Support Services,

    and the available service can be found http://support.microsoft.com/contactus/?ws=support

     

    Before that, the workaround is to click the print button twice.

     

    Hope this helps,

    Regards

    Friday, September 14, 2007 1:40 AM
  • Hi Yu Guo.

     

    I've done as you said in your post but my customer still has the same problem.

     

    The MSFT support sent me a Visual Studio 2005 hotfix and we recompiled the entire application, but the problem persists.

     

    I really don't know what else to do.

     

    Can anyone please help me out here?

     

    Thanks!

    Wednesday, September 26, 2007 4:14 PM
  •  

    Hey PSilva,

     

    Here's what I did to make it work:

    1. Un-Check the the bootstrap reference (Microsoft Visual Studio 2005 Report Viewer) from the prerequisites in your Publish tab from project properties.
    2. Reference in your app from a browse to: C:\Program Files\Microsoft Visual Studio 8\ReportViewer\Microsoft.ReportViewer.Common.dll and the also reference C:\Program Files\Microsoft Visual Studio 8\ReportViewer\Microsoft.ReportViewer.WinForms.dll libraries... reference the Microsoft.ReportViewer.WebForms.dll if using asp.net
    3. Highlight in your project references (Microsoft.ReportViewer.Common) and be sure that the copy local is set to True and the Specific Version is set to False
    4. Highlight in your project references (Microsoft.ReportViewer.WinForms) and be sure that the copy local is set to True and the Specific Version is set to False as well.
    5. compile and deploy your app.... it should work.

    Turns out this is a known bug from MS and this is the workaround.

     

    Hope this helps,

    billb

    Wednesday, September 26, 2007 6:08 PM