Hey Crystal Report Guru's and Masters Could Someone help me about this problem...i want to filter data using a datetime range this is my code
Dim cry_App As New CRAXDRT.Application
Dim cry_Rep As New CRAXDRT.Report
Dim cry_DatabseTables As CRAXDDRT.DatabaseTables
Dim cry_DatabseTable As CRAXDDRT.DatabaseTable
Dim cry_Databse As CRAXDDRT.Database
Dim cry_Param As CRAXDDRT.ParameterValues
Dim ReportName As String
ReportName = "D:\MyReport\Reports\Account_Recievables.rpt
Set cry_Rep = cry_App.OpenReport(ReportName, 1)
cry_Rep.EnableSelectDistinctRecords = True
cry_Rep.EnableParameterPrompting = True
cry_Rep.DiscardSavedData
'-----------------Formula for Filtering Data---------------------------------
cry_Rep.ParameterFields.GetItemByName("param1").Ad dCurrentRange "& DTPICKER1.VALUE &", "& DTPICKER2.VALUE & ", crRangeIncludeLowerBound + crRangeIncludeLowerBound
cry_Rep.PaperOrientation = crLandscape
cry_Rep.PaperSize = crPaperLetter
With OCCCI.CrystalActiveXReportViewer1
.ReportSource = cry_Rep
.ViewReport
.DisplayGroupTree = False
While .IsBusy
DoEvents
Wend
.Zoom "100"
.Visible = True
End With
cry_Rep.RecordSelectionFormula = ""
Set cry_Rep = Nothing
Set cry_App = Nothing
End Sub
but it has an error something saying that:
Parameter Field Value is not descrete
Could anyone help fix this problem??