VB 6.0 - How could i detemine if there is a record to view

Asked By Ralph Acido on 18-Apr-06 09:22 PM
hello! how could i check whether there is a record to view in a Crystal report. below are my codes on how to display the crytal report:



Dim crystal As CRAXDRT.Application
Dim Report As CRAXDRT.Report

Private Sub Form_Load()
   
    Set crystal = New CRAXDRT.Application
    'Open Report
    Set Report = crystal.OpenReport(App.Path & "\reports\students.rpt")
        
    Report.DiscardSavedData
    
    'Link Recordset to report
    'report.Database.SetDataSource rs
    
   Report.ParameterFields.Item(1).AddCurrentValue (frmcoll_report.dtpStartDate.Value)
   Report.ParameterFields.Item(2).AddCurrentValue (frmcoll_report.dtpEndDate.Value)
    
    
    'Link Viewer to report
    CRViewer.ReportSource = Report
    
    CRViewer.ViewReport
           
    CRViewer.Zoom 94
        
    Set crystal = Nothing
    Set Report = Nothing
    WindowState = 2
End Sub


please help me what statement should i place in order to determine if there are records to view... thanks!

Check this: - Asked By J S on 19-Apr-06 05:53 AM

http://www.codeguru.com/forum/archive/index.php/t-343411.html

http://www.experts-exchange.com/Databases/Crystal_Reports/Q_21756703.html