Hello,
I am relatively new to Crystal Reports w/ .NET. I have a database table in SQL Server 2000 that has a few Nulls in the "Date" field. Is there a way to skip over the <nulls> when I'm running a count? For now the report doesn't even load in the CrystalReportViewer because of these nulls. Here is my code so far:
[Highlight=VB]
Dim objDate_AccountRep As CrystalDecisions.CrystalReports.Engine.ReportDocument
objDate_AccountRep = New crDate_AccountRep()
objDate_AccountRep.DataDefinition.RecordSelectionFormula = "CDate({TD2.Date}) >=#" & strStartDate & "# and CDate({TD2.Date}) <=#" & strEndDate & "#"
ReportViewerDate_AccountRep.ReportSource = objDate_AccountRep
ReportViewerDate_AccountRep.RefreshReport()
In the below code what would be the correct line to put in to skip the record?
VB Code:
If (isNull({TD2.Date})) Then 'Code to skip this record ' ??? Else ({TD2.date}) End if
Thanks!
Chris




Reply With Quote