S
slinky
Thanks in advance... I have a main form which I have Menu items for
users to choose reports to run. When the user chooses a report another
form pops up - on there is a combobox from which the user chooses one
of five items, each calling a different report, and an OK button and a
Cancel button. Below is my code so far from my main form:
Private Sub mnuInsuranceTypes_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles mnuInsuranceTypes.Click
Dim report As CrystalDecisions.CrystalReports.Engine.ReportDocument
report = New
CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim frmOpts As frmReportOpts9 = New frmReportOpts9
If frmOpts.cboProductType.SelectedValue = "Medical" Then
Global.Crystal(report, "\Health.rpt")
Me.Cursor.Current = Cursors.WaitCursor
frmOpts.Dispose()
Dim f As New frmViewer
f.CrystalReportViewer.ReportSource = report
f.Show()
f = Nothing
Me.Show()
Me.Cursor.Current = Cursors.Default
(there are four additional blocks of code for the other "Selected
Values")
My question is how can I insert above a line of code that not only
handles the combobox "frmOpts.cboProductType.SelectedValue" but also
the "OK" button?
In pseudo code "If Combobox = Medical AND OK button = pressed, then
run report"
users to choose reports to run. When the user chooses a report another
form pops up - on there is a combobox from which the user chooses one
of five items, each calling a different report, and an OK button and a
Cancel button. Below is my code so far from my main form:
Private Sub mnuInsuranceTypes_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles mnuInsuranceTypes.Click
Dim report As CrystalDecisions.CrystalReports.Engine.ReportDocument
report = New
CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim frmOpts As frmReportOpts9 = New frmReportOpts9
If frmOpts.cboProductType.SelectedValue = "Medical" Then
Global.Crystal(report, "\Health.rpt")
Me.Cursor.Current = Cursors.WaitCursor
frmOpts.Dispose()
Dim f As New frmViewer
f.CrystalReportViewer.ReportSource = report
f.Show()
f = Nothing
Me.Show()
Me.Cursor.Current = Cursors.Default
(there are four additional blocks of code for the other "Selected
Values")
My question is how can I insert above a line of code that not only
handles the combobox "frmOpts.cboProductType.SelectedValue" but also
the "OK" button?
In pseudo code "If Combobox = Medical AND OK button = pressed, then
run report"