birt

BIRT: pdf emitter, load/use fonts from relative path or from jar files

柔情痞子 提交于 2019-12-01 18:40:44
I use BIRT since early days and still have riddles regarding PDF emitter. Short story : Can I configure fontsConfig.xml to load fonts from relative path or from jars? Long story: We are using both FOP and BIRT for generating PDF in our web application. It would be nice to share fonts between libraries. Unfortunately, I can't find a way to do it with BIRT 2.3.1 The root of evil is fontsConfig.xml If I configure it like shown below it works fine: <font-paths> <path path="fonts"/> </font-paths> But path doesn't allow me using neither relative paths not classpath (or I can't find an appropriate

项目经验总结-Eclipse图表工具Birt的使用技巧(三)

十年热恋 提交于 2019-12-01 18:24:51
因为篇幅所限,本篇承接上一篇 Eclipse图表工具Birt的使用技巧(二) 继续介绍Birt的小技巧. 4. 公共数据源 项目制作中,多个报表文件可能需要使用同一个DataSet,Cube,DataSource这些东西,如果为每一个rptdesign文件都配置很麻烦,而且修改繁琐. 可以使用一个Library文件,统一集中处理这些数据源.现在项目中新建一个Library文件,如图: 创建好的rptlibrary文件盒报表文件很像,我们直接在这个文件上新建数据源和数据集还有多维数据集.这里不显示了,和正常的创建一样. 创建完毕后,我们返回到一个正常的报表rptdesign文件,在Library Explorer窗口中找到刚才创建的那个library文件.此时可以快速的将Datasource,DataSet,Cube添加到我们的报表文件中.如图: 右键你要添加到当前报表的项,然后Add to Report 即可.如果以后Liberty文件的这些数据源信息有改变,对应的各个文件中的数据源也会有变化. 添加成功后,再看报表中的数据源显示如下: 和正常报表自己创建的数据源会有区别. 5. 针对排序出现错误的问题. 这种问题通常可能会出现在类似这种情景里,比如药品,现在做一个图表,显示按季度为维度,每个季度添加的药品数量,或者按照月份为维度,显示对应药品添加数量.

项目经验总结-Eclipse图表工具Birt的使用技巧(一)

瘦欲@ 提交于 2019-12-01 18:23:27
Birt是一套集成在Eclipse中的开源的报表设计工具,它自带有完整的一套工具,可以方便快速的设计出一般性的常用报表.我在2013年下半年开始使用时,官 方最新的Birt版本是4.3,可以在官网上下载集成好Birt的eclipse应用.在Myeclipse8.6集成的是Birt2.6的版本.eclipse中项目的配置相对麻烦些,推荐可以使用MyEclipse2013 Pro,这个版本集成了Birt4.2的版本.旧版本的环境下会有一个B UG,比如多维数据集Count不准确的. 首先我明确一点,我们的项目当时选用Birt很大程度上是因为它开源免费并且有一整套完整的工具,不过Birt本身资料比较缺少,并且其成图的效果也相对其他HTML5或者canvas图表要老旧.不过在熟练掌握后发现开发效率还是很快的. 下面把项目中遇到的并解决了的一些问题和技巧拿出来晒晒. 首先介绍一下基本的使用: 1.新建项目 新建一个Report Web Project项目,在WebRoot下reports目录下新建一个report文件,此时可以选择模板,Myeclipse内置了一些带有报表格式样式的模板,我们也可以从以前自定义的模板中进行创建,如图: 其中shijn这个选项就是我之前创建的一个模板文件,这里声明一下,模板只会把报表的类型,样式保存过来.你在之前模板使用的数据源

MongoDB and BIRT Reporting?

时光怂恿深爱的人放手 提交于 2019-12-01 06:12:43
Has anyone used BIRT to generate reports from MongoDB, can you describe how, any issues, etc. ? It looks like it might be possible to interface using JDBC and this experimental driver: https://github.com/erh/mongo-jdbc However, I am not exactly sure how to install this driver in eclipse to test it. I've successfully integrated BIRT with MongoDB - it works perfectly well. The idea is this - define a scripted data source in BIRT, then define a data set that using that data source. The data set has an "open" event in which you place the call to Mongo Java Driver and execute your query against

How to configure BIRT Report Engine to load fonts directly from the classpath?

一曲冷凌霜 提交于 2019-12-01 06:07:00
I am writing a Java application that uses BIRT to produce reports. I want to package custom fonts in a jar file and be able embed them in PDF reports. I could extract fonts to the file system first and then point BIRT to the file system locations, but I wonder whether it is possible to configure BIRT to load fonts directly from the classpath? I consulted the source code of BIRT and found that it is impossible to configure BIRT to register embeddable fonts from the classpath. BIRT registers fonts by the paths specified in fontsConfig.xml. It uses iText's FontFactory . Surprisingly, FontFactory

Arial font required in PDF (BIRT pdf renderer, Linux)

余生长醉 提交于 2019-12-01 05:41:26
I've created a rptdesign file using BIRT IDE. This file contents are in Arial font, when I export the report to PDF in windows it works fine. I uses the default viewerServlet to create reports. But when I moved the report to a linux system, all contents in the report was displayed in Times New Roman font instead of Arial in th PDF file. Then I copied the Arial.ttf file to /var/font/truetype and added the following line to platform/plugins/org.eclipse.birt.report.engine.fonts_2.3.2.r232_20090202/fontsConfig.xml <font-paths> --------------- --------------- --------------- <path path="/var/font

What is the simplest way to set up a BIRT report viewer for a xulrunner application?

。_饼干妹妹 提交于 2019-12-01 04:04:13
I recently began using BIRT and have developed a report to use with my xulrunner application. What I haven't yet figured out is how I should deploy the viewer. It seems like BIRT mostly targets Java applications, so there are instructions for deploying on J2EE, JBoss, and other technologies -- with which I am not familiar (but I'm not developing in Java anyway). Reviewing this article on deploying BIRT and reviewing the deployment details on BIRT's web site, I'm not sure where to go. I wasn't expecting to have to add some large Java dependency for the xulrunner application --is there no way I

