Hi I have the following issue
I have a program that counts the number of times a name appears in a Colum.
The information is made visible with a Crystal report.
But now i want to only count the names in the table where the Afmeld_datum colum, Which is in date format, is between two dates.
I'm using Microsoft Visual Studio 2005
Microsoft Visual Basic 2005
Crystal Reports for Visual Studio 2005
I use the following code:
VB Code:
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim mySelectFormula As String = "{SOverzicht.Afmeld_datum} BETWEEN '" & DateTimePicker1.Value.Date & "' AND '" & DateTimePicker2.Value.Date & "'" CrystalReportViewer1.SelectionFormula = mySelectFormula CrystalReportViewer1.ReportSource = Folder & "Test3.rpt" End Sub
The following code which i used before does work
VB Code:
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim mySelectFormula As String = "{SOverzicht.Gehaald} like 'J'" CrystalReportViewer1.SelectionFormula = mySelectFormula CrystalReportViewer1.ReportSource = "C:\Documents and Settings\Windows\Mijn documenten\Visual Studio 2005\Projects\Crystal test\Crystal test\Test3.rpt" End Sub
I get the following error:
![]()




Reply With Quote