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

Calling Crystal report from VB6 1

Status
Not open for further replies.

jadoogar

Programmer
Oct 23, 2003
61
IN
I have migrated to Crystal 8.5 from 7.0
I have problem in how to call report developed from VB
I put a control called CRVreport which is Crviewer
and give code

repsource = "c:\powerproject\substation.rpt"
CRVReport.ReportSource = App.Path & "substation.rpt"
CRVReport.ViewReport

Can anyone give a better method
 
I solved it
I put a crystalreport viewer called it CRVreport
and added code
Declaration
Dim crxApp As New CRAXDRT.Application
Dim crxRpt As CRAXDRT.Report
in option button for report click event added
Set crxRpt = crxApp.OpenReport(App.Path & "\nameofreport")
showreport

Showreport is a module with code
CRVReport.Visible = True
CRVReport.ReportSource = crxRpt
CRVReport.ViewReport
cmdclose.Visible = True
CRVReport.Top = 20
CRVReport.Left = 20
CRVReport.Height = Me.Height - 1000
CRVReport.Width = Me.Width - 200
cmdclose.Top = CRVReport.Top + CRVReport.Height + 100

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top