views:

528

answers:

2

We're using SQL Server Reporting Services embedded using the Report Viewer control on a Win32 VB.net page. Currently targeting .net 2.0, we can possibly move to 3.5 if it'll fix the issue.

When you view the report you can see the entire thing, however, when pressing print preview the last page of the report fails to be shown. The page number on the bottom of the report will say "Page 1 of 2" or Page "1 of N" but you can only actually see pages 1 through N-1.

The same thing happens when you just try to print the report. But if I go to print preview, back to normal view, and print preview again I can see the entire report.

How do I fix this??

A: 

I ran into a similar issue.

If you are calling the SetDisplayMode() method to put the report viewer in in print layout mode and then calling the RefreshReport() method, this behavior can result. SetDisplayMode() automatically calls RefreshReport(), so RefreshReport is getting called twice. This can cause some of the last pages to not display. Therefore, just call SetDisplayMode() and leave it at that.

NYSystemsAnalyst
We are just using the built in controls and still receive this.
dilbert789
+1  A: 

It appears that changing the referenced DLL for the Microsoft.ReportViewer.WinForms from V8 to V9 works.

dilbert789