I would like to print all sales by user and region then print the user and regions with no sales (in one report). I use the code below to successfully print each one seperately but I would like the results in one report. I'm probably missing something easy.
Short of combining the data into a hidden grid then printing the grid is there a way to write the query? Or erhaps exiting out with the hasMorePages somehow?
g_strMySQL = "Select * From EMPL Where Sales > 0 Order By Lname, FName, Region"
g_Connect_To_Reader()
If g_objReader.HasRows Then
ppdPrintPreview.Document = Me.prtDocument
Me.prtDocument.Dispose()
ppdPrintPreview.WindowState = FormWindowState.Maximized
ppdPrintPreview.FormBorderStyle = FormBorderStyle.Fixed3D
ppdPrintPreview.ShowDialog()
End If
g_strMySQL = "Select * From EMPL Where Orders < 1 Order By Lname, FName, Region"
g_Connect_To_Reader()
If g_objReader.HasRows Then
ppdPrintPreview.Document = Me.prtDocument
Me.prtDocument.Dispose()
ppdPrintPreview.WindowState = FormWindowState.Maximized
ppdPrintPreview.FormBorderStyle = FormBorderStyle.Fixed3D
ppdPrintPreview.ShowDialog()
End If
Short of combining the data into a hidden grid then printing the grid is there a way to write the query? Or erhaps exiting out with the hasMorePages somehow?
g_strMySQL = "Select * From EMPL Where Sales > 0 Order By Lname, FName, Region"
g_Connect_To_Reader()
If g_objReader.HasRows Then
ppdPrintPreview.Document = Me.prtDocument
Me.prtDocument.Dispose()
ppdPrintPreview.WindowState = FormWindowState.Maximized
ppdPrintPreview.FormBorderStyle = FormBorderStyle.Fixed3D
ppdPrintPreview.ShowDialog()
End If
g_strMySQL = "Select * From EMPL Where Orders < 1 Order By Lname, FName, Region"
g_Connect_To_Reader()
If g_objReader.HasRows Then
ppdPrintPreview.Document = Me.prtDocument
Me.prtDocument.Dispose()
ppdPrintPreview.WindowState = FormWindowState.Maximized
ppdPrintPreview.FormBorderStyle = FormBorderStyle.Fixed3D
ppdPrintPreview.ShowDialog()
End If