您的位置:首页 > 其它

VS.NET2005 CrystalReport PrintMode

2007-10-29 14:13 344 查看
VS.NET2005 CrystalReport的打印模式分为Pdf和ActiveX两种,打印模式的设置在CrystalReportViewer.PrintMode 属性中。

1、PDF模式的打印需在服务端及客户端安装pdf格式阅读器。

2、ActiveX模式:ActiveX 打印控件允许使用者将报表直接打印至本机打印机。使用ActiiveX模式需要在Web.config的<configuration>节中添加如下配置信息:

<configSections>
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="printControl" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" />
</sectionGroup>
</sectionGroup>
</configSections>
<businessObjects>
<crystalReports>
<printControl>
<add key="url" value="http://localhost:5760/web/PrintControl.cab" />
</printControl>
</crystalReports>
</businessObjects>

PrintControl.cab 档案可以从 Business Objects 技术支持网站下载取得,并可以将 cab 档案放在 本地Web 服务器虚拟目录中,以供 URL 存取之用。

PrintControl.cab 档案的下载地址:http://support.businessobjects.com/CRforVS2005/PrintControl.cab

可以将PrintControl.cab 档案显示在页面上,在Web页面Html中加入如下代码:

<object id="CrystalPrintControl" classid="CLSID:BAEE131D-290A-4541-A50A-8936F159563A" codebase="http://127.0.0.1/rpt/PrintControl.cab" #Version="10,2,0,1078" viewastext></object>

#Version是版本号,如果你是其他的版本将版本号修改一下即可。

可以看到它是一个CrystalReport的一个打印控件。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: