SAP Crystal Reports Viewer does not display in browser

前端 未结 7 533
忘了有多久
忘了有多久 2021-02-02 04:48

I own a ASP.NET web project with framework 4.5. Is installed and implemented an SAP report for VS2012 Crystal Reports Developer.

Making in Local report, it works correct

相关标签:
7条回答
  • 2021-02-02 04:49

    I had a situation where I had some Crystal Reports created using connection "SQL Server Native Client 11.0" and some using connection "Microsoft OLE DB Provider for SQL Server". Both worked on our old server running IIS 6. However, when we migrated over to a new server running IIS 8.5, some reports worked as expected, while others displayed an empty Crystal Reports viewer. After 4-5 days of pulling my hair out and trying everything I could think of, I finally compared everything between the reports that worked vs. the reports that did not work. What I discovered was the reports that worked used the "Microsoft OLE DB Provider for SQL Server" connection. Once I made this change, the reports served up perfectly.

    0 讨论(0)
  • 2021-02-02 04:55

    I believe you need to deploy it as .Net 4, not .Net 4.5.

    0 讨论(0)
  • 2021-02-02 04:58

    Solved.... 100 % 'll work. Follow the below two steps:

    1.Update Application Folder.

    "C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13" into your application root folder asp below snapshot.

    1. Update Web.Config file by the following code.

    0 讨论(0)
  • 2021-02-02 04:58

    For those of us running migrated projects from .Net 4.0 or lower to 4.5+ I have made an observation. It seems if your page that contains the viewer is in a subdirectory then the image urls are being generated relative to that page and not to the root of the web application. E.g if your page is /gl/accounts.aspx then the image may be /gl/crystalimagehandler.aspx etc A quick way to fix this is to change your handler mapping to a wildcard ending in crystalimagehandler.aspx or put the following code in Global.asax

    protected void Application_BeginRequest(object sender, EventArgs e)
            {
                var p = Request.Path.ToLower().Trim();
                if (p.EndsWith("/crystalimagehandler.aspx") && p!= "/crystalimagehandler.aspx")
                {
                    var fullPath=Request.Url.AbsoluteUri.ToLower();
                    var index = fullPath.IndexOf("/crystalimagehandler.aspx");
                    Response.Redirect(fullPath.Substring(index));
                }
            }
    
    0 讨论(0)
  • 2021-02-02 05:10

    For me, the webpage Developer Tools (F12 then Console tab) showed that the server was looking for root/aspnet_client/system_web/4_6_1069 folder when I had copied the files into the 4_0_30319 folder. I renamed the folder and BAM!

    0 讨论(0)
  • 2021-02-02 05:12

    I have smiler problem and found a solution.

    I think there is some problem in finding Resource from default Resource-Uri for formatting of crystal report.

    For proper formatting Copy C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13 this folder into your project.

    And past these lines into your web.config file

    <configSections>
    <sectionGroup name="businessObjects">
      <sectionGroup name="crystalReports">
        <section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null" />
           <section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler" />
      </sectionGroup>
    </sectionGroup>
      </configSections>
    

    <businessObjects>
      <crystalReports>
        <rptBuildProvider>
          <add embedRptInResource="true" />
        </rptBuildProvider>
        <crystalReportViewer>
              <add key="ResourceUri" value="/crystalreportviewers13" />
      </crystalReportViewer>
      </crystalReports>
    </businessObjects>
    

    Check this

    This will help you.

    0 讨论(0)
提交回复
热议问题