[Self-RESOLVED] Creating a Report using CR 9
Hi! I have a form which has two DTPicker and a listview. The listview display a record based on the startdate and enddate of the DTPicker. After the records are displayed, A button will be click to open another form (frmViewSalesRpt) which has a crviewer in it.
My Question is how do i pass the records of the listview to the crviewer?
or is there other way to do it?
Here's my code:
VB Code:
Private Sub Form_Load()
Call openConnection
Me.Left = 2640
Me.Top = 325
sSQL = "SELECT * FROM TblSales"
Set oRsSales = New ADODB.Recordset
Set oRsSales = oConn.Execute(sSQL)
Set oApp = New CRAXDRT.Application
Set oReport = oApp.OpenReport(App.Path & "\Reports\Sales.rpt", 1)
oReport.Database.SetDataSource oRsSales, 4, 1
CRViewer91.ReportSource = oReport
CRViewer91.ViewReport
End Sub
Right now my code (from RobDog888) will display the whole database records not the records specified/displayed in the listview.
Re: Creating a Report using CR 9
Anyone help here please? Currently i have 45 records. 15 of which are dated May 7, 2006, 28 dated May 8, 2006 and the 2 dated May 10, 2006. how do i display the records of specific Dates using crviewer?
Help please.