点点滴滴
BlogJava
::
首页
::
新随笔
::
联系
::
聚合
::
管理
::
0 随笔 :: 18 文章 :: 0 评论 :: 0 Trackbacks
<
2025年7月
>
日
一
二
三
四
五
六
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
留言簿
(1)
给我留言
查看公开留言
查看私人留言
文章分类
Eclipse中水晶报表(6)
(rss)
Ext&DWR(2)
(rss)
Hibernate(3)
(rss)
Java(3)
(rss)
JavaScript
(rss)
MySql(2)
(rss)
Oracle
(rss)
Spring(1)
(rss)
Struts
(rss)
WebWork(1)
(rss)
文章档案
2008年10月 (3)
2008年7月 (4)
2008年4月 (2)
2008年3月 (9)
搜索
最新评论
水晶报表系列文章 -- 用Swing方式显示报表(转)
/**/
/*
* Created on 2005/12/12
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
import
java.awt.
*
;
import
javax.swing.
*
;
import
com.crystaldecisions.ReportViewer.
*
;
//
import com.crystaldecisions.reports.sdk.*;
//
import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
import
com.crystaldecisions.sdk.occa.report.application.
*
;
import
com.crystaldecisions.sdk.occa.report.reportsource.
*
;
/** */
/**
*
@author
phss
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public
class
TestSwing
{
private
static
void
createAndShowGUI()
{
try
{
JFrame.setDefaultLookAndFeelDecorated(
false
);
JFrame frame
=
new
JFrame(
"
TestSwing
"
);
frame.setTitle(
"
Testing CRX1
"
);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ReportViewerBean viewer
=
new
ReportViewerBean();
viewer.init(
new
String[
0
],
null
,
null
,
null
);
System.err.println(
"
--------------1----------
"
);
ReportClientDocument rpt
=
new
ReportClientDocument();
System.err.println(
"
-------------2-----------
"
);
rpt.setReportAppServer(
"
crmboe.mds-sn.com
"
);
//
rpt.setReportAppServer("crmboe.ras.rptappserver");
System.err.println(
"
-------------3-----------
"
);
rpt.open(
"
crmboe.ras.rptappserver://c:\\reports\\aa.rpt
"
,
0
);
//
rpt.open("aa.rpt",0);
System.err.println(
"
--------------4----------
"
);
IReportSource rptSource
=
rpt.getReportSource();
viewer.setReportSource(rptSource);
System.err.println(
"
--------------5----------
"
);
frame.getContentPane().add(viewer, BorderLayout.CENTER);
frame.setSize(
700
,
500
);
frame.setVisible(
true
);
viewer.start();
}
catch
(Exception e)
{
e.printStackTrace();
}
}
public
static
void
main(String[] args)
{
SwingUtilities.invokeLater(
new
Runnable()
{
public
void
run()
{
createAndShowGUI();
}
}
);
}
}
posted on 2008-03-27 15:18
张亦飞
阅读(412)
评论(0)
编辑
收藏
所属分类:
Eclipse中水晶报表
新用户注册
刷新评论列表
只有注册用户
登录
后才能发表评论。
网站导航:
博客园
IT新闻
Chat2DB
C++博客
博问
相关文章:
如何向水晶报表传参数
水晶报表系列文章--在Web 上打印水晶报表的四种方法( 转)
水晶报表在网页中居中显示-----没解决
水晶报表系列文章 -- 用Swing方式显示报表(转)
水晶报表系列文章--优化策略笔记(转载)
关于在水晶报表中用JDBC方式连接MySQL数据库
Powered by:
BlogJava
Copyright © 张亦飞