Not show Blank page when DataSet Don't Have Records
I was trying to not show report page when query dozen's have records, because otherwise Fast-Reports Viewer will show blank page. Please look below my VB coding and check whether what is wrong with my code?
Private sub command23 Click()
Set frx = CreateObject("FastReport.TfrxReport")
frx.LoadReportFromFile (App.Path & "\Reports\Groups\VisaFEE.fr3")
Set Query = frx.FindObject("AdoQuery1")
Set Param = Query.ParamByName("Param1")
Param.Expression = InputBoxXP("Please enter > Day", "Enter Days")
If Query Is Nothing Then
MsgBoxGT ("No Record has been found"), vbCritical, "Mare"
Set Param = Nothing
Set Query = Nothing
Set frx = Nothing
Exit Sub
frx.ShowReport
Set Param = Nothing
Set Query = Nothing
Set frx = Nothing
End If
End sub
Regards,
Riyaz
Private sub command23 Click()
Set frx = CreateObject("FastReport.TfrxReport")
frx.LoadReportFromFile (App.Path & "\Reports\Groups\VisaFEE.fr3")
Set Query = frx.FindObject("AdoQuery1")
Set Param = Query.ParamByName("Param1")
Param.Expression = InputBoxXP("Please enter > Day", "Enter Days")
If Query Is Nothing Then
MsgBoxGT ("No Record has been found"), vbCritical, "Mare"
Set Param = Nothing
Set Query = Nothing
Set frx = Nothing
Exit Sub
frx.ShowReport
Set Param = Nothing
Set Query = Nothing
Set frx = Nothing
End If
End sub
Regards,
Riyaz