TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dee
NA
3
0
Unable to see the data when exporting to PDF
Dec 3 2009 11:34 AM
Hi,
I am having a strange issue with Crystal reports and .NET. My .NET has a form with calls a cystal template.
I have a very simple code where I select a Crystal template and after iterating thru the parms and the tables, want to export the report to a .PDF file. The .PDF file gets generated but it is empty. I am able to see the data in the Crystal viewer and 'am using the same report document object for the viewer as well as for the export assuming that the data is already populated so that I can do the export with the same object.
The code is as below:
CrystalDecisions.Shared.DiskFileDestinationOptions diskOp = new CrystalDecisions.Shared.DiskFileDestinationOptions();
diskOp.DiskFileName = "c:\\test.pdf";
CrystalDecisions.Shared.ExportOptions exportOpts = _Rpt.ExportOptions; ==> _RPT is the ReportDocument object
exportOpts.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
exportOpts.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
exportOpts.ExportDestinationOptions = diskOp;
_Rpt.Export(exportOpts);
Any idea why the data is not being populated? The file gets created on my C: drive but it is empty.
Appreciate a quick response...
Thanks,
Reply
Answers (
2
)
Code alteration before compile
Class Library using keyword