Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreports not logging in using RDC

Status
Not open for further replies.

stangeljl18

Programmer
Jan 9, 2002
12
0
0
US
I have a report which will not completely export to a crystal report file when using the RDC.

There are a total of 6 subreports all of which use the same SQL-ODBC File DSN. They all are stored procedures.

The code goes something like this...

'Set logon for main report

For I = 1 To mReport.Database.Tables.Count
Call mReport.Database.Tables.Item(I).SetLogOnInfo("", "", "User", "Password")
Next

'Set logon for sub reports

For Each CRXSection In mReport.Sections
For Each ReportObject In CRXSection.ReportObjects
If ReportObject.Kind = crSubreportObject Then
Dim subreport2 As CRAXDRT.SubreportObject
Set CRXSubreportObj = ReportObject
Set subreport = RXSubreportObj.OpenSubreport

For I = 1 To subreport.Database.Tables.Count
Call subreport.Database.Tables.Item(I).SetLogOnInfo("", "", "User", "Password")
Next
End If
Next ReportObject
Next CRXSection

Call mReport.Export(True)

When I Export to Crystal, two of the subreports do not get logged in properly and the report is missing the data for them.

If I export that same report to PDF, the whole report gets exported properly.

Any ideas?
 
Fixed it...

Just saved the subreports as separate files.

removed the malfunctioning subreports.

readded them in...

and voila. presto chango

It works.

Stupid crystal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top