View Single Post
  #14 (permalink)  
Old May 18th, 2006, 09:27 PM
XsiX XsiX is offline
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by ahmed_hammam70
 You Can Use the following code after adding the component : Crystal ActiveX Report Viewer Library 10.0
-----------
Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report
Set Report = Appl.OpenReport("d:\Report3.rpt")
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
----------

where CRViewer1 is the name of the added component to your project

Tnx Bro!
Workz Fine for me using MS Access Database

How bout using SQL Server 2005?
Here's Your Code (ahmed_hammam70)

Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report
Set Report = Appl.OpenReport(App.Path & "\Reports\Report1.rpt")
Report.DiscardSavedData
CRViewer1.ReportSource = Report
CRViewer1.ViewReport

...It sends me an error message
Login Failed for 'sa'
.. I suspect it requires password

Reply With Quote