无法使用您指定的选项导出。请检查您的选项,然后重试。 [英] Failed to export using the options you specified. Please check your options and try again.

查看:91
本文介绍了无法使用您指定的选项导出。请检查您的选项,然后重试。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..

使用水晶报告并在导出为pdf或任何其他格式时,误报为无法使用您指定的选项导出。请检查您的选项并重试。如何解决这个问题?

解决方案

使用Session来存储报告并使用它来解决你的问题。

看代码



 受保护  void  Page_Load ( object  sender,EventArgs e)
{
if (!Page.IsPostBack )
{
Session.Remove( CR_Session);
Session.Clear();
BindReport();
}
CrystalReportViewer1.ReportSource = Session [ CR_Session]; // 为查看者设置报告源
}
void BindReport()
{
HR_EmployeeVocation Cr = new HR_EmployeeVocation(); // 创建新的报告实例
Cr.SetDataSource(GetEmployeeList()); // 设置报告的数据源
Session.Add( CR_Session,Cr); // 将报告添加到会话CR_Session
}


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?

解决方案

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

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
        }


这篇关于无法使用您指定的选项导出。请检查您的选项,然后重试。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