I am a VB6 Programmer, Iam tyring to view a .rpt file using the CRViewer control in VB. The Report is not showing in the CR Viewer control , it gives a message Server has not yet been opened. but it is displaying when I use Access database.
I am using a SQL Server 2000 database. Could u please tell me how to connect the database to the crviewer.. Iam pasting the source code below..Kindly help.

Set cReport = appn.OpenReport(App.Path + "\reports\rptsearch.rpt")
cReport.Database.LogOnServer "pdsodbc.dll", "humaida", ldvahan, sa, sa

cReport.DiscardSavedData
CRViewer1.ReportSource = cReport
cReport.PaperSize = crPaperA4
CRViewer1.ViewReport