Link to home
Start Free TrialLog in
Avatar of mer1mer1
mer1mer1

asked on

Crystal viewer control, EnableExport function ??

Hi
I am using crystal 8 and the viewer control to view the reports (VB program).
The problem that I am having is that when I enable the EnableExportButton, the program lets the user go through the various export options, but the output file it creates is empty.
This is really critical to us and I will be very grateful for all possible answers.

Thank You
Avatar of DRRYAN3
DRRYAN3

mer1mer1

Welcome to EE.

Generally, the type of problem you are experiencing is caused by missing DLLs on the user's workstation.  When you package and distribute your VB application, certain DLLs should be added to your package for installation in the c:\windows\crystal subdirectory.

For full details on what to include, see the help file "C:\Program Files\Seagate Software\Crystal Reports\Developer Files\Help\runtime.hlp" under the Exporting topic.

If this is not the solution to your problem, let me know.

DRRYAN3
Avatar of mer1mer1

ASKER

Hi DRRYAN3

Thank you for your quick response.
I have looked at the help files and the information you provided is very useful, but not at the moment.

I am having this problem running the reports in developement environment.

When I am using Crystal Reports, the export function works from within crystal. With CRViewer in development it will not work.

I am still clueless.

mer1mer1
mer1mer1

A simple example might help isolate the trouble.  Create a new project in VB.  Add the following to the project references:

  Crystal Report Viewer Control
  Crystal Report 8 ActiveX Designer Run Time Library

Put a "Crystal Report Viewer Control" on your form and size it to fill most of the form.  Make sure its name is CRViewer1 (the default).  Add a button to the form and put this code in the click event of the button:

  Dim crApp As New CRAXDRT.Application
  Dim crRep As CRAXDRT.Report
  ' load a standalone report created in the designer
  ' Replace my name with your report name
  Set crRep = crApp.OpenReport("c:\crw_samples\standalone.rpt")
  CRViewer1.EnableExportButton = True
  CRViewer1.ReportSource = crRep
  ' print preview
  CRViewer1.ViewReport

Your report should be a standalone, simple report that works correctly in the designer.

Run this and see if you have the same problem.  Try to export to a Disk File (any format).  Let me know where it fails or is successful on the export.

DRRYAN3
DRRYAN3

Unfortunately I do not have good news.
I tried a simple report that has text messages in the detail line and no connection to any database, and I can view it in the VB program, but the export functionality does not work.

When I use the export functionality within Crystal, I get past the screen asking me for the export file name, and then another screen shows me a progressbar and then the file is created.
When I try to use this functionality through VB, the last screen is the one asking for an output file name, and then nothing happens.

Thanks

Verify that the file U2DDISK.DLL is present in the c:\windows\crystal directory.

Also, can you tell me if you have multiple versions of Crystal Reports installed?
Hi
Thanks for all your help
I have the Windows 2000 and the u2ddisk.dll is in C:\WINNT\CRYSTAL\ directory.
I only have crystal 8 installed. This is a new pc (dell)
ASKER CERTIFIED SOLUTION
Avatar of DRRYAN3
DRRYAN3

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for all your trouble. This works well for us as a solution.