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:
VB Code:
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()
Is the below code the correct way to exclude a null in my report?
VB Code:
If (isNull({TD2.Date})) Then {TD2.Date} & " " End if
Thanks!
Chris




Reply With Quote