Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ReportViewer (local report) sometimes skips some pages on initial view

Status
Not open for further replies.

DENewkirk

Programmer
Jan 19, 2006
14
US
Short story: Sometimes the ReportViewer displays fewer pages than it has formatted from the underlying table, often starting on "Page 2 of 5" (navigation controls say "1 of 4") or "3 of 5" (navigation controls say "1 of 1"). Clicking on the Refresh button displays all of the pages.

The problem only shows up in the Release build, never in the Debug build.

---

Long story:
I have ported an Access form to VB 2005, and everything works great with one exception. I have in one panel 4 tabs, each of which presents a different TreeView: Table of Contents, Full Index, Topical Search, and Project Table.

I have a button that invokes a ReportViewer form giving a preview report based on the selected tab's tree. I have encountered what I suspect to be a bug, but I'm not sure.

In debugging mode, I always get all data displayed in the ReportViewer forms, but when I run the Release build, the forms sometimes begin on page "2 of n" or "3 of n" (as shown on the displayed page), while the navigation controls show "1 of m", where m<>n. Pressing the refresh button seems to cure the problem.

Here is the code from one of the 4 ReportViewer forms:

[blue]Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Load data into the 'maintenance_DATADataSet.BridgeReport' table:
Me.BridgeReportTableAdapter.Fill(Me.maintenance_DATADataSet.BridgeReport)

' Default to print preview mode:
Me.BridgeReportViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout)

' Refresh the viewer to show the just-loaded data:
Me.BridgeReportViewer.RefreshReport()
End Sub[/blue]

Has anyone seen anything like this? I haven't been able to Google up a discussion of it.

Thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top