General information
Category:
Database DAO/RDO/ODBC/ADO
Hi Derek,
You need to have two files to use Crystal Reports effectively. The first is the actual crystal report, (let's call it some_report.dsr and it should be in the Designer folder of your project) and then the crystal report viewer (let's call it some_report.frm and it should be in the Forms folder of your project). The code for the form viewer should look something like this:
=======================
Dim Report As New some_report
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
=============================
Ensure that the database is verified by going to "Field View" and right clicking on Database Fields then selecting "verify database" (from the some_report.dsr file). Make sure that the "Field Object" and "Text Objects" exist and then you should be able to view the report providing the data is there.
When calling the report from a page just use the same code as you would when calling upon a typical form. i.e. some_report.Show
That should do it!
Max
>Does anyone know how to us CRViewer control in visual basic >to view reports, print, export, search, load, etc. Please any help >would be great
>Derek J. Klingman
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only