Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..
Am using crystal reports and while exporting to pdf or any other format,getting error as "Failed to export using the options you specified. Please check your options and try again." How to solve this?
Posted
Comments
Richard MacCutchan 4-Feb-13 4:57am    
Do what the message tells you.

1 solution

Use Session to store Report and Use its Solve your Problem.
Look at Code

C#
protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Session.Remove("CR_Session");
                Session.Clear();
                BindReport();
            }
            CrystalReportViewer1.ReportSource = Session["CR_Session"];  //Set Report Source for Viewer
        }
        void BindReport()
        {
            HR_EmployeeVocation Cr = new HR_EmployeeVocation(); //Create New Report Instance
            Cr.SetDataSource(GetEmployeeList());  //Set Data Source for Report
            Session.Add("CR_Session", Cr);  //Add Report into Session CR_Session
        }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900