[水晶报表]水晶报表中提示已达到系统管理员配置的最大报表处理作业数限制

 

处理方法:注册表搜索PrintJobLimit

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
源码:public partial class Form1 : Form { public Form1() { InitializeComponent(); this.cboPageMax.Text = GetRegistData(); this.lblMessage.Text = "你当前电脑打印最高页为" + GetRegistData()+"页"; } private void button1_Click(object sender, EventArgs e) { this.lblMessage.Text = ""; string txtPageNumber = this.cboPageMax.Text.ToString().Trim(); foreach (char c in txtPageNumber) { if (!Char.IsNumber(c)) { lblMessage.Text = "这里只能输入字整"; return; } } try { Boolean boolSucsess = WTRegedit(txtPageNumber); //将打印最大保存到注册表int pageNumber = Convert.ToInt32(GetRegistData()); if (boolSucsess) { MessageBox.Show("成功将最高打印页设置到" + pageNumber + "页"); } else { MessageBox.Show("打印最高张还是" + pageNumber + "页,没有设置成功,权限不够,不能设置,请网管或管理员在管理员administrator权限下设置"); } this.lblMessage.Text = "你目前电脑打印最高页为" + GetRegistData() + "页"; } catch (Exception ex) { this.lblMessage.Text = "你电脑打印最高页还是" + GetRegistData() + "页,没有设置成功"; MessageBox.Show("权限不够,不能设置,请网管或管理员在高级权限下设置 " + ex); } } // Windows Registry Editor Version 5.00 //[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\InProcServer] //"PrintJobLimit"="50000" //[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\Server] //"PrintJobLimit"="50000" private string GetRegistData() //注册表读取 {//Registry string registData; RegistryKey hkml = Registry.LocalMachine; //RegistryKey software = hkml.OpenSubKey("HKEY_LOCAL_MACHINE", true); RegistryKey node1 = hkml.OpenSubKey("SOFTWARE", true); RegistryKey node2 = node1.OpenSubKey("Crystal Decisions", true); RegistryKey node3 = node2.OpenSubKey("10.2", true); RegistryKey node4 = node3.OpenSubKey("Report Application Server", true); RegistryKey node5 = node4.OpenSubKey("InProcServer", true); RegistryKey node41 = node4.OpenSubKey("Server", true); registData = node41.GetValue("PrintJobLimit").ToString().Trim(); return registData; } private Boolean WTRegedit(string tovalue) //写到注册表 { try { RegistryKey hkml = Registry.LocalMachine; RegistryKey node1 = hkml.OpenSubKey("SOFTWARE", true); RegistryKey node2 = node1.OpenSubKey("Crystal Decisions", true); RegistryKey node3 = node2.OpenSubKey("10.2", true); RegistryKey node4 = node3.OpenSubKey("Report Application Server", true); RegistryKey node5 = node4.OpenSubKey("InProcServer", true); RegistryKey node41 = node4.OpenSubKey("Server", true); node5.SetValue("PrintJobLimit", (Convert.ToInt32(tovalue.Trim())+750).ToString().Trim()); //设置[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\InProcServer] //设置"PrintJobLimit"="50000" node41.SetValue("PrintJobLimit", tovalue.Trim()); //[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\Server] //"PrintJobLimit"="50000" return true; } catch (Exception) { return false; } }

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

厦门德仔

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值