borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Data Report: Orientation)Next Topic (Preview CR Files) New Topic New Poll Post Reply
AndreaVB Forum : Reporting tools : DB Connection
Poster Message
pracho
Level: Big Cheese

Registered: 03-08-2004
Posts: 19

icon DB Connection

How to connect MS Access database to Crystal Report 8.5 using Visual Basic 6.0?

--------------------------------------------------
-------CODE-----

Dim Report As New crCGDepAsset

Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault

End Sub

Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth

End Sub

Private Sub Form_Unload(Cancel As Integer)
Set Report = Nothing
End Sub

02-09-2004 at 12:30 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: DB Connection

Is this an example of how to connect or you are missing something?   You can set datasource

rpt.Database.SetDataSource rs


where rs is ADO recordset

____________________________
If you find the answer helpful, please mark this topic as solved.

02-09-2004 at 08:07 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Reporting tools : DB Connection
Previous Topic (Data Report: Orientation)Next Topic (Preview CR Files) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder