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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.