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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Studio designer throwing an error which is in error

Status
Not open for further replies.

cdck

Programmer
Nov 25, 2003
281
0
0
US
I'm working on a vb.net windows forms application using Visual Studio 2008. I have two forms which have tab controls on them. On each tab control, one of the tabs has a reportviewer.

On both forms, when I first open them in design view, I get an error telling me that the reportviewer control is either undeclared or was never assigned. If I choose to go to the code from that error on one of the forms, it brings me to:

Me.tbPrint.Controls.Add(Me.rpSheets)

In this case, on line 270. However, looking up in the code to line 49, I find:

Me.rpSheets = New Microsoft.Reporting.WinForms.ReportViewer

I've confirmed that the tab control is actually declared before the reportviewer.

I have to "ignore and continue" these errors when I'm opening the design view of the form, every time. Has anyone else experienced this, or does anyone have any suggestions?


Cheryl dc Kern
 
I should note that on each form, along with the undeclared error listed above, I also get an error which indictates that "value does not fall within the expected range". But this error does not direct me to a line of code where the issue arises. I have no idea how to figure out the cause if I cannot see what the value is that it doesn't like. As this error is always listed first, it may be the cause of the error I listed above.

Cheryl dc Kern
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top