I am new to Visual Studio and VB and am stumbling along but have hit a roadblock. I am attempting to build a very basic database application that needs to 1) allow input & manipulation of data into a table via a small interface and 2) output data to a report and allow for printing. My goal is to help with uniform ordering for the kitchen staff at the restaurant at which I work.
Thusfar I have created Uniform_Order_App.vb, which builds successfully and functions properly (i.e., allows input, stores data in the table properly, and saves new entries). This Uniform_Order_App form contains several fields and a button. This button is from whence my problems stem! I have also created UniformReport.rdlc (which I suppose will show me the data I have input in the layout I have specified). I have also created a windows form and dropped a ReportViewer into it. I have named this form ReportViewerX.vb and have left it unchanged from the defaults set up by Visual Studio. The code for that form is here:
Expand|Select|Wrap|Line Numbers
- Public Class ReportViewerX
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- 'TODO: This line of code loads data into the '_uniform_order_backwards_compatable_DataSet.Order_Sheet_1' table. You can move, or remove it, as needed.
- Me.Order_Sheet_1TableAdapter.Fill(Me._uniform_order_backwards_compatable_DataSet.Order_Sheet_1)
- Me.ReportViewer1.RefreshReport()
- End Sub
- End Class
I have tried using the following code
Expand|Select|Wrap|Line Numbers
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim ReportViewerX As New Form
- Me.ActivateMdiChild(WindowsApplication1.ReportViewerX)
- End Sub
Am I on the right track, or am I way off base? Any help would be greatly appreciated. I am in no real hurry and am willing to try whatever suggestions you may have.
Thank you in advance!