查看使用受管理 RAS 服务器的报表
来源:互联网 发布:盈峰环境科技集团java 编辑:程序博客网 时间:2024/05/18 09:04
此实例说明如何使用查看器标记库来显示使用从受管理报表应用程序服务器中所获得报表源的报表。
查看使用受管理 RAS 服务器的报表
- 导入相应的类和库
<%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer" %>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.occa.managedreports.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoObject" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoObjects" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoStore" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2" %>
- 登录到 Crystal Enterprise 并获取 InfoStore 对象。
在本例中,使用了默认管理员帐户来登录到与应用程序服务器运行在同一计算机上的 Crystal Enterprise 安装。
<%
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("administrator", "", "localhost", "secEnterprise");
????IInfoStore infoStore = (IInfoStore) es.getService("", "InfoStore");
- 查询想要查看的报表。
IInfoObjects infoObjects = infoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_NAME='World Sales Report'");
????IInfoObject report = (IInfoObject) infoObjects.get(0);
- 为检索到的报表创建一个 RAS 报表源。
IReportSourceFactory2 reportFactory = (IReportSourceFactory2) es.getService ("", "RASReportFactory");
????Object reportSource = reportFactory.createReportSource(report, request.getLocale());
- 将 ReportSource 对象缓存在会话变量中。
这样,查看器将能够检索到该对象。
session.setAttribute("ReportSource", reportSource);
%>
- 创建一个指定查看器名称、报表源类型和报表源变量的 viewer 标记。
在本例中,报表源类型为 reportApplicationServer,并且报表源变量是指您在其中存储了 ReportSource 对象的会话变量。
<html>
<body>
<crviewer:viewer viewerName="CrystalViewer" reportSourceType="reportApplicationServer" reportSourceVar="ReportSource" />
</body>
</html>
注意: ???本例中不需要 report 标记,因为报表源已缓存在会话变量中,并且不需要由查看器检索。
- 查看使用受管理 RAS 服务器的报表
- 使用RAS SDK 动态添加子报表
- RAS使用拨号网络拨号的类
- 基于SSM框架maven管理的RAS密码加密算法
- 如何使用 IceReport 的报表服务器
- 使用RAS的API创建拨号连接资料汇总
- 使用ASP.NET2.0的ReportViewer查看RDLC报表
- RAS
- RAS
- RAS
- 忆龙2009:使用EAP-TLS试图连接到RAS服务器时验证失败
- 查看Linux服务器的内存使用情况
- 查看Linux服务器的内存使用情况
- alexa查看网站使用的web服务器
- 查看MongoDB索引的使用,管理索引
- RAS系列的API收集
- 移动端报表使用教程-如何查看报表
- 使用 SharePoint 2.0 Web 部件查看报表
- Linux 下的pdf阅读器
- printf & scanf
- wsdl文件结构分析
- 微软Windows软件防火墙实现技术简述
- ICallbackEventHandler
- 查看使用受管理 RAS 服务器的报表
- Java SimpleDateFormat Bug
- 洗心革面 重新学习JSP! ----之二:过滤器(1)
- Bill Gates: Never surrender to complexity
- 3D图片现实效果
- 轻公司
- asp.net ajax 无法弹出alert对话框的解决方法
- 一个POI操作Excel简单例子
- 基于TinyOS的无线传感器网络体系结构