Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 3rd, 2005, 11:49 PM
Registered User
 
Join Date: Oct 2005
Location: Delhi, Delhi, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem in Exporting Crystal report to PDF

Hi Everyone!

I m really stuck with Crystal reports for VS.NET 2003:(:(. I have created a report using DataSet and now trying to export report to PDF.It exports report to PDF but with Blank fields.However there is data in the report.I have tried each and every thing.Its completion of reporting module and i have to give it functionality to Export to desired format.

Heres my code for exporting report
Code:
private void Button3_Click(object sender, System.EventArgs e)  // this is the code for exporting REport to desired format
        {


        this.fileName = Server.MapPath("/NewQCDS/Project/ReportsFile/test.pdf");   // this is destination file
        string strrptfile=Server.MapPath("/NewQCDS/Reports/rptAllocatedEmployee.rpt").ToString();   // rpt file       

        this.crDiskFileDestinationOptions = new DiskFileDestinationOptions();
        this.crDiskFileDestinationOptions.DiskFileName = this.fileName;


                            rpt.SetDataSource(objReportForm.fnGetRptAllocatedEmployee(int.Parse(Request.QueryString["ProjectID"].ToString()),int.Parse(Request.QueryString["Cmonth"].ToString()),int.Parse(Request.QueryString["ProjectID"].ToString())));

                            this.crExportOptions = this.rpt.ExportOptions;                 

                            this.crExportOptions.DestinationOptions = this.crDiskFileDestinationOptions;

                            this.crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;

                            this.crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;




            if(rpt.IsLoaded==true)
            {

                this.rpt.Export();
            }                 



                            Response.ClearContent();
                            Response.ClearHeaders();
                            Response.ContentType = "application/pdf";

                            Response.WriteFile(this.fileName);

                            Response.Flush();

                            Response.Close();


        }
    }
}


Please some one help me on this.

Thanks in advance,

Regards

cat_net


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in exporting crystal report to excel. yasinirshad .NET Framework 1.x 0 June 11th, 2008 02:20 AM
Code for Exporting Crystal Report to Excel or PDF shakti_2505270 ASP.NET 2.0 Professional 1 October 4th, 2007 01:00 AM
Exporting Crystal Report to PDF vishal.jayaswal .NET Web Services 0 December 30th, 2004 03:31 AM
Exporting Crystal Report 6 RPT file into PDF forma ravs1304 Crystal Reports 2 December 29th, 2004 12:48 PM
Crystal Report 8.5 Export to PDF problem DragonSon Crystal Reports 0 August 17th, 2004 10:32 PM



All times are GMT -4. The time now is 02:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.