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!

giving a crystal report it's data from a dataset. with visual basic 6 1

Status
Not open for further replies.

thefletch80

Programmer
Jan 9, 2004
9
US
I'm having a problem with my data displaying or being read. I'm not sure because i don't get any run time error.
What I do is create report (.rpt) file using a data definition file (.ttx). I create my report with crystal report for peachtree software and save it to my visual basic 6 project directory. After I fill the dataset in my program intialize the crystal report objects (Application, Report) and give the report object to the viewer's. The report is saved as GeneralJournal.rpt.
--------------------------------------------
'initialize objects contained in a module

Global GeneralJournal As ADODB.Recordset
Global CRApplication As CRAXDRT.Application
Global CRReport As CRAXDRT.Report

--------------------------------------------
'create initialize report



reports source (in code below):
Set CRApplication = New CRAXDRT.Application
Set CRReport = CRApplication.OpenReport("GeneralJournal.rpt")
CRReport.Database.Tables(1).SetDataSource GeneralJournal, 3
CRViewer1.ReportSource = CRReport
CRViewer1.ViewReport

-----------------------end of code-------------------
I am 100 percent sure the recordset actually contains data before it is given to the datasource
 
hi
you an download this from crystal decsion

scr8_ttxado.pdf

cheers




pgtek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top