How to configure BIRT Report Engine to load fonts directly from the classpath?

守給你的承諾、 提交于 2019-12-01 03:22:20
问题 I am writing a Java application that uses BIRT to produce reports. I want to package custom fonts in a jar file and be able embed them in PDF reports. I could extract fonts to the file system first and then point BIRT to the file system locations, but I wonder whether it is possible to configure BIRT to load fonts directly from the classpath? 回答1: I consulted the source code of BIRT and found that it is impossible to configure BIRT to register embeddable fonts from the classpath. BIRT

BIRT统一公用数据源、动态切换数据源解决方案

流过昼夜 提交于 2019-11-30 17:50:56
通过BIRT报表工具开发出来的报表,在运行时往往是走一个统一的生产环境数据源,但是开发时往往是一个开发测试用的数据源,这就 需要随时能够在两个环境下进行切换。目前针对这个问题,公开可检索到的资料,基本上是通过数据源的beforeopen事件,通过写脚本的方式解决,这个 方式还是比较复杂,在报表数量较多,开发人数较多时,开发人员需要注意的地方还是有些多,并不完美。本文的处理方式,将能够根本性的解决该问题。 不能在报表制作上做文章了,这样要么需要大量修改报表文件,要么需要每个报表继承一个公共的库文件,只能在BIRT的开放API上想办法了。通过研究BIRT的源代码,找到了如下解决方案,基本上完美的解决了这个问题。 IReportEngine birtEngine = ...; IReportRunnable runnable = birtEngine.openReportDesign(...); IRunAndRenderTask runAndRenderTask = birtEngine.createRunAndRenderTask(runnable); Map appContext = runAndRenderTask.getAppContext(); Connection conn = ...; appContext.put(IConnectionFactory.PASS_IN

在团队中用 BIRT 进行报表开发

﹥>﹥吖頭↗ 提交于 2019-11-30 17:50:43
原贴地址: http://www.ibm.com/developerworks/cn/opensource/os-cn-eclipse-birtinteam/index.html 在团队中用 BIRT 进行报表开发 本文主要介绍如何在 BIRT 中创建,使用库( Library )和模板,及如何在报表中使用用户自定义的 JS 文件。 前言 BIRT 是一个基于 Eclipse 的开源报表插件,特别适用于给 J2EE 的 WEB 应用程序创建报表。随着 BIRT 的不断完善,采用 BIRT 进行报表设计的人也越来越多。而随着 BIRT 应用的深入,很多人都碰到了这样一些问题: 在一个团队中,不同的设计者设计报表的时候,如何能够保证报表风格的统一? 如何能够使得您的设计得到重用,从而提高工作效率? 如何能够集中定义一些常用的资源,从而避免一处资源的变动,所有报表都要修改的情况发生? 由于BIRT的官方文档还不是很完善,很多问题都还不能在官方文档找到详细的说明。本文将会试图通过实际的例子,帮助读者解决以上一些问题。 BIRT的主要组件分为两部分: BIRT 报表设计器和 BIRT 运行引擎。本文将主要介绍 BIRT报表设计器中的一些功能。作为 BIRT 的进阶教程,本文将不会涉及到如何用 BIRT 创建简单报表的内容,需要读者对 BIRT 有一些初步的认识,并且掌握 BIRT