简体   繁体   English

如何在数据库中存储一个比特报告

[英]how to store a birt report in database

I just created a birt report (.rptdesign).我刚刚创建了一个 birt 报告 (.rptdesign)。 I thought I would save this design in my database.我想我会把这个设计保存在我的数据库中。 The application would retriebe the design and could generate a report.应用程序将重新检索设计并生成报告。 Moreover I would be able to modify the design without redeploying my application.此外,我将能够在不重新部署我的应用程序的情况下修改设计。

However when it comes to localization I saw that the .properties files are not embedded but referenced in the design.但是,当涉及到本地化时,我发现.properties文件并未嵌入,而是在设计中引用。

I wonder if it is possible / a good idea to store the design in a database?我想知道将设计存储在数据库中是否可能/一个好主意? And how would I resolve the inclusion of the properties files?我将如何解决包含properties文件的问题? Maybe zipping all files into one?也许将所有文件压缩成一个?

You can load your report from the file system like this:您可以像这样从文件系统加载您的报告:

IReportRunnable design = null;
engine.getConfig().setResourcePath(reportDir + File.separator + "res");
design = engine.openReportDesign(designFilename);

If your database is Oracle, you could use a feature (don't know the name, however) where you can export a table in WebDAV format.如果您的数据库是 Oracle,您可以使用一个功能(但不知道名称),您可以在其中以 WebDAV 格式导出表。 Table can contain BLOBs for the rptdesign.表可以包含 rptdesign 的 BLOB。

In Windows, you can import WebDAV to the file system.在 Windows 中,您可以将 WebDAV 导入文件系统。

From a client program's (like BIRT) point-of-view, the records in the table look like good old files in a file-system directory.从客户端程序(如 BIRT)的角度来看,表中的记录看起来像是文件系统目录中的旧文件。

If that's not an option, I think you would have to patch BIRT.如果这不是一个选项,我认为您将不得不修补 BIRT。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM