将 Webi 导出到 Excel 会抛出 java.lang.NoClassFoundException :com.crystaldecisions.celib.trace.h

发布于 2024-12-12 12:11:10 字数 464 浏览 0 评论 0原文

我必须以excel格式导出Webi报告并将其显示给用户。当前环境是BOXI R3。

ReportQuery:

Select * from CI_INFOOBJECTS where SI_NAME ='xxxx' and si_kind ='Webi' and SI_PARENTID=xxxx

IInfoObjects webiDocs = infostore.query(reportQuery.toString);
IWebi webiDoc =IWebi  webiDocs.get(o);

它在 infostore.query 上引发异常:

java.lang.NoClassFoundException:com.crystaldecisions.celib.trace.h

注意:BOXI R3 celib.jar 中不存在 h.class

I have to export the Webi report in the excel format and show it to the user .Environment present is BOXI R3 .

ReportQuery:

Select * from CI_INFOOBJECTS where SI_NAME ='xxxx' and si_kind ='Webi' and SI_PARENTID=xxxx

IInfoObjects webiDocs = infostore.query(reportQuery.toString);
IWebi webiDoc =IWebi  webiDocs.get(o);

It throws exception on infostore.query:

java.lang.NoClassFoundException :com.crystaldecisions.celib.trace.h

Note: h.class is not present in BOXI R3 celib.jar

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

早茶月光 2024-12-19 12:11:10

要打开 WebI 文档以获取数据,您需要遵循与当前方向不同的路线。尝试类似以下内容:

// get your list of IInfoObjects
IInfoObjects webiDocs = infostore.query(reportQuery.toString);

// get a report engine to open the document
ReportEngines engines = (ReportEngines)enterpriseSession.getService("ReportEngines");
ReportEngine reportEngine = engines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);

//Get the actual Doc instance
DocumentInstance docInstance = reportEngine.openDocument(webiDocs.get(0).getID());

// get the Raw data stream
BinaryView bv = (BinaryView)documentInstance.getView(OutputFormatType.CSV);
OutputStream outputStream; // defined else where to meet your needs
bv.getContent(outputStream);

我确实注意到从 IInfoObject 到您认为具体是什么的转换通常不起作用。特定的子类似乎更多地在库内部使用,而不是实际的外部可用类。

To open a WebI document to get the data you will need to follow a different route from the one you are headed down. Try something similar to the following:

// get your list of IInfoObjects
IInfoObjects webiDocs = infostore.query(reportQuery.toString);

// get a report engine to open the document
ReportEngines engines = (ReportEngines)enterpriseSession.getService("ReportEngines");
ReportEngine reportEngine = engines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);

//Get the actual Doc instance
DocumentInstance docInstance = reportEngine.openDocument(webiDocs.get(0).getID());

// get the Raw data stream
BinaryView bv = (BinaryView)documentInstance.getView(OutputFormatType.CSV);
OutputStream outputStream; // defined else where to meet your needs
bv.getContent(outputStream);

I did notice that casts from a IInfoObject to what you think it specifically is, does not usually work. The specific children classes seem to be used internally to the libraries more than as actual externally usable classes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文