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!

Crystal report export doesn't work

Status
Not open for further replies.

tb2007

Programmer
Apr 2, 2005
33
YU
I have code for showing reports like this:


Dim rs as new ADODB.recordset

set rs= something.....

dim Report as new rptTest

Report.Database.SetDataSource rs
CRViewer1.ReportSource = Report
CRViewer1.ViewReport

This works fine, report is ok, but when I click Export button it doesn't work. I don't know why?

OK, I decide to put another button Export to form and to write export function.

I need to get report from CRViewer but I don't know how to do this, something like this:

set report=CRViewer1.ReportSource
report.export.....

but this doesn't work.

How to get report from CRVIEWER?
 
The Viewer object has a number of buttons you can enable or disable. Check the properties of that object.

Also, the export isn't available if the Export DLL's aren't installed, but I assume you have installed those with your report application.

Editor and Publisher of Crystal Clear
 
>but when I click Export button it doesn't work

Then, what is it exactly doing?

If nothing at all, then you may be missing the CR export dlls in the \%Windows%\Crystal folder
 
Then, what is it exactly doing?


Well, when I press export button, some windows appears to select format options, disk file....etc.... Everything is fine, but when I look at that file it is empty and 0 KB.
I have all dll on my pc, I found on many people have this problem, but nobody knows the solution.
 
Have you tried different export formats?

I do not have this problem, but I do not bind the report to a recordset. That may be a problem.

Try changing the reports Destination from "Window" to "File", set the Export PrintFileType property to text or what ever, and then print the report.

You may have to also set DiscardSavedData to False
 
Thank you, I put this patch and now I can export to doc, rtf....it is not empty zero byte any more.

But, when I want to export to pdf I get message Export failed. I have crxf_pdf.dll but something is wrong.
 
>I found on many people have this problem, but nobody knows the solution.

But you're here at Tek-Tips [wink]

Then the problem in the OP is solved here.
"Crystal report export doesn't work"
"...when I look at that file it is empty and 0 KB"

For your last question concerning PDF, continue with your other thread: thread222-1426746
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top