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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB+Oracle+subreport

Status
Not open for further replies.

cbsm

Programmer
Oct 3, 2002
229
FR
Hi,
I am using VB6 / Oracle 8 / Crystal Report 8.5.
I've created a report, containing a subreport.
I open this report through VB - it worked fine untill I added the subreport.
I am getting the error "ORA-00933 SQL not properly ended".
I suppose this has to do with the way the subreport is linked to the main report.
(If I open the Report directly through crystal rep - it is working fine)

Here is my code :

Set crystalApplication = New CRAXDRT.Application
Set crystalreport = crystalApplication.OpenReport("c:\test.rpt")
Set crpDB = crystalreport.Database
Set crpDBTables = crpDB.Tables
Set crpDBTable = crpDBTables.Item(1)

crpDBTable.SetLogOnInfo OracleDatasource, ,strLogin, strPassword

Set crystalSubReport = crystalreport.OpenSubreport("subreport")
Set crpDBTable = crystalSubReport.Database.Tables.Item(1)
crpDBTable.SetLogOnInfo OracleDatasource, , strLogin, strPassword

The error occurs after this when I try to view the report.


Thanks !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top