Crystal Report 9 and MS Access DB

SauronTNT
02-24-2004, 01:23 AM
I have a problem with a report ( CR 9 ) when I call it from VB6. The report has a group by clause.

My VB6 program generate a DB access ( with 3 tables --> Measure, LLU and Clientdata).

The report has measuretable as Master group and Clientdata as chil.

If i Use the report directly on the MS database, it works fine.

But When I call the report from VB6, I have only the master data. Can you help me ?

HEre is my vb6 code to call the report :

Dim rsTemp As ADODB.Recordset
Dim cnVarDBConn As ADODB.Connection
Dim rep As CrystalReport1
Dim datcmd1 As ADODB.Command

Set cnVarDBConn = New ADODB.Connection
cnVarDBConn.ConnectionString = GetVarDBConnectionString("H:\DATA\MUST\B092215.mdb")
cnVarDBConn.Open


Set rsTemp = New ADODB.Recordset
rsTemp.Source = "SELECT `Meting`.`datum`, `Meting`.`categorie`, `Meting`.`meetnaam`, `Meting`.`metingnr`, `Meting`.`telefoonnr`, `Meting`.`GroupInfo`, `Meting`.`Ordered` FROM `Meting` `Meting` ORDER BY `Meting`.`categorie`"

rsTemp.CursorLocation = adUseServer
rsTemp.ActiveConnection = cnVarDBConn
rsTemp.CursorType = adOpenDynamic
rsTemp.Open

Set CRAPP = New CRAXDRT.Application

Set repReport = CRAPP.OpenReport("I:\ASG\WKG\MUST\DEVEL_REPORT\V9\fradres.rpt")
repReport.DiscardSavedData

repReport.Database.SetDataSource rsTemp

CRView.EnableGroupTree = False
CRView.EnableNavigationControls = True
CRView.EnableExportButton = True
CRView.ReportSource = repReport
CRView.ViewReport



Thanks

MKoslof
02-25-2004, 09:31 AM
I believe this is a VB 6 question, and I think I answered this in your private IM to me. Let us know if you still have issues and your current code.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum