Elixir Report Engine

Elixir can generate report by rml template.

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>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
摘要 大量信息可能是不能避免的。当您开始运作一个电子商务公司或是财富 500强的企业,要求以报表形式传递更多信息好像永无止境。实际上,如今更多复杂客户要求报表以各种硬拷贝和软拷贝形式传递,并且需要从各种数据源中获取数据,如XML,文本文件,LDAP,关系数据库以及应用数据库。Elixir Report 迎合了您的优秀,尤其可帮助您显著减少开发专业质量报表的时间和工作量。而且,由于产品支持国际化,所以您的产品可以在全球通用。 组件列表 技术特性 ·Report Server Access API Elixir Report Server 具有一系列小而强大的Report Server Access API,允许报表请求通过编程来完成。您也可以建立报表web接口与Servlet Engine 集成,也可以与JavaMail集成,以通过电子邮件传递报表。您可以编写基于Java 2的客户端应用程序,通过API来生成报表。 ·报表请求控制器 报表请求控制器管理外部客户端的请求,如Java应用程序或servlets,将报表请求分配到多个引擎。如果请求数比并发显示引擎多,这些请求将依次排队。Report Server的所有活动都将通过控制器形成日志文件。 ·工作空间 工作空间允许不同的报表在逻辑集合中分组。例如,有一个工作空间用于行政部门的报表,另一个工作空间用于人力资源部门的报表,不同的工作空间属于不同的部门。实际上,每个部门可以设置多个工作空间。 ·服务器端并发显示引擎 服务器端并发显示引擎用来获得高性能的报表显示。显示过程作为背后服务器来运行,生成的报表可以输出到客户端或在服务器中缓存。高扩展性的引擎支持并发处理,通过调用多个显示引擎并发的生成报表。 ·数据源管理器 数据源管理器为Elixir Report 提供了接口,以从外部数据源,如RDBMS(如Oracle,IBM DB2,Sybase, Microsoft SQL Server等),XML,LDAP,Java Objects和文本文件,来提取数据。也可以在Elixir Report中定制其它数据源。 ·部署环境 Elixir Report Server引擎可以通过Servlets 部署到应用程序服务器中,如WebLogic, Tomcat, iPlanet, WebSphere等。 应用场景 适用于东方习惯的报表系统,服务器端报表引擎提供强大的计算运行支持。 运用优势 开发环境 Jbuilder/WebSphere Studio Application Developer/Visual Age for Java/Sun ONE Studio (formerly Forte for Java) 支持平台 ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Windows 95 Windows 98 Windows NT 4.0 Windows 2000 Windows ME Windows XP Linux ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 标准报价 1)专业版 7,620 元人民币 2)企业版 19,200 元人民币 * 以上报价仅供参考,具体以厂商正式报价为准。 电话 021-58549800 Email: tools@sh.grapecity.com http://www.grapecity.com/china
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值