• <tfoot id='cYltr'></tfoot>

        <bdo id='cYltr'></bdo><ul id='cYltr'></ul>
    1. <small id='cYltr'></small><noframes id='cYltr'>

      <i id='cYltr'><tr id='cYltr'><dt id='cYltr'><q id='cYltr'><span id='cYltr'><b id='cYltr'><form id='cYltr'><ins id='cYltr'></ins><ul id='cYltr'></ul><sub id='cYltr'></sub></form><legend id='cYltr'></legend><bdo id='cYltr'><pre id='cYltr'><center id='cYltr'></center></pre></bdo></b><th id='cYltr'></th></span></q></dt></tr></i><div id='cYltr'><tfoot id='cYltr'></tfoot><dl id='cYltr'><fieldset id='cYltr'></fieldset></dl></div>
        <legend id='cYltr'><style id='cYltr'><dir id='cYltr'><q id='cYltr'></q></dir></style></legend>

        如何在客户端打印机上从 ASP.NET CrystalReport 打印

        时间:2023-07-11

      1. <i id='gN95p'><tr id='gN95p'><dt id='gN95p'><q id='gN95p'><span id='gN95p'><b id='gN95p'><form id='gN95p'><ins id='gN95p'></ins><ul id='gN95p'></ul><sub id='gN95p'></sub></form><legend id='gN95p'></legend><bdo id='gN95p'><pre id='gN95p'><center id='gN95p'></center></pre></bdo></b><th id='gN95p'></th></span></q></dt></tr></i><div id='gN95p'><tfoot id='gN95p'></tfoot><dl id='gN95p'><fieldset id='gN95p'></fieldset></dl></div>

        <small id='gN95p'></small><noframes id='gN95p'>

        <tfoot id='gN95p'></tfoot>

                  <tbody id='gN95p'></tbody>

              1. <legend id='gN95p'><style id='gN95p'><dir id='gN95p'><q id='gN95p'></q></dir></style></legend>
                  <bdo id='gN95p'></bdo><ul id='gN95p'></ul>
                • 本文介绍了如何在客户端打印机上从 ASP.NET CrystalReport 打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何在客户端打印机上从 CrystalReport (ASP.NET) 打印报表.

                  How do I print report from CrystalReport (ASP.NET) on a client side printer.

                  推荐答案

                  你有两个选择:

                  1. 将 PrintMode 设置为 ActiveX 或 PDF,并让 Crystal 报表查看器工具栏来处理它.
                  2. 在 iFrame 中创建 pdf,并使用 JavaScript 触发打印命令.

                  为了简化用户必须在每个客户端上安装的内容,我使用了隐藏的 pdf 选项和一个单独的按钮来打印到客户端.

                  To simplify what the users had to install on each client I went with the hidden pdf option and a separate button to print to client.

                  在 aspx 页面上,我使用 1px x 1px 的 pdf 嵌入对象填充了一个 asp 文字,因此它对用户不可见.然后在页面加载时调用 printToPrinter 方法.

                  On the aspx page I have an asp literal that I populate with the pdf embeded object at 1px x 1px so it isn't visible to the user. Then on pageload call the printToPrinter method.

                  // On server side
                  // Export to PDF
                  Guid imageGuid = Guid.NewGuid();
                  string _pdfName = String.Format(@"{0}{1}{2}.pdf", _pdfPath, _reportName, imageGuid);
                  // expport to unique filename
                  // ...
                  // Display the pdf object 
                  _sb.AppendFormat("<object ID="pdfObject" type="application/pdf" data="{0}" src="{0}" style="width: {1}; height: {2}; ", _pdf2Name, _width, _height);
                  _sb.AppendLine("z-index:1; display: block; border: 1px solid #cccccc; top: 0; left: 0; position: absolute;-+ ">");
                  _sb.Append("</object>");
                  pdfLiteral.Text = _sb.ToString();
                  pdfLiteral.Visible = true;
                  
                  // javascript
                  // on document load call the printWithDialog function
                   var code = function(){
                   try
                       {
                          var pdf = $get('pdfObject');
                          if (pdf == null)
                              return;
                          try {
                              pdf.printWithDialog();
                          }
                          catch (err) {
                              alert('Please Install Adobe Acrobat reader to use this feature');
                          } 
                       }
                       catch(err)
                       {
                       }
                    };
                  window.setTimeout(code, 1000);
                  

                  这篇关于如何在客户端打印机上从 ASP.NET CrystalReport 打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:ASP.NET 2.0 应用程序中的 Crystal Reports - 报表更改未显示 下一篇:Azure Web 应用服务使用 HttpClient 使用混合连接管理器调用本地 WEB API

                  相关文章

                  <small id='eeeFS'></small><noframes id='eeeFS'>

                  <legend id='eeeFS'><style id='eeeFS'><dir id='eeeFS'><q id='eeeFS'></q></dir></style></legend>

                • <tfoot id='eeeFS'></tfoot>
                  <i id='eeeFS'><tr id='eeeFS'><dt id='eeeFS'><q id='eeeFS'><span id='eeeFS'><b id='eeeFS'><form id='eeeFS'><ins id='eeeFS'></ins><ul id='eeeFS'></ul><sub id='eeeFS'></sub></form><legend id='eeeFS'></legend><bdo id='eeeFS'><pre id='eeeFS'><center id='eeeFS'></center></pre></bdo></b><th id='eeeFS'></th></span></q></dt></tr></i><div id='eeeFS'><tfoot id='eeeFS'></tfoot><dl id='eeeFS'><fieldset id='eeeFS'></fieldset></dl></div>

                      • <bdo id='eeeFS'></bdo><ul id='eeeFS'></ul>