| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2440 人关注过本帖
标题:[原创]Birt中用API创建和修改BIRT报表实例
只看楼主 加入收藏
stam
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-6-20
收藏
 问题点数:0 回复次数:0 
[原创]Birt中用API创建和修改BIRT报表实例
创建和修改BIRT报表是通过使用Model的接口 (org.eclipse.birt.report.model)来完成。下面是一个简单的实例:创建一个report design,添加一个label。

IDesignEngine designEngine = new DesignEngine( new DesignConfig( ) );
SessionHandle sessionHandle = designEngine.newSessionHandle( ULocale.ENGLISH );
ReportDesignHandle reportDesignHandle = sessionHandle.createDesign( );

ElementFactory elementFactory = new ElementFactory( reportDesignHandle.getModule( ) );

LabelHandle labelHandle = elementFactory.newLabel( "label" );
labelHandle.setText( "hello world" );
reportDesignHandle.getBody( ).add( labelHandle );

ModuleHandle moduleHandle = reportDesignHandle.getModuleHandle( );
moduleHandle.saveAs( path + file );
reportDesignHandle.close( );

关注BI关注百灵http://www.
搜索更多相关主题的帖子: BIRT报表 API 实例 Birt report 
2008-06-20 10:32
快速回复:[原创]Birt中用API创建和修改BIRT报表实例
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016649 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved