Solved

Crystal viewer control, EnableExport function ??

Posted on 2001-08-10
8
315 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:mer1mer1
  • 4
  • 4
8 Comments
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6373418
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
0
 

Author Comment

by:mer1mer1
ID: 6374063
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
0
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6374102
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
0
 

Author Comment

by:mer1mer1
ID: 6374201
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

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6374244
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?
0
 

Author Comment

by:mer1mer1
ID: 6374270
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)
0
 
LVL 12

Accepted Solution

by:
DRRYAN3 earned 37 total points
ID: 6374319
Are you running through the IDE or are you running a compiled EXE?

Also, see if this code works (put on a new button)

  Dim crApp As New CRAXDRT.Application
  Dim crRep As CRAXDRT.Report
  ' load a standalone report created in the designer
  Set crRep = crApp.OpenReport("c:\crw_samples\standalone.rpt")
  CRViewer1.EnableExportButton = True
  CRViewer1.ReportSource = crRep
 
  crRep.ExportOptions.DestinationType = crEDTDiskFile
  crRep.ExportOptions.DiskFileName = "c:\mytest.txt"
  crRep.ExportOptions.FormatType = crEFTPaginatedText
  crRep.ExportOptions.NumberOfLinesPerPage = 60
  crRep.Export False
 
This should export your report to a text file name c:\mytest.txt.  If that fails, I would have to recommend that you reinstall Crystal Reports.

DRRYAN3
0
 

Author Comment

by:mer1mer1
ID: 6380150
Thank you for all your trouble. This works well for us as a solution.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now