MySQL Forums
Forum List  »  Analytics, Reporting, BI

Setting up a Crystal Report 10 via VB6/MySQL 100% Working Code
Posted by: abdellatif fddfdfdf
Date: April 15, 2015 05:20PM

' Declare RDC objects and other project variables

'The Application object is used to open an external RPT file as a Report object.
Dim CrxApplication As New CRAXDRT.Application
Dim CrxReport As CRAXDRT.Report

Dim ConnectionInfo As CRAXDRT.ConnectionProperties
Set ConnectionInfo = CrxReport.Database.Tables(1).ConnectionProperties

Dim nb, i As Long
Dim NomTable$

' =======================================================================

'Set CrxApplication = CreateObject("CrystalRuntime.Application.11")

nb = CrxReport.Database.Tables.Count
For i = 1 To nb
NomTable = CrxReport.Database.Tables(i).Location
'Qualif = CrxReport.Database.Tables(i).Qualifiers.Item(1)
' CrxReport.Database.Tables(i).DllName = "crdb_ado.dll" 'this led to much wait time
CrxReport.Database.Tables(i).ConnectionProperties.DeleteAll
CrxReport.Database.Tables(i).ConnectionProperties.Add "Data Source", GDB_SERVER
CrxReport.Database.Tables(i).ConnectionProperties.Add "User ID", GDB_USER
'CrxReport.Database.Tables(i).ConnectionProperties.Add "Database Type", "OLE DB (ADO)"
CrxReport.Database.Tables(i).ConnectionProperties.Add "Provider", "SQLOLEDB"
CrxReport.Database.Tables(i).ConnectionProperties.Add "Initial Catalog", GDB_Nom_DB
CrxReport.Database.Tables(i).ConnectionProperties.Add "DSN", "www.db4free.net"
CrxReport.Database.Tables(i).ConnectionProperties.Add "Password", GDB_PASS

'CrxReport.Database.Tables(i).SetDataSource
CrxReport.Database.Tables(i).Name = NomTable
CrxReport.Database.Tables(i).Location = GDB_Nom_DB & "." & NomTable

Next i

CrxReport.ParameterFields.Item(1).ClearCurrentValueAndRange

Options: ReplyQuote


Subject
Written By
Posted
Setting up a Crystal Report 10 via VB6/MySQL 100% Working Code
April 15, 2015 05:20PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.