找回密码
 立即注册

QQ登录

只需一步,快速开始

langren82

初级会员

21

主题

89

帖子

210

积分

初级会员

积分
210

活字格认证

[已处理] print 问题

langren82
初级会员   /  发表于:2015-7-16 23:24  /   查看:4449  /  回复:6
点了打印按钮了后 出现图上错误 表格是正常出现的
~)_)3W17K{[_`7Q7F5GQ9HS.png

6 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2015-7-17 10:41:00
沙发
回复 1楼langren82的帖子

目前的截图看不出具体问题,请参考截图建议,在 web.config 文件中配置 <customerErrors> 结点,再上传错误信息。
谢谢
回复 使用道具 举报
langren82
初级会员   /  发表于:2015-7-17 15:47:00
板凳
我做了些测试 发现如果不把 commandbar 上的其他项隐藏 就不会出这个错误 就是这个

protected override void Render(HtmlTextWriter writer)
        {
            WebControl update = FpSpread1.FindControl(&quot;Update&quot;) as WebControl;
            update.Visible = false;
            WebControl copy = FpSpread1.FindControl(&quot;Copy&quot;) as WebControl;
            copy.Visible = false;
            WebControl clear = FpSpread1.FindControl(&quot;Clear&quot;) as WebControl;
            clear.Visible = false;

            WebControl paste = FpSpread1.FindControl(&quotaste&quot;) as WebControl;
            paste.Visible = false;
            WebControl print = FpSpread1.FindControl(&quotrint&quot;) as WebControl;
            print.Visible = true;

            WebControl cancel = FpSpread1.FindControl(&quot;Cancel&quot;) as WebControl;
            cancel.Visible = false;
            base.Render(writer);
        }
回复 使用道具 举报
langren82
初级会员   /  发表于:2015-7-17 15:48:00
地板
没有这个 就不会出错
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-7-17 17:17:00
5#
回复 4楼langren82的帖子

请修改为以下代码:

  1. protected override void Render(HtmlTextWriter writer)
  2.         {
  3.             WebControl update = FpSpread1.FindControl(&quot;Update&quot;) as WebControl;
  4.             if (update!=null)
  5.                 update.Visible = false;               

  6.             WebControl copy = FpSpread1.FindControl(&quot;Copy&quot;) as WebControl;
  7.             if (copy!=null)
  8.                 copy.Visible = false;               

  9.             WebControl clear = FpSpread1.FindControl(&quot;Clear&quot;) as WebControl;
  10.             if (clear!=null)
  11.                 clear.Visible = false;

  12.             WebControl paste = FpSpread1.FindControl(&quot;Paste&quot;) as WebControl;
  13.             if (paste!=null)
  14.                 paste.Visible = false;

  15.             WebControl print = FpSpread1.FindControl(&quot;Print&quot;) as WebControl;
  16.             if (print!=null)
  17.                 print.Visible = true;


  18.             WebControl cancel = FpSpread1.FindControl(&quot;Cancel&quot;) as WebControl;
  19.             if (cancel!=null)
  20.                 cancel.Visible = false;

  21.             base.Render(writer);
  22.         }
复制代码
回复 使用道具 举报
langren82
初级会员   /  发表于:2015-7-17 17:56:00
6#
ok 解决了 谢谢
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-7-20 09:08:00
7#
回复 6楼langren82的帖子

好的,不客气。

为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢   
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部