使用ActiveReports实现PDF打印
操作方法
- 01
使用PDF打印的方法一般是在Silverlight项目,直接将报表转换为PDF格式然后再打印。在ActiveReports中设置好PDF打印后,单击Silverlight报表查看器得工具栏上的“打印”按钮就会出现如下对话框: 设置PdfPrint的方法很简单,在Silverlight报表查看器的Web.config文件中添加以下XML代码就行了: <httpHandlers> <addverb="*"path="*.ar7"type="GrapeCity.ActiveReports.Web.Handlers.ReportBinariesStreamer, GrapeCity.ActiveReports.Web.v7, Version=7.0.xxxx.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff"/> <addverb="*"path="*.ar7Web"type="GrapeCity.ActiveReports.Web.Handlers.WebCacheAccessHandler, GrapeCity.ActiveReports.Web.v7, Version=7.0.xxxx.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff"/> <addverb="*"path="*.ActiveReport"type="GrapeCity.ActiveReports.Web.Handlers.CompiledReportHandler, GrapeCity.ActiveReports.Web.v7, Version=7.0.xxxx.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff"/> <addverb="*"path="*.rpx"type="GrapeCity.ActiveReports.Web.Handlers.RpxHandler, GrapeCity.ActiveReports.Web.v7, Version=7.0.xxxx.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff"/> <addverb="*"path="*.rdl,*.rdlx"type="GrapeCity.ActiveReports.Web.Handlers.RdlxHandler, GrapeCity.ActiveReports.Web.v7, Version=7.0.xxxx.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff"/> <removeverb="*"path="*.asmx"/> <addverb="*"path="*.asmx"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </httpHandlers>