本帖最后由 Lenka.Guo 于 2016-3-15 12:10 编辑
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportViewHtml5.aspx.cs" Inherits="Attendance.ReportViewHtml5" %>
- <%@ Register assembly="GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" namespace="GrapeCity.ActiveReports.Web" tagprefix="ActiveReportsWeb" %>
- <%@ Register TagPrefix="ActiveReportsWeb" Namespace="GrapeCity.ActiveReports.Web" Assembly="GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" %>
- <!doctype html>
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head runat="server">
- <title>无标题页</title>
- <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
- <link rel="stylesheet" href="/Plugin/AR/Html5/GrapeCity.ActiveReports.Viewer.Html.css"/>
- <link rel="stylesheet" href="/Plugin/AR/Html5/theme-cosmo.css"/>
- <script src="/Js/jquery.min.js" type="text/javascript"></script>
- <script src="/Js/CommonFun.js" type="text/javascript"></script>
- <script src="/Plugin/AR/Html5/bootstrap-3.0.0.js" type="text/javascript"></script>
- <script src="/Plugin/AR/Html5/knockout-2.3.0.js" type="text/javascript"></script>
- <script src="/Plugin/AR/Html5/GrapeCity.ActiveReports.Viewer.Html.js" type="text/javascript"></script>
- <script type="text/javascript">
- $(function () {
- var viewer = GrapeCity.ActiveReports.Viewer(
- {
- element: '#viewer',
- report: {
- id: "rpt/kqrb.rdlx",
- parameters: [
- {
- name: "QueryDate",
- value: getQueryStringByName("QueryDate")
- }]
- },
- selectedReportIndex: 0,
- reportService: {
- url: '/ActiveReports.ReportService.asmx'
- },
- uiType: 'desktop',
-
- documentLoaded: function reportLoaded() {
- console.log(viewer.pageCount);
- },
- localeUri: '/plugin/AR/Html5/language/cn.txt',
- reportLoaded: function (reportInfo) {
- console.log(reportInfo.parameters);
- },
- error: function (error) {
- console.log("error");
- }
- });
- //查询
- $("#QueryKey").val(getQueryStringByName("QueryDate"));
- $("#QueryButton").click(function () {
- var localurl = self.location.href;
- localurl = RemoveQueryString(localurl, "QueryDate");
- localurl = AddQueryString(localurl, "QueryDate", $("#QueryKey").val());
- self.location.href = localurl;
- });
- });
- </script>
- <style type="text/css">
- #ExportSelect option, #ReportSelect option
- {
- padding: 5px !important;
- }
- .QueryBar {
- margin: 0 auto;
- width: 970px;
- height: 40px;
- }
- </style>
- </head>
- <body>
- <form id="form1" runat="server">
- <div class="QueryBar">
- 查询月份<input id="QueryKey" type="text" /><input id="QueryButton" type="button" value=" 查询 " />
- </div>
- <div id="viewer" style="width:970px;height:800px; margin: 0 auto;">
-
- </div>
- </form>
- </body>
- </html>
复制代码
提示ar10文件不存在,404错误。
文件结构这样的,也将链接设置为对应的路径。
这是web.config配置信息
- <?xml version="1.0"?>
- <!--
- 有关如何配置 ASP.NET 应用程序的详细信息,请访问
- http://go.microsoft.com/fwlink/?LinkId=169433
- -->
- <configuration>
- <configSections>
- <section name="ActiveReports10" type="GrapeCity.ActiveReports.Web.ActiveReportsSettingsSection" />
- </configSections>
- <appSettings>
- <add key="DbConn1" value="Data Source=(local);Initial Catalog=zkteco;Persist Security Info=True;User ID=sa;Password=xxxx" />
-
- <add key="SystemEncoding" value="utf-8" />
- </appSettings>
- <system.web>
- <compilation debug="true" targetFramework="4.0">
- <assemblies>
- <add assembly="GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add assembly="GrapeCity.ActiveReports.Export.Xaml.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=CC4967777C49A3FF" />
- <add assembly="GrapeCity.ActiveReports.Export.Document.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=CC4967777C49A3FF" />
- <add assembly="GrapeCity.ActiveReports.Export.Pdf.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add assembly="GrapeCity.ActiveReports.Export.Html.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add assembly="GrapeCity.ActiveReports.Export.Image.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add assembly="GrapeCity.ActiveReports.Export.Rdf.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=CC4967777C49A3FF" />
- <add assembly="GrapeCity.ActiveReports.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add assembly="GrapeCity.ActiveReports.Document.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add assembly="GrapeCity.ActiveReports.Diagnostics.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add assembly="GrapeCity.ActiveReports.Extensibility.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
- <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
- <add assembly="GrapeCity.ActiveReports.Chart.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
- </assemblies>
- </compilation>
- <httpModules>
- <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
- <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
- </httpModules>
- <httpHandlers>
- <remove verb="*" path="*.asmx" />
- <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
- <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
- <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
- <add verb="*" path="*.ar10" type="GrapeCity.ActiveReports.Web.Handlers.ReportBinariesStreamer, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add verb="*" path="*.ActiveReport" type="GrapeCity.ActiveReports.Web.Handlers.CompiledReportHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add verb="*" path="*.rpx" type="GrapeCity.ActiveReports.Web.Handlers.RpxHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add verb="*" path="*.rdl,*.rdlx" type="GrapeCity.ActiveReports.Web.Handlers.RdlxHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- <add verb="*" path="*.ar10Web" type="GrapeCity.ActiveReports.Web.Handlers.WebCacheAccessHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
- </httpHandlers>
- </system.web>
- <system.webServer>
- <validation validateIntegratedModeConfiguration="false"/>
- <defaultDocument enabled="true">
- <!-- this line enables default documents for a directory -->
- <files>
- <clear/>
- <!-- removes the existing default document list -->
- <add value="index.html"/>
- </files>
- </defaultDocument>
- <modules runAllManagedModulesForAllRequests="true">
- <remove name="ScriptModule"/>
- <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
- </modules>
- <handlers>
- <remove name="WebServiceHandlerFactory-Integrated"/>
- <remove name="ScriptHandlerFactory"/>
- <remove name="ScriptHandlerFactoryAppServices"/>
- <remove name="ScriptResource"/>
- <add name="AsmxHandler" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" resourceType="Unspecified"/>
- <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
- <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
- <add verb="*" path="*.ar10" type="GrapeCity.ActiveReports.Web.Handlers.ReportBinariesStreamer, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_ReportBinariesStreamer" resourceType="Unspecified" preCondition="integratedMode"/>
- <add verb="*" path="*.ActiveReport" type="GrapeCity.ActiveReports.Web.Handlers.CompiledReportHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_CompiledReportHandler" resourceType="Unspecified" preCondition="integratedMode"/>
- <add verb="*" path="*.rpx" type="GrapeCity.ActiveReports.Web.Handlers.RpxHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_RpxHandler" resourceType="Unspecified" preCondition="integratedMode"/>
- <add verb="*" path="*.rdl,*.rdlx" type="GrapeCity.ActiveReports.Web.Handlers.RdlxHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_RdlxHandler" resourceType="Unspecified" preCondition="integratedMode"/>
- <add verb="*" path="*.ar10Web" type="GrapeCity.ActiveReports.Web.Handlers.WebCacheAccessHandler, GrapeCity.ActiveReports.Web.v10, Version=10.0.6191.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_WebCacheAccessHandler" resourceType="Unspecified" preCondition="integratedMode"/>
- </handlers>
- </system.webServer>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
- <ActiveReports10>
- <WebService reportsFolder="~/" assemblyFolder="~/" />
- </ActiveReports10>
- </configuration>
复制代码
|