'Create Temp Storage
Dim strSelect As String 'Create Report instance Dim Report As New UIBenSummrpt 'Set Mouse Pointer to busy Screen.MousePointer = vbHourGlass 'Set Crystal Reports smartviewer source to report CRViewer1.ReportSource = Report 'Reset Reports selection criteria Report.RecordSelectionFormula = "" 'Create a string for selection criteria strSelect = "{ado.Client}= '" & strClient & "' _ AND " & "{ado.Year}= '" & strYear & "'" 'Set Report's selection criteria Report.RecordSelectionFormula = strSelect 'Display Report CRViewer1.ViewReport 'Reset the mouse pointer icon Screen.MousePointer = vbDefault Inputs:'{ado.Client} is Database.FieldName {ado.Year}-//- strClientis textbox in which user can input data strYear-//- Assumes: You must have Crystal Report Viewer Control (crviewer.dll) component on the form |