<bdo id='5KQsY'></bdo><ul id='5KQsY'></ul>

  • <legend id='5KQsY'><style id='5KQsY'><dir id='5KQsY'><q id='5KQsY'></q></dir></style></legend>
      <tfoot id='5KQsY'></tfoot>

      <small id='5KQsY'></small><noframes id='5KQsY'>

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

        在清单资源中找不到报告

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

              <tbody id='OaiTJ'></tbody>
              <bdo id='OaiTJ'></bdo><ul id='OaiTJ'></ul>

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

                <legend id='OaiTJ'><style id='OaiTJ'><dir id='OaiTJ'><q id='OaiTJ'></q></dir></style></legend>
                <tfoot id='OaiTJ'></tfoot>
                1. 本文介绍了在清单资源中找不到报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我将所有 Crystal Reports 保存在一个文件夹中:

                  I am saving all my Crystal Reports in one folder:

                  VOUCHERS-->SALE-->BILLFORMATS
                  

                  例如:第一个报告的位置是:

                  For example: The location of the first report is:

                  VOUCHERS-->SALE-->BILLFORMATS-->BillFormat1.rpt
                  

                  Vegi_Manager 是根命名空间.

                  Vegi_Manager is the root namespace.

                  当我构建项目并尝试在代码中使用报告时,它会抛出错误:

                  When I build the project and try to use the report in the code, it throws an error:

                  Unable to find the report in the manifest resources
                  

                  .cs 文件有问题吗?

                  Is there some problem with the .cs file?

                  代码:

                  //------------------------------------------------------------------------------
                  // <auto-generated>
                  //     This code was generated by a tool.
                  //     Runtime Version:4.0.30319.1
                  //
                  //     Changes to this file may cause incorrect behavior and will be lost if
                  //     the code is regenerated.
                  // </auto-generated>
                  //------------------------------------------------------------------------------
                  
                  namespace Vegi_Manager.VOUCHERS.SALE.BILLFORMATS {
                      using System;
                      using System.ComponentModel;
                      using CrystalDecisions.Shared;
                      using CrystalDecisions.ReportSource;
                      using CrystalDecisions.CrystalReports.Engine;
                  
                  
                      public class BillFormat1 : ReportClass {
                  
                          public BillFormat1() {
                          }
                  
                          public override string ResourceName {
                              get {
                                  return "BillFormat1.rpt";
                              }
                              set {
                                  // Do nothing
                              }
                          }
                  
                          public override bool NewGenerator {
                              get {
                                  return true;
                              }
                              set {
                                  // Do nothing
                              }
                          }
                  
                          public override string FullResourceName {
                              get {
                                  return "Vegi_Manager.VOUCHERS.SALE.BILLFORMATS.BillFormat1.rpt";
                              }
                              set {
                                  // Do nothing
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.CrystalReports.Engine.Section Section1 {
                              get {
                                  return this.ReportDefinition.Sections[0];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.CrystalReports.Engine.Section Section2 {
                              get {
                                  return this.ReportDefinition.Sections[1];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.CrystalReports.Engine.Section Section3 {
                              get {
                                  return this.ReportDefinition.Sections[2];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.CrystalReports.Engine.Section Section4 {
                              get {
                                  return this.ReportDefinition.Sections[3];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.CrystalReports.Engine.Section Section5 {
                              get {
                                  return this.ReportDefinition.Sections[4];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamFirmName {
                              get {
                                  return this.DataDefinition.ParameterFields[0];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamFirmJurisdiction {
                              get {
                                  return this.DataDefinition.ParameterFields[1];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamFirmPhoneNo {
                              get {
                                  return this.DataDefinition.ParameterFields[2];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamFirmMobileNo {
                              get {
                                  return this.DataDefinition.ParameterFields[3];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamFirmDetails {
                              get {
                                  return this.DataDefinition.ParameterFields[4];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamFirmAddress {
                              get {
                                  return this.DataDefinition.ParameterFields[5];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamFirmCity {
                              get {
                                  return this.DataDefinition.ParameterFields[6];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamFirmState {
                              get {
                                  return this.DataDefinition.ParameterFields[7];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamFirmBankDetails {
                              get {
                                  return this.DataDefinition.ParameterFields[8];
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public CrystalDecisions.Shared.IParameterField Parameter_ParamBillNo {
                              get {
                                  return this.DataDefinition.ParameterFields[9];
                              }
                          }
                      }
                  
                      [System.Drawing.ToolboxBitmapAttribute(typeof(CrystalDecisions.Shared.ExportOptions), "report.bmp")]
                      public class CachedBillFormat1 : Component, ICachedReport {
                  
                          public CachedBillFormat1() {
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public virtual bool IsCacheable {
                              get {
                                  return true;
                              }
                              set {
                                  // 
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public virtual bool ShareDBLogonInfo {
                              get {
                                  return false;
                              }
                              set {
                                  // 
                              }
                          }
                  
                          [Browsable(false)]
                          [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
                          public virtual System.TimeSpan CacheTimeOut {
                              get {
                                  return CachedReportConstants.DEFAULT_TIMEOUT;
                              }
                              set {
                                  // 
                              }
                          }
                  
                          public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
                              BillFormat1 rpt = new BillFormat1();
                              rpt.Site = this.Site;
                              return rpt;
                          }
                  
                          public virtual string GetCustomizedCacheKey(RequestContext request) {
                              String key = null;
                              // // The following is the code used to generate the default
                              // // cache key for caching report jobs in the ASP.NET Cache.
                              // // Feel free to modify this code to suit your needs.
                              // // Returning key == null causes the default cache key to
                              // // be generated.
                              // 
                              // key = RequestContext.BuildCompleteCacheKey(
                              //     request,
                              //     null,       // sReportFilename
                              //     this.GetType(),
                              //     this.ShareDBLogonInfo );
                              return key;
                          }
                      }
                  }
                  

                  有时我将 .cs 文件中的命名空间更改为 Vegi_Manager 而不是 Vegi_Manager.VOUCHERS.SALE.BILLFORMATS,它可以工作,但是当再次编译项目时,它会恢复返回 Vegi_Manager.VOUCHERS.SALE.BILLFORMATS 并再次显示相同的错误.

                  Sometimes I change the namespace in .cs file to Vegi_Manager instead of Vegi_Manager.VOUCHERS.SALE.BILLFORMATS, it works but when the project is again compiled, it reverts back to Vegi_Manager.VOUCHERS.SALE.BILLFORMATS and again shows the same error.

                  出现上述错误的原因是什么?

                  What causes the above error?

                  推荐答案

                  我收到了同样的错误,因为我将报告的构建操作从 Embedded resource 更改为 Resource.如果您将构建操作更改为嵌入式资源,它应该可以解决问题.要更改它,请单击 .rpt 文件,然后转到其高级属性并单击 Build Action 下拉列表.

                  I received the same error because I changed the build action on my report from Embedded resource to Resource. If you change your build action to Embedded resource it should fix the problem. To change it, click on the .rpt file, and go to its advanced properties and click the Build Action drop down list.

                  这篇关于在清单资源中找不到报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:CrystalReports ReportDocument 与数据库连接的内存泄漏 下一篇:无法在清单资源中找到报告 - Crystal Report/C#

                  相关文章

                  1. <legend id='EnUw1'><style id='EnUw1'><dir id='EnUw1'><q id='EnUw1'></q></dir></style></legend>

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

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

                    <tfoot id='EnUw1'></tfoot>