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!

Create Report in VB

Status
Not open for further replies.

yuben

Programmer
Feb 8, 2001
20
0
0
ZA
I would like to create a report from within VB. i have defined a report variable as CRAXDDT.Report and assigned a report to it. I use the report designer within VB.

I would like to assign a report by name to the report variable. I have tried this:
set MyReport = createobject("ReportName")
but this does not work.

Are there any suggestions on how I could use the report name (as a string) to create a report from within VB. Reason - I have >10 reports that I need to print/preview etc and more are added regularly. if I can store the report names in a database then the coding for printing/exporting is simplified a great deal.
Your help is appreciated.
 
try this
Code:
dim appMyApp as New CRAXDDT.Application
dim rptMyReport as CRAXDDT.Report

Set rptMyReport = appMyApp.OpenReport(App.Path & "/Report1.rpt")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top