在Script通过name或者ID访问元素 http://www.birt-exchange.org/org/…
不静之心
分类:未分类
birt用脚本javascript创设数据源,并从配置文件中读数据库信息
birt用脚本javascript创设数据源,并从配置文件中读数据库信息 http://www.myexcep…
Birt的JavaScript脚本简单调试
Birt的JavaScript脚本简单调试 http://www.myexception.cn/javascr…
ThinkPHP3 扩展的: 上传文件
比如要使用上传,那么去官方/扩展/找到UploadFile文件,然后 存放在:ThinkPHP/Extend/…
利用BIRT API生成报表例子4 — 交叉表
利用BIRT API生成报表例子4 — 交叉表 收集一些api信息, 为以后用api做交叉表提供参…
利用BIRT API生成报表例子3
利用BIRT API生成报表例子3
|
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
package com.test; import java.io.InputStream; import java.io.IOException; import java.util.Properties; import java.util.logging.Level; import org.eclipse.birt.report.engine.api.EngineConfig; import org.eclipse.birt.report.engine.api.IReportEngine; import javax.servlet.*; import org.eclipse.birt.core.framework.PlatformServletContext; import org.eclipse.birt.core.framework.IPlatformContext; import org.eclipse.birt.core.framework.Platform; import org.eclipse.birt.core.exception.BirtException; import org.eclipse.birt.report.engine.api.IReportEngineFactory; public class BirtEngine { private static IReportEngine birtEngine = null; private static Properties configProps = new Properties(); private final static String configFile = "BirtConfig.properties"; public static synchronized void initBirtConfig() { loadEngineProps(); } public static synchronized IReportEngine getBirtEngine(ServletContext sc) { if (birtEngine == null) { EngineConfig config = new EngineConfig(); if( configProps != null){ String logLevel = configProps.getProperty("logLevel"); Level level = Level.OFF; if ("SEVERE".equalsIgnoreCase(logLevel)) { level = Level.SEVERE; } else if ("WARNING".equalsIgnoreCase(logLevel)) { level = Level.WARNING; } else if ("INFO".equalsIgnoreCase(logLevel)) { level = Level.INFO; } else if ("CONFIG".equalsIgnoreCase(logLevel)) { level = Level.CONFIG; } else if ("FINE".equalsIgnoreCase(logLevel)) { level = Level.FINE; } else if ("FINER".equalsIgnoreCase(logLevel)) { level = Level.FINER; } else if ("FINEST".equalsIgnoreCase(logLevel)) { level = Level.FINEST; } else if ("OFF".equalsIgnoreCase(logLevel)) { level = Level.OFF; } config.setLogConfig(configProps.getProperty("logDirectory"), level); } config.setEngineHome(""); IPlatformContext context = new PlatformServletContext( sc ); config.setPlatformContext( context ); try { Platform.startup( config ); } catch ( BirtException e ) { e.printStackTrace( ); } IReportEngineFactory factory = (IReportEngineFactory) Platform .createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY ); birtEngine = factory.createReportEngine( config ); } return birtEngine; } public static synchronized void destroyBirtEngine() { if (birtEngine == null) { return; } birtEngine.shutdown(); Platform.shutdown(); birtEngine = null; } public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); } private static void loadEngineProps() { try { //Config File must be in classpath ClassLoader cl = Thread.currentThread ().getContextClassLoader(); InputStream in = null; in = cl.getResourceAsStream (configFile); configProps.load(in); in.close(); } catch (IOException e) { e.printStackTrace(); } } } |
&nbs…
利用BIRT API生成报表例子2
利用BIRT API生成报表例子2 http://www.birthome.com/read.php?tid=…
利用BIRT API生成报表例子1
利用BIRT API生成报表例子1 http://www.birthome.com/read.php?tid-…
利用BIRT API生成报表rptdesign文件
利用BIRT API生成报表rptdesign文件 [crayon-6a82762ca52b612647353…
利用BIRT ReportEngine API开发报表
利用BIRT ReportEngine API开发报表 http://my.oschina.net/kzhou…
PHP遍历文件夹及子文件夹下的所有文件(经典简短代码)
PHP遍历文件夹及子文件夹下的所有文件(经典简短代码) http://www.cublog.cn/u1/431…
php执行sql文件
php执行sql文件
|
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 32 33 34 35 36 37 38 39 40 41 42 43 44 |
<?php //http://blog.163.com/tonylee@126/blog/static/130335554201172412923695/ 先保证表的编码是UTF-8 header('Content-Type: text/html; charset=UTF-8'); $hostname = 'localhost'; $dbname = 'aaa'; $username = 'aaa'; $pw = 'aaa'; $conn = mysql_connect ( $hostname, $username, $pw ) or die ( "无法连接数据库" ); mysql_select_db ( $dbname, $conn ) or die ( "无法连接到数据库" ); mysql_query('set names utf8' ); $arr = array("testdata");//删除数据 foreach($arr as $sqlfile){ $sqlfile=$sqlfile.".sql"; echo $sqlfile."<br>"; $sql = file_get_contents ( $sqlfile ); $ar = split ( ";", join ( "", file ( $sqlfile ) ) ); foreach ( $ar as $sql ){ echo iconv('UTF-8', 'UTF-8' ,$sql); echo "<br>"; mysql_query($sql); } } $arr = array("system_site","system_nvg","system_art_type","system_art","system_pic", "system_message","system_auth","system_user","system_group","system_user_group", "system_i18n","system_access","system_friend");//每个表的insert sql foreach($arr as $sqlfile){ $sqlfile=$sqlfile.".sql"; echo $sqlfile."<br>"; $sql = file_get_contents ( $sqlfile ); $ar = split ( ";", join ( "", file ( $sqlfile ) ) ); foreach ( $ar as $sql ){ echo iconv('UTF-8', 'UTF-8' ,$sql); echo "<br>"; mysql_query($sql); } } ?> |
powerdesigner添加mysql的字符集ENGINE和DEFAULT CHARACTER SET
powerdesigner添加mysql的字符集ENGINE和DEFAULT CHARACTER SET &n…
不用JS也能让工具栏悬浮于网页顶部(兼容所有浏览器)
不用JS也能让工具栏悬浮于网页顶部(兼容所有浏览器) http://wwwy1.blog.hexun.com/…
BIRT: Dynamic Report Servlet
http://wiki.eclipse.org/Java_-_Dynamic_Report_Servlet_(…
Velocity 《VTL语法参考指南》中文版
原文参考:http://www.cnblogs.com/firstyi/archive/2007/11/01/…
VeloCity velocity 乱码问题 解决总结收藏
http://blog.csdn.net/hotdust/article/details/3876784 本文…
BIRT : Scripted Data Source using JSON
http://www.birt-exchange.org/org/devshare/designing-bir…
Modified BIRT HTML Emitter, 增加自定义js代码
http://www.birt-exchange.org/org/devshare/designing-bir…
birt如何得到page number
显示页脚,然后在xml文件里将下面代码替换相应位置代码: http://bbs.csdn.net/topics…
如何去掉birt报表自动生成的日期
http://blog.csdn.net/xorong/article/details/1574915 初次接…
Birt报表显示和打印居中对齐
Birt报表显示和打印居中对齐 分三种方法: 第三种是自己设定出来的. 第一种: http://…
Birt 2.1.1 DataSet利用报表参数动态查询
http://www.blogjava.net/mmwy/archive/2006/11/23/82924.h…
Apache Velocity实现模板化的最简实例
http://www.cnblogs.com/amboyna/archive/2008/06/19/12251…
用Apache Velocity模板引擎速造网站
http://www.cnblogs.com/zhuboxingzbx/articles/1225103.ht…
phpBB的多语言设置
https://www.phpbb.com/kb/article/how-to-install-a-langu…
JQXGrid以自定义数据为表格下拉框的值
|
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 |
columns: [ { text: 'Ship City', datafield: 'ShipCity', width: 150, columntype: 'combobox', createeditor: function (row, column, editor) { // assign a new data source to the combobox. var list = ['Stuttgart', 'Rio de Janeiro', 'Strasbourg']; editor.jqxComboBox({ source: list, promptText: "Please Choose:" }); }, // update the editor's value before saving it. cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) { // return the old value, if the new value is empty. if (newvalue == "") return oldvalue; } }, { text: 'Ship Country', datafield: 'ShipCountry', width: 150, columntype: 'dropdownlist', createeditor: function (row, column, editor) { // assign a new data source to the dropdownlist. var list = ['Germany', 'Brazil', 'France']; editor.jqxDropDownList({ source: list }); }, // update the editor's value before saving it. cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) { // return the old value, if the new value is empty. if (newvalue == "") return oldvalue; } }, { text: 'Ship Name', datafield: 'ShipName', columntype: 'combobox' } ] |
BIRT简单实例
BIRT简单实例 http://www.360doc.com/content/10/1109/1…
BIRT导出Excel: BIRT Excel Output
http://birtworld.blogspot.com/2010/06/birt-excel-output…
BIRT导出PPT有问题:How to create powerpoint and excel exports
http://www.eclipse.org/forums/index.php/m/635982/ You n…
java pojo实体类做birt报表数据源
java pojo实体类做birt报表数据源 http://z-jianwen.iteye.co…
ThinkPHP3 一个变态的问题,$this->_post()得到的数据问题
ThinkPHP3 一个变态的问题,$this->_post()得到的数据问题 首先: j…
BIRT Viewer 2.2 参数设置详解
http://cyfgod.iteye.com/blog/117186 BIRT Viewer 2.2 参数设…
web project中手动嵌入birt运行支持 2.5.2, 3.7.2
http://bing-zz.iteye.com/blog/1564525 嵌入birt 2.5.2 准备 下…
SVN:多项目相同文件批量更新
http://blog.sina.com.cn/s/blog_7bd2429f0100q0ts.html 工作…
