2015-02-23 70 views
0

我被要求從主動報告框架的v3遷移到v8。在componentone ActiveReports v8用戶指南之後,使整個項目編譯沒有問題。此外,我可以成功導出爲.pdf。在winforms中渲染activeReports v8 webview

唯一的問題來自WebView渲染,它只是不渲染。

我會後的代碼隱藏,在.aspx和web.config中

的.aspx:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CertificadoAlumno.ascx.cs" Inherits="Planeta.Modules.CampusCertificadosV8.Controls.CertificadoAlumno" %> 
<%@ Register Assembly="GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" Namespace="GrapeCity.ActiveReports.Web" TagPrefix="ActiveReportsWeb" %> 

<ActiveReportsWeb:WebViewer ID="wvCertificado" runat="server" height="100%" width="100%" ViewerType="RawHtml"></ActiveReportsWeb:WebViewer> 

代碼隱藏:

public partial class CertificadoAlumno : CorePortalSubControl { 
    protected GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport pdfExporter; 
    protected void Page_Load(object sender, EventArgs e) {} 

    public void showLoad(DAL_Certificados.CERTIFICADODataTable pdtCertificado) { 
     GrapeCity.ActiveReports.SectionReport lrpt = new SectionReport(); 
     DAL_Certificados ldalCertificado = new DAL_Certificados(); 
     ldalCertificado.Merge(pdtCertificado); 

     BLLCertificados lCertificados = BLLDispatcher.BllCertificados; 
     if (pdtCertificado.Rows.Count > 0) { 
     if (pdtCertificado[0].axis_y_key == lCertificados.C_KEY_ASIGNATURAS) { 
      wvCertificado.Report = new RPTCertificadoAlumnoHorizontalInvertido(); 
     } else { 
      if (pdtCertificado[0].col_title14.Length > 0) { 
      wvCertificado.Report = new RPTCertificadoAlumnoHorizontal(); 
      } else { 
      wvCertificado.Report = new RPTCertificadoAlumnoVertical(); 
      } 
     } 
     lrpt = wvCertificado.Report as GrapeCity.ActiveReports.SectionReport; 
     setReportLogo(lrpt);//that sets the image to report 

     lrpt.DataSource = ldalCertificado;//it's a DataTable 
     lrpt.DataMember = ldalCertificado.CERTIFICADO.TableName; 
     wvCertificado.Visible = true; 
     lrpt.Run(); 
     } 
    } 
} 

的web.config :

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <system.webServer> 
    <handlers> 
     <add name="LogoffHandler*" path="Logoff.aspx" verb="*" type="DotNetNuke.Services.Authentication.LogOffHandler, DotNetNuke" preCondition="integratedMode" /> 
     <add name="RSSHandler" path="RSS.aspx" verb="*" type="DotNetNuke.Services.Syndication.RssHandler, DotNetNuke" preCondition="integratedMode" /> 
     <add name="LinkClickHandler" path="LinkClick.aspx" verb="*" type="DotNetNuke.Services.FileSystem.FileServerHandler, DotNetNuke" preCondition="integratedMode" /> 
     <add name="CaptchaHandler" path="*.captcha.aspx" verb="*" type="DotNetNuke.UI.WebControls.CaptchaHandler, DotNetNuke" preCondition="integratedMode" /> 
     <add name="UserProfilePageHandler" path="User.aspx" verb="*" type="DotNetNuke.Services.UserProfile.UserProfilePageHandler, DotNetNuke" preCondition="integratedMode" /> 
     <add name="RadProgressHandler" verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode" /> 
     <add name="ClientDependencyHandler" verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core" preCondition="integratedMode" /> 
     <add name="UserProfilePicHandler" path="ProfilePic.ashx" verb="*" type="DotNetNuke.Services.UserProfile.UserProfilePicHandler, DotNetNuke" preCondition="integratedMode" /> 
     <add name="Bring2mind Telerik Upload" path="Bring2mind.Telerik.RadUploadProgressHandler.aspx" verb="*" type="Bring2mind.Telerik.WebControls.RadUploadProgressHandler, Bring2mind.Telerik.RadUpload.Net2" preCondition="integratedMode,runtimeVersionv2.0" /> 
     <remove name="ExtensionlessUrl-Integrated-4.0" /> 
     <add name="ExtensionlessUrl-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> 
     <add name="SitemapHandler" path="Sitemap.aspx" verb="*" type="DotNetNuke.Services.Sitemap.SitemapHandler, DotNetNuke" preCondition="integratedMode" /> 
     <add name="Telerik.Web.UI.WebResource" verb="*" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode" /> 
     <add name="Telerik.Web.UI.ChartHttpHandler" verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
     <add name="HtmTemplateFileHandler" verb="*" path="*.htmtemplate" type="DotNetNuke.Providers.RadEditorProvider.HtmTemplateFileHandler, DotNetNuke.RadEditorProvider" preCondition="integratedMode" /> 
     <add verb="*" path="*.ar8" type="GrapeCity.ActiveReports.Web.Handlers.ReportBinariesStreamer, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR7_ReportBinariesStreamer" resourceType="Unspecified" preCondition="integratedMode"/> 
     <add verb="*" path="*.ActiveReport" type="GrapeCity.ActiveReports.Web.Handlers.CompiledReportHandler, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR7_CompiledReportHandler" resourceType="Unspecified" preCondition="integratedMode"/> 
     <add verb="*" path="*.rpx" type="GrapeCity.ActiveReports.Web.Handlers.RpxHandler, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR7_RpxHandler" resourceType="Unspecified" preCondition="integratedMode"/> 
     <add verb="*" path="*.rdl,*.rdlx" type="GrapeCity.ActiveReports.Web.Handlers.RdlxHandler, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR7_RdlxHandler" resourceType="Unspecified" preCondition="integratedMode"/> 
     <add verb="*" path="*.ar8Web" type="GrapeCity.ActiveReports.Web.Handlers.WebCacheAccessHandler, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR7_WebCacheAccessHandler" resourceType="Unspecified" preCondition="integratedMode"/> 
    </handlers> 
    </system.webServer> 
    <system.web> 
    <httpHandlers> 
     <add verb="*" path="*.captcha.aspx" type="DotNetNuke.UI.WebControls.CaptchaHandler, DotNetNuke" /> 
     <add verb="*" path="LinkClick.aspx" type="DotNetNuke.Services.FileSystem.FileServerHandler, DotNetNuke" /> 
     <add verb="*" path="RSS.aspx" type="DotNetNuke.Services.Syndication.RssHandler, DotNetNuke" /> 
     <add verb="*" path="Logoff.aspx" type="DotNetNuke.Services.Authentication.LogOffHandler, DotNetNuke" /> 
     <add path="User.aspx" verb="*" type="DotNetNuke.Services.UserProfile.UserProfilePageHandler, DotNetNuke" /> 
     <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" /> 
     <add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core" /> 
     <add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " /> 
     <add path="ProfilePic.ashx" verb="*" type="DotNetNuke.Services.UserProfile.UserProfilePicHandler, DotNetNuke" /> 
     <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
     <add path="dmxdav.axd" verb="GET,HEAD,PUT,OPTIONS,PROPFIND,PROPPATCH,COPY,MOVE,DELETE,MKCOL,LOCK,UNLOCK,DEBUG" type="Bring2mind.DNN.Modules.DMX.WebDAV.DavHandler, Bring2mind.DNN.Modules.DMX.WebDAV" validate="false" /> 
     <add path="/" verb="OPTIONS,PROPFIND" type="Bring2mind.DNN.Modules.DMX.WebDAV.DavHandler, Bring2mind.DNN.Modules.DMX.WebDAV" validate="false" /> 
     <add path="ComponentArtUploadProgress.axd" verb="*" type="ComponentArt.Web.UI.UploadProgressHandler, ComponentArt.Web.UI" /> 
     <add path="Bring2mind.Telerik.RadUploadProgressHandler.aspx" verb="*" type="Bring2mind.Telerik.WebControls.RadUploadProgressHandler, Bring2mind.Telerik.RadUpload.Net2" /> 
     <add verb="*" path="Telerik.Web.UI.WebResource.axd" validate="false" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" /> 
     <add verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="true" /> 
     <add verb="*" path="*.ar8" type="GrapeCity.ActiveReports.Web.Handlers.ReportBinariesStreamer, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
     <add verb="*" path="*.ActiveReport" type="GrapeCity.ActiveReports.Web.Handlers.CompiledReportHandler, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
     <add verb="*" path="*.rpx" type="GrapeCity.ActiveReports.Web.Handlers.RpxHandler, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
     <add verb="*" path="*.rdl,*.rdlx" type="GrapeCity.ActiveReports.Web.Handlers.RdlxHandler, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
     <add verb="*" path="*.ar8Web" type="GrapeCity.ActiveReports.Web.Handlers.WebCacheAccessHandler, GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
    </httpHandlers> 
    <compilation debug="false" strict="false"> 
     <buildProviders> 
     <remove extension=".resx" /> 
     <remove extension=".resources" /> 
     </buildProviders> 
     <assemblies> 
     <add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
     <add assembly="Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> 
     <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
     <add assembly="GrapeCity.ActiveReports.Extensibility.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
     <add assembly="GrapeCity.ActiveReports.Document.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
     <add assembly="GrapeCity.ActiveReports.Export.Html.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
     <add assembly="GrapeCity.ActiveReports.Export.Pdf.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff"/> 
     <add assembly="GrapeCity.ActiveReports.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
     <add assembly="GrapeCity.ActiveReports.Web.v8, Version=8.0.133.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /> 
     </assemblies> 
    </compilation> 
</configuration> 

回答

0

而不是這樣:lrpt.Run();, 指定webviewer報告; this.webviewer1.Report = lrpt; webviewer將在內部運行報告。