[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Crystal viewer control, EnableExport function ??

Posted on 2001-08-10
8
Medium Priority
?
327 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
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 

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
 
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 148 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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

829 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