I'm new to this forum, just started working in VB .Net and I'm now starting my first project.
I ran into a little snag today, spent quiet a bit of time trying to fix it but you can't fix something if you don't understand what's going on, right?
So two things - can someone explain why I'm getting the error In the attached screen shot and how do I fix it?
Additional info:
Intellisense is suggesting that I generate a constructor sub in frm_reportviewer1 but when I do I get some more errors saying "reference to a non-shared member requires an object reference" (I get this when I say frm_reportviewer.show()
It's hard to say without understanding some of the references in your code.
Assuming the frm_ReportViewer1 is a form in your project, the New method by default doesn't have any parameters, so if you wanted to create a new instance of the form it would be:
Dim FRM As New frm_ReportViewer1()
If you wanted to pass an object to the form so it could reference the object, then you would need to create another constructor that handled that passed object.
It sounds like that is what you did.
In which case, you would want to use the instance you created, not the class name.
So instead of
frm_ReportViewer1.Show()
you would use the instance created
FRM.Show()
Of course the instance named FRM would still have to exist, and the bit of code you show has it declared locally and used by calling FRM.ShowDialog(), so that should work.
I'm not sure where you are trying to do frm_reportviewer.show().
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe