wu8829 发表于 2014-11-26 13:54:00

导出Excel出现错误

工程师:您好!

      遇到一个很奇怪的问题:RDL报表能正常预览、打印,但如果使用“导出EXCEL”功能,就报参数错误,请问如何解决呢?相关代码如下:

protected void Page_Load(object sender, EventArgs e)
      {

                      GrapeCity.ActiveReports.PageReport Print_Temp = new GrapeCity.ActiveReports.PageReport();

                        //创建自定义工具条按钮
                        ToolButton btnExcel = Tool.CreateButton("Excel");
                        btnExcel.ToolTip = "导出到 Excel";
                        btnExcel.Caption = "导出到 Excel";
                        btnExcel.ClickNavigateTo = "\\ExportControl\\ARExport.ashx?exporttype=Excel&ReportName=Balance_Report.rdlx";
                        this.WV_Balance.FlashViewerToolBar.Tools.Add(btnExcel);

                  Print_Temp.Load(new System.IO.FileInfo(Server.MapPath("\\Reports") + "\\Balance_Report.rdlx"));

                  this.WV_Balance.FlashViewerOptions.ResourceLocale = "zh_CN";

                  Print_Temp.Report.ReportParameters.DefaultValue.Values.Add(Request.QueryString["Balance_ID"]);
                  
                  this.WV_Balance.Report = Print_Temp;

}

备注:WV_Balance 为WebViewer控件

iceman 发表于 2014-11-26 14:14:00

回复 1楼wu8829的帖子

能否请上传一个重现问题的 demo,因为看不到参数的具体设置无法确定问题点。谢谢

wu8829 发表于 2014-11-26 14:49:00

无法上传Demo,因为数据库采用SQL。还是电话沟通吧!

wu8829 发表于 2014-11-26 15:24:00

已明确错误所在,通过工程师启发,已解决问题。谢谢,此帖可以封帖

iceman 发表于 2014-11-26 17:19:00

回复 4楼wu8829的帖子

好的,感谢反馈问题结果。

为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢http://gcdn.gcpowertools.com.cn/attachment.aspx?attachmentid=10062
页: [1]
查看完整版本: 导出Excel出现错误