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

Exporting to Excel using RDC and Report Viewer

Status
Not open for further replies.

meljon12

Programmer
Apr 24, 2001
6
US
For some reason I get a blank worksheet when I try and export a report using RDC and the report viewer. When I open the report using the Crystal Report Designer and export the reports it exports OK.

Any ideas. Heres the test code I'm using

Set MyApplication = CreateObject("CrystalRuntime.Application")
Set Myreport = MyApplication.OpenReport(App.Path & "\ErbiaAgedTrialBalance.rpt")

DoEvents

Myreport.Database.Tables(1).SetLogOnInfo "HEATH", "TestCPSErbia001", "SMG", "SMG"

Me.CRViewer1.ReportSource = Myreport

DoEvents

CRViewer1.EnableExportButton = True
CRViewer1.ViewReport
CRViewer1.EnableProgressControl = True
 
We have run into this problem.

On the VB window where the user selects the report to execute, we put multiple command buttons. One button launches the viewer and shows the report. Another button does an export directly to Excel, PDF, etc. (after a common dialog box comes up asking for the type of export). Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top