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

create crystal report with vb6?

Status
Not open for further replies.

jumula

Programmer
Nov 17, 2003
6
DE
Hi, i want to create an rpt-file with vb6. i have a ado-recordset. Could somebody show me a very easy example??? I've tryid so many things, but nothing works.
Thanks!
 
first use crystal reports to setup a TTX file that describes the fileds in your ado record set.

next add the crystal report designed ocx to your project, set the database to the TTX as a data definition file so that you can design your report.

then in the section of code to display the report form (Copied from Crystal Report tech support)

Dim CrAppl as Craxdrt.Application
Dim Crrep as craxdrt.report
dim Adors as adodb.recordset

adors.open "blah blah blah" for data source

set crrep = crappl.openreport "report file name.rpt"
crrep.database.tables(1).setdatasource adors,3

crviewer1.reportsource = crrep
crviewer1.viewreport




uhh...did i say that?

Woody
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top