Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 6th, 2003, 04:32 AM
Registered User
Join Date: Nov 2003
Location: Hyderabad, AP, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crystal reports 9.0 with Visual Basic 6.0

Is there any crystal reports control to call the reports file from vb, like we have it in Crystal Reports 7 and 8.

Else what is the way I can open a Crystal Reports 9.0 file in VB ???
Reply With Quote
  #2 (permalink)  
Old December 8th, 2004, 06:22 PM
Registered User
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

This is what I do using Crystal Reports 9 with VB6

When creating an ActiveX Designer Report (DSR), the Crystal Reports
Gallery dialog appears. Choose From an Existing Report and browse to
the report file. The Report file will be converted to a DSR for use with the RDC in Visual Basic.

The wizard does the rest.

Then enter your code as normal.


Because your finished exe may end up being large / more functionality

Add a Form
Insert controls - CommonDialog1 - CRViewer91

Dim lApplication As CRAXDRT.Application
Dim lReport As CRAXDRT.Report

Private Sub mnuFileOpen_Click()
Dim strRpt As String
Dim Report
                                                                            'Set filters for the Open dialog to choose only a RPT file
    CommonDialog1.Filter = "Report (*.rpt)|*.rpt"
                                                                           'Set the filename selected to the string variable
    strRpt = CommonDialog1.FileName
Set lApplication = New CRAXDDRT.Application
Set lReport = lApplication.OpenReport(strRpt) ' Open the report
    CRViewer91.ReportSource = lReport

Exit Sub
    MsgBox Err.Description & " " & Err.Number
End Sub

Private Sub Form_Resize()
CRViewer91.Top = 0
CRViewer91.Left = 0
CRViewer91.height = ScaleHeight
CRViewer91.Width = ScaleWidth
End Sub

Hope this helps.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Integrating Crystal Reports 10 in Visual Basic 6 vava2300 VB Components 2 December 28th, 2006 09:57 AM
Visual Basic 5.0 using Crystal Reports JMCHAP1 Beginning VB 6 0 August 21st, 2006 10:38 AM
Crystal Reports and Visual Basic 6 Diego2 VB How-To 0 January 13th, 2005 06:52 PM
Crystal Reports Enterprise 10 and Visual Basic 6.0 rbdeveloper BOOK: Professional Crystal Reports for VS.NET 0 October 19th, 2004 11:08 AM
crystal reports 8.0 in visual basic 5.0 reachshalini VB Components 1 September 30th, 2004 08:18 AM

All times are GMT -4. The time now is 01:39 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.