outofcontrol
MIS
I hope that someone can help with this issue; I am a novice so I appreciate the help.
Here is what I did:
I created six reports in crystal 10
I created a menu in VB.NET that has six buttons in which each button pops a new form that has a crystal viewer on it. Each crystal viewer has one of the reports to present
when the close the window the menu then reappears
My Problem is I need a way to pass the SQL password along so the user is not prompted.
OR if there is an easier way to program this; I would appreciate it
Thanks
Joe
Copy of the code is below
Public Class mainmenuForm
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents UnpostedButton As System.Windows.Forms.Button
Friend WithEvents exitButton As System.Windows.Forms.Button
Friend WithEvents allhoursButton As System.Windows.Forms.Button
Friend WithEvents benchButton As System.Windows.Forms.Button
Friend WithEvents billablehoursButton As System.Windows.Forms.Button
Friend WithEvents payrollButton As System.Windows.Forms.Button
Friend WithEvents postedButton As System.Windows.Forms.Button
Friend WithEvents report40Button As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.UnpostedButton = New System.Windows.Forms.Button
Me.payrollButton = New System.Windows.Forms.Button
Me.billablehoursButton = New System.Windows.Forms.Button
Me.postedButton = New System.Windows.Forms.Button
Me.report40Button = New System.Windows.Forms.Button
Me.benchButton = New System.Windows.Forms.Button
Me.allhoursButton = New System.Windows.Forms.Button
Me.exitButton = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'UnpostedButton
'
Me.UnpostedButton.Location = New System.Drawing.Point(72, 472)
Me.UnpostedButton.Name = "UnpostedButton"
Me.UnpostedButton.Size = New System.Drawing.Size(152, 40)
Me.UnpostedButton.TabIndex = 0
Me.UnpostedButton.Text = "Unpost Time Sheet Report"
'
'payrollButton
'
Me.payrollButton.Location = New System.Drawing.Point(72, 256)
Me.payrollButton.Name = "payrollButton"
Me.payrollButton.Size = New System.Drawing.Size(152, 40)
Me.payrollButton.TabIndex = 1
Me.payrollButton.Text = "Payroll Hours Report"
'
'billablehoursButton
'
Me.billablehoursButton.Location = New System.Drawing.Point(72, 184)
Me.billablehoursButton.Name = "billablehoursButton"
Me.billablehoursButton.Size = New System.Drawing.Size(152, 40)
Me.billablehoursButton.TabIndex = 3
Me.billablehoursButton.Text = "Billable Hours Report"
'
'postedButton
'
Me.postedButton.Location = New System.Drawing.Point(72, 328)
Me.postedButton.Name = "postedButton"
Me.postedButton.Size = New System.Drawing.Size(152, 40)
Me.postedButton.TabIndex = 4
Me.postedButton.Text = "Posted Sheet Report"
'
'report40Button
'
Me.report40Button.Location = New System.Drawing.Point(72, 400)
Me.report40Button.Name = "report40Button"
Me.report40Button.Size = New System.Drawing.Size(152, 40)
Me.report40Button.TabIndex = 5
Me.report40Button.Text = "Report Less Then 40 Report"
'
'benchButton
'
Me.benchButton.Location = New System.Drawing.Point(72, 112)
Me.benchButton.Name = "benchButton"
Me.benchButton.Size = New System.Drawing.Size(152, 40)
Me.benchButton.TabIndex = 6
Me.benchButton.Text = "Bench Report"
'
'allhoursButton
'
Me.allhoursButton.Location = New System.Drawing.Point(72, 40)
Me.allhoursButton.Name = "allhoursButton"
Me.allhoursButton.Size = New System.Drawing.Size(152, 40)
Me.allhoursButton.TabIndex = 7
Me.allhoursButton.Text = "All Hours Report1"
'
'exitButton
'
Me.exitButton.Location = New System.Drawing.Point(104, 584)
Me.exitButton.Name = "exitButton"
Me.exitButton.TabIndex = 8
Me.exitButton.Text = "E&xit"
'
'mainmenuForm
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 630)
Me.Controls.Add(Me.exitButton)
Me.Controls.Add(Me.allhoursButton)
Me.Controls.Add(Me.benchButton)
Me.Controls.Add(Me.report40Button)
Me.Controls.Add(Me.postedButton)
Me.Controls.Add(Me.billablehoursButton)
Me.Controls.Add(Me.payrollButton)
Me.Controls.Add(Me.UnpostedButton)
Me.Name = "mainmenuForm"
Me.Text = "Main Menu"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UnpostedButton.Click
' prompt the user for the report that they wish to run
Dim unpostedForm As New unpostedForm
unpostedForm.Show()
End Sub
Private Sub exitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click
' close the form
Me.Close()
End Sub
Private Sub allhoursButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles allhoursButton.Click
' prompt the user for the report that they wish to run
Dim allhoursForm As New allhoursForm
allhoursForm.Show()
End Sub
Private Sub benchButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles benchButton.Click
' prompt the user for the report that they wish to run
Dim benchreportForm As New benchreportForm
benchreportForm.Show()
End Sub
Private Sub billablehoursButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles billablehoursButton.Click
' prompt the user for the report that they wish to run
Dim billablehoursForm As New billablehoursForm
billablehoursForm.Show()
End Sub
Private Sub payrollButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles payrollButton.Click
' prompt the user for the report that they wish to run
Dim payrollhoursForm As New payrollhoursForm
payrollhoursForm.Show()
End Sub
Private Sub postedButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles postedButton.Click
' prompt the user for the report that they wish to run
Dim postedtimesheetForm As New postedtimesheetForm
postedtimesheetForm.Show()
End Sub
Private Sub report40Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles report40Button.Click
' prompt the user for the report that they wish to run
Dim reportlessthen40hoursForm As New reportlessthen40hoursForm
reportlessthen40hoursForm.Show()
End Sub
End Class
Here is what I did:
I created six reports in crystal 10
I created a menu in VB.NET that has six buttons in which each button pops a new form that has a crystal viewer on it. Each crystal viewer has one of the reports to present
when the close the window the menu then reappears
My Problem is I need a way to pass the SQL password along so the user is not prompted.
OR if there is an easier way to program this; I would appreciate it
Thanks
Joe
Copy of the code is below
Public Class mainmenuForm
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents UnpostedButton As System.Windows.Forms.Button
Friend WithEvents exitButton As System.Windows.Forms.Button
Friend WithEvents allhoursButton As System.Windows.Forms.Button
Friend WithEvents benchButton As System.Windows.Forms.Button
Friend WithEvents billablehoursButton As System.Windows.Forms.Button
Friend WithEvents payrollButton As System.Windows.Forms.Button
Friend WithEvents postedButton As System.Windows.Forms.Button
Friend WithEvents report40Button As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.UnpostedButton = New System.Windows.Forms.Button
Me.payrollButton = New System.Windows.Forms.Button
Me.billablehoursButton = New System.Windows.Forms.Button
Me.postedButton = New System.Windows.Forms.Button
Me.report40Button = New System.Windows.Forms.Button
Me.benchButton = New System.Windows.Forms.Button
Me.allhoursButton = New System.Windows.Forms.Button
Me.exitButton = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'UnpostedButton
'
Me.UnpostedButton.Location = New System.Drawing.Point(72, 472)
Me.UnpostedButton.Name = "UnpostedButton"
Me.UnpostedButton.Size = New System.Drawing.Size(152, 40)
Me.UnpostedButton.TabIndex = 0
Me.UnpostedButton.Text = "Unpost Time Sheet Report"
'
'payrollButton
'
Me.payrollButton.Location = New System.Drawing.Point(72, 256)
Me.payrollButton.Name = "payrollButton"
Me.payrollButton.Size = New System.Drawing.Size(152, 40)
Me.payrollButton.TabIndex = 1
Me.payrollButton.Text = "Payroll Hours Report"
'
'billablehoursButton
'
Me.billablehoursButton.Location = New System.Drawing.Point(72, 184)
Me.billablehoursButton.Name = "billablehoursButton"
Me.billablehoursButton.Size = New System.Drawing.Size(152, 40)
Me.billablehoursButton.TabIndex = 3
Me.billablehoursButton.Text = "Billable Hours Report"
'
'postedButton
'
Me.postedButton.Location = New System.Drawing.Point(72, 328)
Me.postedButton.Name = "postedButton"
Me.postedButton.Size = New System.Drawing.Size(152, 40)
Me.postedButton.TabIndex = 4
Me.postedButton.Text = "Posted Sheet Report"
'
'report40Button
'
Me.report40Button.Location = New System.Drawing.Point(72, 400)
Me.report40Button.Name = "report40Button"
Me.report40Button.Size = New System.Drawing.Size(152, 40)
Me.report40Button.TabIndex = 5
Me.report40Button.Text = "Report Less Then 40 Report"
'
'benchButton
'
Me.benchButton.Location = New System.Drawing.Point(72, 112)
Me.benchButton.Name = "benchButton"
Me.benchButton.Size = New System.Drawing.Size(152, 40)
Me.benchButton.TabIndex = 6
Me.benchButton.Text = "Bench Report"
'
'allhoursButton
'
Me.allhoursButton.Location = New System.Drawing.Point(72, 40)
Me.allhoursButton.Name = "allhoursButton"
Me.allhoursButton.Size = New System.Drawing.Size(152, 40)
Me.allhoursButton.TabIndex = 7
Me.allhoursButton.Text = "All Hours Report1"
'
'exitButton
'
Me.exitButton.Location = New System.Drawing.Point(104, 584)
Me.exitButton.Name = "exitButton"
Me.exitButton.TabIndex = 8
Me.exitButton.Text = "E&xit"
'
'mainmenuForm
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 630)
Me.Controls.Add(Me.exitButton)
Me.Controls.Add(Me.allhoursButton)
Me.Controls.Add(Me.benchButton)
Me.Controls.Add(Me.report40Button)
Me.Controls.Add(Me.postedButton)
Me.Controls.Add(Me.billablehoursButton)
Me.Controls.Add(Me.payrollButton)
Me.Controls.Add(Me.UnpostedButton)
Me.Name = "mainmenuForm"
Me.Text = "Main Menu"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UnpostedButton.Click
' prompt the user for the report that they wish to run
Dim unpostedForm As New unpostedForm
unpostedForm.Show()
End Sub
Private Sub exitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click
' close the form
Me.Close()
End Sub
Private Sub allhoursButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles allhoursButton.Click
' prompt the user for the report that they wish to run
Dim allhoursForm As New allhoursForm
allhoursForm.Show()
End Sub
Private Sub benchButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles benchButton.Click
' prompt the user for the report that they wish to run
Dim benchreportForm As New benchreportForm
benchreportForm.Show()
End Sub
Private Sub billablehoursButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles billablehoursButton.Click
' prompt the user for the report that they wish to run
Dim billablehoursForm As New billablehoursForm
billablehoursForm.Show()
End Sub
Private Sub payrollButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles payrollButton.Click
' prompt the user for the report that they wish to run
Dim payrollhoursForm As New payrollhoursForm
payrollhoursForm.Show()
End Sub
Private Sub postedButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles postedButton.Click
' prompt the user for the report that they wish to run
Dim postedtimesheetForm As New postedtimesheetForm
postedtimesheetForm.Show()
End Sub
Private Sub report40Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles report40Button.Click
' prompt the user for the report that they wish to run
Dim reportlessthen40hoursForm As New reportlessthen40hoursForm
reportlessthen40hoursForm.Show()
End Sub
End Class