• <small id='uW2W3'></small><noframes id='uW2W3'>

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

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

        <legend id='uW2W3'><style id='uW2W3'><dir id='uW2W3'><q id='uW2W3'></q></dir></style></legend>
        <i id='uW2W3'><tr id='uW2W3'><dt id='uW2W3'><q id='uW2W3'><span id='uW2W3'><b id='uW2W3'><form id='uW2W3'><ins id='uW2W3'></ins><ul id='uW2W3'></ul><sub id='uW2W3'></sub></form><legend id='uW2W3'></legend><bdo id='uW2W3'><pre id='uW2W3'><center id='uW2W3'></center></pre></bdo></b><th id='uW2W3'></th></span></q></dt></tr></i><div id='uW2W3'><tfoot id='uW2W3'></tfoot><dl id='uW2W3'><fieldset id='uW2W3'></fieldset></dl></div>
      1. 将 DB 日志记录信息应用于每个 Crystal Reports 部分时,应用程序运行缓慢

        时间:2023-07-09
      2. <i id='mLUTD'><tr id='mLUTD'><dt id='mLUTD'><q id='mLUTD'><span id='mLUTD'><b id='mLUTD'><form id='mLUTD'><ins id='mLUTD'></ins><ul id='mLUTD'></ul><sub id='mLUTD'></sub></form><legend id='mLUTD'></legend><bdo id='mLUTD'><pre id='mLUTD'><center id='mLUTD'></center></pre></bdo></b><th id='mLUTD'></th></span></q></dt></tr></i><div id='mLUTD'><tfoot id='mLUTD'></tfoot><dl id='mLUTD'><fieldset id='mLUTD'></fieldset></dl></div>

        <legend id='mLUTD'><style id='mLUTD'><dir id='mLUTD'><q id='mLUTD'></q></dir></style></legend>
        1. <small id='mLUTD'></small><noframes id='mLUTD'>

            • <bdo id='mLUTD'></bdo><ul id='mLUTD'></ul>
                <tbody id='mLUTD'></tbody>

                  <tfoot id='mLUTD'></tfoot>

                  本文介绍了将 DB 日志记录信息应用于每个 Crystal Reports 部分时,应用程序运行缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  目前我使用以下方法将连接信息分配给所有报告部分.但由于我在报告中有很多部分,报告会在将近 10 秒后显示.这看起来真的很慢.当它安装在客户端时,是否有其他方法可以一劳永逸地为每个 CR 设置登录信息.

                  Currently I use the following method to assign connection info to all the report sections. But as I have many sections in the report, the report is displayed after almost 10 seconds. Which looks really slow. Is there some other method by which we can set logon information to each CR once and for all when it is installed at client side.

                  JFYI:所有 CR 都使用相同的登录凭据连接到同一个数据库.提前谢谢你.

                  JFYI: All the CRs connect to same DB, with same login credentials. Thank you in advance.

                     readDiamondBillReport = new RealDiamondBill();
                                          crConnectionInfo.ServerName = db.Connection.DataSource;
                                          crConnectionInfo.DatabaseName = db.Connection.Database;
                                          crConnectionInfo.UserID = "client";
                                          crConnectionInfo.Password = "client";
                                          crConnectionInfo.IntegratedSecurity = false;
                  
                                          CrTables = readDiamondBillReport.Database.Tables;
                                          foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
                                          {
                                              crtableLogoninfo = CrTable.LogOnInfo;
                                              crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                                              CrTable.ApplyLogOnInfo(crtableLogoninfo);
                                          }
                  
                                          Sections crSections2 = readDiamondBillReport.ReportDefinition.Sections;
                                          // loop through all the sections to find all the report objects 
                                          foreach (Section crSection in crSections2)
                                          {
                                              ReportObjects crReportObjects = crSection.ReportObjects;
                                              //loop through all the report objects in there to find all subreports 
                                              foreach (ReportObject crReportObject in crReportObjects)
                                              {
                                                  if (crReportObject.Kind == ReportObjectKind.SubreportObject)
                                                  {
                                                      SubreportObject crSubreportObject = (SubreportObject)crReportObject;
                                                      //open the subreport object and logon as for the general report 
                                                      ReportDocument crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName);
                  
                                                      Tables SubCrTables = crSubreportDocument.Database.Tables;
                                                      foreach (CrystalDecisions.CrystalReports.Engine.Table SubCrTable in SubCrTables)
                                                      {
                                                          crtableLogoninfo = SubCrTable.LogOnInfo;
                                                          crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                                                          SubCrTable.ApplyLogOnInfo(crtableLogoninfo);
                  
                                                      }
                                                  }
                                              }
                                          }
                  
                                          readDiamondBillReport.Refresh();
                  

                  推荐答案

                  我终于发现,应用登录信息都不是问题,刷新报告也不是问题.但这是我用来在水晶报表中设置水印的大型图片对象.

                  I finally found that, neither applying logon info was the issue nor refreshing the report was. But it was my large picture object which I used for setting a watermark in crystal reports.

                  我有 10 份使用此图片作为水印的报告.我删除了带水印的图像,现在解决了以下问题:

                  I had 10 reports which used this Image as watermark. I removed the watermarked image and now following problems are solved:

                  1. 项目构建非常非常快.以前构建需要大约 1 分钟,现在已大幅减少到 8-10 秒.

                  1. Project builds very very fast. Previously it took around 1 min to build, which has now reduced drastically to 8-10 secs.

                  对项目的任何更改,尤其是对报告的更改都会更快地保存.

                  Any changes to the project, especially to reports gets saved much faster.

                  我曾经得到 "存储空间不足可用于完成此操作" 在一两次构建后.我不得不重新启动 VS 并为每个构建交叉手指.

                  I used to get "Not enough storage is available to complete this operation" after one or two builds. I had to restart VS and cross my fingers for each of the build.

                  Crystal Reports 在 CrystalReportViewer 上的显示速度更快,而且 objrpt.PrintToPrinter 的运行速度也提高了 500 倍.

                  Crystal Reports are displayed faster on CrystalReportViewer and also objrpt.PrintToPrinter works 500 times faster.

                  我希望这些要点对程序员同行有所帮助.

                  I hope these points will help fellow programmers.

                  这篇关于将 DB 日志记录信息应用于每个 Crystal Reports 部分时,应用程序运行缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:不同版本的 Crystal Reports 运行时 下一篇:在c#中执行水晶报告时TLV记录无效

                  相关文章

                    <tfoot id='zmRCh'></tfoot>

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

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

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

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