Yes, there's only one error message :
"Type CustomReportClass is not defined"
Here is the whole Form Class:
Imports
CrystalDecisions.CrystalReports.Engine
Imports
CrystalDecisions.Shared
Public
Class Form1
Inherits System.Windows.Forms.Form
Private customersByCityReport As CustomersByCity
Private Sub ConfigureCrystalReports()
customersByCityReport = New CustomersByCity
myCrystalReportViewer.ReportSource = customersByCityReport
End Sub
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
ConfigureCrystalReports()
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myReport As New CustomReportClass
myReport.DataDefinition.FormulaFields("initial") = DateTimePicker1.Text
myReport.DataDefinition.FormulaFields("final") = DateTimePicker2.Text
myCrystalReportViewer.ReportSource = myReport
End Sub
End Class
I ommited the rest of the Region because I didn't change anything there.
From the tutorial I followed this route:
Tutorials-ReportDocumentObject Model Tutorials - Reading and Setting Discrete Parameters - Introduction
I followed the Set-Up instructions and then the Binding instructions because i did my own report and for the parameters i followed your indications, I think it's almost done, the only problem is the CustomReportClass...
Edited by aleplgr - 26 Feb 2007 at 2:16am