• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2088
  • Last Modified:

Crystal reports XI & visual basic 6


I just downloaded a trail version of Crystal Reports XI.
I am looking for a better report tool then crystal reports 4.6.

I have been looking around and experimenting with visual basic 6 and the references / designers and components for crystal reports 11.
Conclusion: I have know idea how to get CR11 working with VB6.

If I add a new cr control to a form I get runtime error 7 "out of memory" and can no longer access my form, even at design time!.
  • 4
  • 3
  • 2
1 Solution
See a same thread about vb6 and cr 11

Make sure you have the latest SP for VB6.

You need the DEVELOPER edition of CR XI.  Did you download that edition?

DennisPostAuthor Commented:
Yes i did download the developers edititon, and i have SP6.
That's was the last one right?
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

DennisPostAuthor Commented:
I have looked at your link and the link contained within it. Unfortunatley I still cannot get it to work.
I tried creating new projects just to test one of my reports but with out success. Too much knowledge missing.
Do you have an example project I could cut'n'paste????

The reason I am trying to use CR11 is because some strange behaviour in CR4.6 odbc with sql authentication.
I could create datareports in VB if necessary but I already have 30+ different reports (CR4.6) that work fine for us. But they don't work if I change the ODBC to SQL Authentication instead of Windows Authentication. (Which will be used in other offices.)
See: http://www.experts-exchange.com/Database/Reporting_/Q_22722007.html

I only have a couple of weeks to have a solution to the reporting problem.
I don't have any example, because I now always work with .net & crystal reports.
DennisPostAuthor Commented:
Yeah, thought as much. I feel so old fashioned still using VB6..... :-(
All examples I have found also use .net.
I don't have them readily available here.

Some from Crystal

DennisPostAuthor Commented:
I did get it working with the help of a support case at Bussiness Objects.
Where the ** is, I get a subscript out of range error.
Note that I have to use CRAXDDRT instead of CRAXDRT. I think this is because I am using a demo version.

Crystal Reports ActiveX Designer Design & Runtime Library 11.0 (CRAXDRT.DLL)
Crystal ActiveX Report Viewer Library 11.0

Crystal ActiveX Report Viewer Library 11.0

Dim oCRApp As New CRAXDDRT.Application
Dim oCRReport As New CRAXDDRT.Report
Dim crApp As New CRAXDDRT.Application
Dim crRep As New CRAXDDRT.Report

Private Sub Form_Load()

' Start BusinessOnject sample code ===========================
Dim connectionInfo As CRAXDDRT.ConnectionProperties
    Set crrep = crapp.OpenReport(gsRepPath)
    'Passing database logon information
    Set connectionInfo = crrep.Database.Tables(1).ConnectionProperties
    connectionInfo.Item("DSN") = "TestDSN" ' **
    connectionInfo.Item("Database") = "TestDB"
    connectionInfo.Item("User ID") = "TestUser"
    connectionInfo.Item("Password") = "TestPW"
    crrep.SQLQueryString = SQLQuery
    crvtest1.ReportSource = crrep
' Start My code (Seems slow, but works) ==============================
    If OpenPrintRS Then 'Opens an ADO recordset
        Set oCRReport = oCRApp.OpenReport(gsRepPath)      
        oCRReport.Database.SetDataSource PrintRS
        oCRReport.SQLQueryString = SQLQuery ' Without this line VB crashes.
        Me.crvtest1.ReportSource = oCRReport
    End If
End Sub

Thanks for your comments. I'll close this one up.
Glad your problem is solved (and thx for posting the way you solved it)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now