- 浏览: 50388 次
- 性别:
- 来自: 苏州
文章分类
最新评论
-
geeksun:
按照代码运行的结果是空指针,方便给一份完整的代码出来吗?
事件驱动工具RRibbit使用 -
LinApex:
Rribbit啥东西
基于Rribbit和Spring MVC搭建REST风格架构 -
liangzi4454:
PD4ML -
zgpinguo:
全篇代码,没有任何笔记。。。
JFreeChart 笔记
Elixir can generate report by rml template.
Java Code:
Rml:
Java Code:
public static void main(String[] args) { try { ReportEngineFactory.init(new BasicReportHost()); IReportEngine engine = ReportEngineFactory.newEngineInstance(); File outPDF = new File("D:/Elixir/test1.pdf"); FileOutputStream os = new FileOutputStream(outPDF); Properties props = new Properties(); props.setProperty("ID", "1234"); RawReport raw = engine.getRawReport("D:/Elixir/ElixirFS/Embedding HTML Contents with Callback.rml"); IJobInfo jobinfo = engine.renderReport(raw, "application/pdf",os, props); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (RenderException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (DataException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
Rml:
<?xml version="1.0" standalone="yes"?> <rml:report keep-page-count="Yes" cache-all-properties="Yes" grid-enabled="Yes" grid-visible="No" grid-x="100" grid-y="100" disable-csv-auto-wrap="No" disable-excel-auto-wrap="No" style="" xmlns:rml="http://www.elixirtech.com/ElixirReport/RML"> <rml:metadata version="2" location="/ElixirFS/Embedding HTML Contents with Callback.rml"> </rml:metadata> <rml:security encrypted="No" read-only="No" hide-internals="No"> </rml:security> <rml:layout-master-set> <rml:page-setup name="Default" paper="iso-a4" page-width="11905" page-height="16837" orientation="Portrait" horizontal-page-count="1" margin-top="1440" margin-left="1440" margin-bottom="1440" margin-right="1440" column-count="1" column-spacing="0" row-spacing="0" column-layout="Down Then Across"> </rml:page-setup> </rml:layout-master-set> <rml:parameters> </rml:parameters> <rml:datasources> </rml:datasources> <rml:styles> <rml:style name="detail"> <rml:item name="Common.KeepTogether" value="Yes"> </rml:item> <rml:item name="RawElement.Growable" value="Yes"> </rml:item> <rml:item name="RawElement.Shrinkable" value="Yes"> </rml:item> </rml:style> <rml:style name="field"> <rml:item name="Grid.AutoWrap" value="Yes"> </rml:item> <rml:item name="TextElement.FontSize" value="240"> </rml:item> <rml:item name="RawElement.Growable" value="Yes"> </rml:item> <rml:item name="TextElement.FontName" value="Serif"> </rml:item> <rml:item name="RawElement.Shrinkable" value="Yes"> </rml:item> </rml:style> <rml:style name="field.literal" base-name="field"> <rml:item name="RawElement.Growable" value="No"> </rml:item> <rml:item name="RawElement.Shrinkable" value="No"> </rml:item> </rml:style> <rml:style name="group-footer"> <rml:item name="RawElement.Growable" value="Yes"> </rml:item> <rml:item name="RawElement.Shrinkable" value="Yes"> </rml:item> </rml:style> <rml:style name="group-header"> <rml:item name="RawElement.Growable" value="Yes"> </rml:item> <rml:item name="RawElement.Shrinkable" value="Yes"> </rml:item> </rml:style> <rml:style name="page.label"> <rml:item name="TextElement.FontSize" value="240"> </rml:item> <rml:item name="TextElement.FontUnderline" value="No"> </rml:item> <rml:item name="TextElement.FontBold" value="Yes"> </rml:item> <rml:item name="TextElement.FontName" value="Serif"> </rml:item> <rml:item name="TextElement.FontColor" value="Black"> </rml:item> <rml:item name="TextElement.FontItalic" value="No"> </rml:item> </rml:style> <rml:style name="page.text"> <rml:item name="TextElement.FontSize" value="240"> </rml:item> <rml:item name="TextElement.FontUnderline" value="No"> </rml:item> <rml:item name="TextElement.FontBold" value="No"> </rml:item> <rml:item name="TextElement.FontName" value="Serif"> </rml:item> <rml:item name="TextElement.FontColor" value="Black"> </rml:item> <rml:item name="TextElement.FontItalic" value="No"> </rml:item> </rml:style> <rml:style name="rect"> <rml:item name="RawElement.BorderStyle" value="Solid"> </rml:item> <rml:item name="RawElement.BorderColor" value="rgb(0,0,0)"> </rml:item> <rml:item name="Rectangle.BorderTop" value="Yes"> </rml:item> <rml:item name="Rectangle.BorderBottom" value="Yes"> </rml:item> <rml:item name="Common.BackgroundColor" value="rgb(255,255,255)"> </rml:item> <rml:item name="Rectangle.BorderRight" value="Yes"> </rml:item> <rml:item name="Rectangle.BorderLeft" value="Yes"> </rml:item> </rml:style> <rml:style name="sub-report"> <rml:item name="RawElement.Growable" value="Yes"> </rml:item> <rml:item name="RawElement.Shrinkable" value="Yes"> </rml:item> </rml:style> <rml:style name="table"> <rml:item name="RawElement.Growable" value="Yes"> </rml:item> <rml:item name="RawElement.Shrinkable" value="Yes"> </rml:item> </rml:style> </rml:styles> <rml:stylesheets> </rml:stylesheets> <rml:sections> <rml:section name="Section 1" page-setup-ref="Default" border-style="None" border-color="Black" show-header="No" show-footer="Yes" show-page-header="No" show-page-footer="No" keep-blank-pages="No" reset-page-count="No" style=""> <rml:watermark report="" section="" enabled="No"> <rml:parameters> </rml:parameters> </rml:watermark> <rml:section-header table-of-contents="No" can-grow="Yes" can-shrink="Yes" height="160" fill="No" style="Default"><rml:control-source xml:space="preserve" type="Literal" running-value="No"></rml:control-source> <rml:ruler> </rml:ruler> </rml:section-header> <rml:section-footer table-of-contents="No" force-new-page="Before" can-grow="Yes" can-shrink="Yes" height="45760" vertical-align="Center" style=""><rml:callback xml:space="preserve" show-as-image="No" image-resolution="72" type="HTML" fill="Yes" left="0" top="0" width="9000" height="45700" border-style="None" border-width="100" border-radius="0" background-color="rgb(255,255,204)" padding-left="200" padding-right="200" padding-top="200" padding-bottom="200" lock-handles="No" style="detail"><rml:control-source xml:space="preserve" type="Literal" running-value="No"><div> <p><span style="font-size: large"><span style="font-family: Arial">Arial large </span></span><br /> <span style="font-size: large"><span style="font-family: Comic Sans MS">Comic Sans MS large </span></span><br /> <span style="font-size: large"><span style="font-family: Courier New">Courier <span style="background-color: #ffff00">New</span> large </span></span><br /> <span style="font-size: large"><span style="font-family: Tahoma">Tahoma large </span></span><br /> <span style="font-size: large"><span style="font-family: Times New Roman">Times New Roman large </span></span><br /> <span style="font-size: large"><span style="font-family: Verdana">Verdana large</span></span><br /> </p> <p> <table border="1" cellspacing="1" cellpadding="1" width="200"> <tr> <td>Column1</td> <td>Column2</td> </tr> <tr> <td>Chicken</td> <td>Salad</td> </tr> <tr> <td>Egg</td> <td>Cheese</td> </tr> <tr> <td>Egg2</td> <td> <table> <tr> <td>abcd</td> <td>efgh</td> </tr> <tr> <td>abcd2</td> <td>efgh2</td> </tr> </table> </td> </tr> </table> <table border="1"> <tr> <td>abcd3</td> <td>efgh3</td> </tr> <tr> <td>abcd3</td> <td>efgh3</td> </tr> </table> </p> <p></p> <p><span style="color: #0000ff"><u><span style="font-size: medium">Colours <br /> </span></u></span></p> <ol> <li><span style="color: #0000ff">Blue colour </span></li> </ol> <p><span style="color: #ff0000"><u><span style="font-size: medium">Colours </span></u></span><br /> </p> <ol start="2"> <li><span style="color: #ff0000">Red colour</span></li> </ol> <p><span style="color: #339966"><u><span style="font-size: medium">Colours <br /> </span></u></span></p> <ol start="3"> <li><span style="color: #339966">Green colour </span></li> </ol> <p><span style="color: #ffff00"><u><span style="font-size: medium">Colours </span></u></span><br /> </p> <ol start="4"> <li><span style="color: #ffff00">Yellow colour </span></li> </ol> <p></p> <ul> <li><strong>Bold </strong></li> <li><em>Italic </em></li> <li><u>Underline </u></li> <li><strike>Strikethrough </strike></li> <li><sup>Superscript </sup></li> <li><sub>Subscript </sub></li> </ul> <p style="text-align: left"><span style="font-family: Comic Sans MS"><span style="font-size: large">Left Justify</span></span></p> <p style="text-align: center"><span style="font-family: Comic Sans MS"><span style="font-size: large">Center Justify</span></span></p> <p style="text-align: right"><span style="font-family: Comic Sans MS"><span style="font-size: large">Right Justify</span></span></p> <p style="text-align: justify"><span style="font-family: Comic Sans MS"><span style="font-size: large">Block Justify</span></span><br /> </p> <p style="text-align: justify"><span style="font-size: small"><span style="font-family: Tahoma">Indentation of Text</span></span></p> <p style="text-align: justify; margin-left: 40px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 1</span></span></p> <p style="text-align: justify; margin-left: 80px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 2</span></span></p> <p style="text-align: justify; margin-left: 120px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 3</span></span></p> <ul> <li><strong>Bold </strong></li> <li><em>Italic </em></li> <li><u>Underline </u></li> <li><strike>Strikethrough </strike></li> <li><sup>Superscript </sup></li> <li><sub>Subscript </sub></li> </ul> <p style="text-align: left"><span style="font-family: Comic Sans MS"><span style="font-size: large">Left Justify</span></span></p> <p style="text-align: center"><span style="font-family: Comic Sans MS"><span style="font-size: large">Center Justify</span></span></p> <p style="text-align: right"><span style="font-family: Comic Sans MS"><span style="font-size: large">Right Justify</span></span></p> <p style="text-align: justify"><span style="font-family: Comic Sans MS"><span style="font-size: large">Block Justify</span></span><br /> </p> <p style="text-align: justify"><span style="font-size: small"><span style="font-family: Tahoma">Indentation of Text</span></span></p> <p style="text-align: justify; margin-left: 40px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 1</span></span></p> <p style="text-align: justify; margin-left: 80px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 2</span></span></p> <p style="text-align: justify; margin-left: 120px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 3</span></span></p> <ul> <li><strong>Bold </strong></li> <li><em>Italic </em></li> <li><u>Underline </u></li> <li><strike>Strikethrough </strike></li> <li><sup>Superscript </sup></li> <li><sub>Subscript </sub></li> </ul> <p style="text-align: left"><span style="font-family: Comic Sans MS"><span style="font-size: large">Left Justify</span></span></p> <p style="text-align: center"><span style="font-family: Comic Sans MS"><span style="font-size: large">Center Justify</span></span></p> <p style="text-align: right"><span style="font-family: Comic Sans MS"><span style="font-size: large">Right Justify</span></span></p> <p style="text-align: justify"><span style="font-family: Comic Sans MS"><span style="font-size: large">Block Justify</span></span><br /> </p> <p style="text-align: justify"><span style="font-size: small"><span style="font-family: Tahoma">Indentation of Text</span></span></p> <p style="text-align: justify; margin-left: 40px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 1</span></span></p> <p style="text-align: justify; margin-left: 80px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 2</span></span></p> <p style="text-align: justify; margin-left: 120px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 3</span></span></p> <ul> <li><strong>Bold </strong></li> <li><em>Italic </em></li> <li><u>Underline </u></li> <li><strike>Strikethrough </strike></li> <li><sup>Superscript </sup></li> <li><sub>Subscript </sub></li> </ul> <p style="text-align: left"><span style="font-family: Comic Sans MS"><span style="font-size: large">Left Justify</span></span></p> <p style="text-align: center"><span style="font-family: Comic Sans MS"><span style="font-size: large">Center Justify</span></span></p> <p style="text-align: right"><span style="font-family: Comic Sans MS"><span style="font-size: large">Right Justify</span></span></p> <p style="text-align: justify"><span style="font-family: Comic Sans MS"><span style="font-size: large">Block Justify</span></span><br /> </p> <p style="text-align: justify"><span style="font-size: small"><span style="font-family: Tahoma">Indentation of Text</span></span></p> <p style="text-align: justify; margin-left: 40px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 1</span></span></p> <p style="text-align: justify; margin-left: 80px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 2</span></span></p> <p style="text-align: justify; margin-left: 120px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 3</span></span></p> <ul> <li><strong>Bold </strong></li> <li><em>Italic </em></li> <li><u>Underline </u></li> <li><strike>Strikethrough </strike></li> <li><sup>Superscript </sup></li> <li><sub>Subscript </sub></li> </ul> <p style="text-align: left"><span style="font-family: Comic Sans MS"><span style="font-size: large">Left Justify</span></span></p> <p style="text-align: center"><span style="font-family: Comic Sans MS"><span style="font-size: large">Center Justify</span></span></p> <p style="text-align: right"><span style="font-family: Comic Sans MS"><span style="font-size: large">Right Justify</span></span></p> <p style="text-align: justify"><span style="font-family: Comic Sans MS"><span style="font-size: large">Block Justify</span></span><br /> </p> <p style="text-align: justify"><span style="font-size: small"><span style="font-family: Tahoma">Indentation of Text</span></span></p> <p style="text-align: justify; margin-left: 40px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 1</span></span></p> <p style="text-align: justify; margin-left: 80px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 2</span></span></p> <p style="text-align: justify; margin-left: 120px"><span style="font-size: small"><span style="font-family: Tahoma">Indent Level 3</span></span></p> </div></rml:control-source></rml:callback> <rml:ruler> </rml:ruler> </rml:section-footer> <rml:page-header height="0" style=""> <rml:ruler> </rml:ruler> </rml:page-header> <rml:page-footer height="820" style=""> <rml:ruler> </rml:ruler> </rml:page-footer> <rml:detail table-of-contents="No" can-grow="Yes" can-shrink="Yes" height="480" fill="No" style="Default"><rml:control-source xml:space="preserve" type="Literal" running-value="No"></rml:control-source> <rml:ruler> </rml:ruler> </rml:detail> <rml:ruler> <rml:mark value="10200"> </rml:mark> <rml:mark value="9620"> </rml:mark> <rml:mark value="9380"> </rml:mark> <rml:mark value="9400"> </rml:mark> <rml:mark value="9520"> </rml:mark> <rml:mark value="9900"> </rml:mark> </rml:ruler> </rml:section> </rml:sections> <rml:sequence> <rml:section-invocation section="Section 1" enabled="Yes"> <rml:parameters> </rml:parameters> </rml:section-invocation> </rml:sequence> <rml:rendering> <rml:render-details mime-type="application/x-glint"> <rml:parameters><rml:param xml:space="preserve" key="Tree">No</rml:param> </rml:parameters> </rml:render-details> <rml:render-details mime-type="application/vnd.ms-excel"> <rml:parameters><rml:param xml:space="preserve" key="Snap">No</rml:param><rml:param xml:space="preserve" key="Paged">No</rml:param> </rml:parameters> </rml:render-details> <rml:render-details mime-type="application/x-html-zip"> <rml:parameters><rml:param xml:space="preserve" key="Streamed">No</rml:param><rml:param xml:space="preserve" key="TreeNormalColor"></rml:param><rml:param xml:space="preserve" key="Tree">No</rml:param><rml:param xml:space="preserve" key="Paged">Yes</rml:param><rml:param xml:space="preserve" key="SVGPassThrough">No</rml:param><rml:param xml:space="preserve" key="Sectioned">No</rml:param><rml:param xml:space="preserve" key="TreeHighlightColor"></rml:param><rml:param xml:space="preserve" key="SkipHeaders">No</rml:param> </rml:parameters> </rml:render-details> <rml:render-details mime-type="application/pdf"> <rml:parameters><rml:param xml:space="preserve" key="RenderAsImage">No</rml:param><rml:param xml:space="preserve" key="OwnerPassword"></rml:param><rml:param xml:space="preserve" key="CJKMappingURL"></rml:param><rml:param xml:space="preserve" key="AllowFillIn">No</rml:param><rml:param xml:space="preserve" key="AllowAssembly">No</rml:param><rml:param xml:space="preserve" key="Encryption">No</rml:param><rml:param xml:space="preserve" key="RenderAsImageDPI"></rml:param><rml:param xml:space="preserve" key="AllowModifyContents">No</rml:param><rml:param xml:space="preserve" key="EncryptionStrength">128 bits</rml:param><rml:param xml:space="preserve" key="AllowScreenReaders">No</rml:param><rml:param xml:space="preserve" key="AllowModifyAnnotations">No</rml:param><rml:param xml:space="preserve" key="BlankPageOnEmptyFile">No</rml:param><rml:param xml:space="preserve" key="AllowCopy">No</rml:param><rml:param xml:space="preserve" key="AllowDegradedPrinting">No</rml:param><rml:param xml:space="preserve" key="AllowPrinting">No</rml:param><rml:param xml:space="preserve" key="UserPassword"></rml:param><rml:param xml:space="preserve" key="Greyscale">No</rml:param><rml:param xml:space="preserve" key="RenderTextAPI">Yes</rml:param> </rml:parameters> </rml:render-details> </rml:rendering></rml:report>
发表评论
-
Jasper sub report的记录数问题
2012-04-03 14:40 1022Jasper master report <ba ... -
几种报表引擎对HTML支持比较
2011-12-01 15:16 1113目前一些比较流行的报表引擎比较: Jasper Repor ... -
PD4ML
2011-12-01 14:56 6878PD4ML is an excellent tool whic ... -
Jasper Report Engine
2011-12-01 14:47 998Jasper Report Engine is an open ... -
I-Net Clear Report Engine
2011-12-01 14:39 1520I-Net Clear Report Engine is an ...
相关推荐
Elixir Report Server 具有一系列小而强大的Report Server Access API,允许报表请求通过编程来完成。您也可以建立报表web接口与Servlet Engine 集成,也可以与JavaMail集成,以通过电子邮件传递报表。您可以编写...
Elixir Game Engine是一款开源的游戏开发框架,专为Win32平台设计,旨在为游戏开发者提供一系列实用的库和工具,以简化游戏编程的过程。这款引擎的特性覆盖了游戏开发的多个核心领域,从基础功能到复杂的系统,为...
### Elixir 1.3 编程:关键知识点解析 #### 一、Elixir 语言简介 Elixir 是一种函数式编程语言,运行在 Erlang 虚拟机 (VM) 上。它融合了 Erlang 的并发性优势,并提供了一个更为现代且易于学习的语法。Elixir 的...
要使用Elixir引擎,请在boxfile.yml中将elixir指定为engine 。 run.config : engine : elixir 建立过程 在准备运行时时,此引擎通过执行以下操作来编译代码: > mix local.hex --force > mix local.rebar --force...
**Elixir安装指南** Elixir是一种现代、功能丰富的编程语言,设计用于构建可扩展和高并发的系统。它运行在Erlang虚拟机(BEAM)之上,这使得Elixir能够充分利用Erlang的分布式、容错和实时系统特性。在深入学习...
Introduction OTP 分布式 元编程 Umbrella Projects Specifications and types ⾏为GenStage 协议Nerves 第三部分:ECTO Basics Changesets 关联关系 查询 第四部分:专题 Plug 嵌⼊的 Elixir(EEx) Erlang 项式存储...
**Elixir编程语言详解** Elixir是一种基于BEAM(Erlang虚拟机)的函数式、并发、面向消息的编程语言。它设计简洁,适合构建分布式、容错性高的系统。在"Programming Elixir 1.6"这本书中,作者深入浅出地介绍了...
You’re also investigating designs that help you maximize uptime and manage security., This book is your guide to Elixir, a modern, functional, and concurrent programming language. Because Elixir ...
elixir-style-guide, Elixir语言风格指南,由信条实现 信条 Style 序曲存在这里文档存在的两个原因:这是我的个人风格指南,包括我今天编写的Elixir,但更重要的是,我在野生和适应,因为他们使Elixir更可以读,在...
### Elixir编程入门知识点概述 #### 一、Elixir简介 - **定义与特性**:Elixir是一种构建在Erlang虚拟机上的函数式编程语言,具有强大的元编程能力。它由Ruby领域的著名人物José Valim创建。 - **语言特点**:...
Metaprogramming is one of Elixir's greatest features. Maybe you've played with the basics or written a few macros. Now you want to take it to the next level. This book is a guided series of ...
包含Elixir in Action,Elixir中文入门文档,Erlang and Elixir for Imperative Programmers,Erlang OTP并发编程实战-中文版,Erlang程序设计(第2版),Erlang编程指南,Functional.Web.Development.with.Elixir....
ElixirScript 工具的目的是为了将你已有的 Elixir 代码转成 JavaScript 代码。使用方法:usage: ex2js <input> [options] <input> path to elixir files or the elixir code string if...
### Elixir中文入门文档知识点概览 #### 一、Elixir简介与安装 - **Elixir定义**:Elixir是一种函数式编程语言,基于Erlang虚拟机(BEAM),结合了Ruby的灵活性和Erlang的强大并发能力。它旨在为开发人员提供一种...
**Elixir元编程详解** Elixir是一种功能强大的函数式编程语言,它建立在 Erlang VM (BEAM) 上,提供高效、并发以及容错的能力。元编程是Elixir的一个核心特性,允许程序员在运行时动态地创建和修改代码。本文将深入...
**Elixir语言基础** Elixir是一门功能强大的函数式编程语言,它运行在Erlang虚拟机(BEAM)上,赋予其卓越的并发性和稳定性。Elixir的设计目标是易于学习,可读性强,同时也提供了丰富的元编程能力,使得开发大规模...