Option Explicit
Dim m_Application As New CRAXDDRT.Application
Dim m_Report As New CRAXDDRT.Report


Private Sub Form_Load()
Call Form_Resize
Dim ReportFile As String
ReportFile = App.Path & "\TestReport2.rpt"
Set m_Report = m_Application.OpenReport(ReportFile)
CrViewer.ReportSource = m_Report
CrViewer.Zoom 1
'm_Report.RecordSelectionFormula = "{AccountCivition.DiscountAccount} = 'عن طريق الخزانة' "
'm_Report.RecordSelectionFormula = "{AccountCivition.AimDateAccount} >=# 1/1/2005 # And  AccountCivition.AimDateAccount <= # 31/12/2005 #"
m_Report.SQLQueryString = "SELECT * FROM AccountCivition WHERE AimDateAccount BETWEEN #01/01/2004# AND #4/4/2005# AND DiscountAccount = 'عن طريق الخزانة'"


CrViewer.ViewReport
Screen.MousePointer = vbDefault
End Sub

Private Sub Form_Resize()
 CrViewer.Top = 0
    CrViewer.Left = 0
    CrViewer.Height = Me.ScaleHeight
    CrViewer.Width = Me.ScaleWidth
End Sub

