gpt4 book ai didi

java - 如何使用Java BO SDK 读取联合和合并的Webi 报告?

转载 作者:行者123 更新时间:2023-11-30 11:32:48 25 4
gpt4 key购买 nike

我需要阅读包含表格和列的 Webi 报告元数据信息。我可以读取很少的 Webi 报告元数据信息,但是对于组合和联合 Webi 报告,我无法读取任何元数据数据信息,我得到的此类报告的查询为空。

谁能告诉我如何读取元数据?

代码:

String query="SELECT * FROM CI_INFOOBJECTS WHERE SI_KIND in('WEBI') AND SI_INSTANCE = 0 AND SI_ANCESTOR = 23";

sessionMgr = CrystalEnterprise.getSessionMgr();
enterpriseSession = sessionMgr.logon(username,password,ip,"secEnterprise");
reportEngines = (ReportEngines) enterpriseSession.getService("ReportEngines");
ReportEngine wiRepEngine(ReportEngine)reportEngines.getService(
ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
IInfoStore infoStore = (IInfoStore) enterpriseSession.getService("InfoStore");


IInfoObjects infoObjects = (IInfoObjects) infoStore.query(query);
System.out.println(infoObjects.size());

for (int i =0; i<infoObjects.size(); i++)
{
IInfoObject report = (IInfoObject)infoObjects.get(i);
widoc = wiRepEngine.openDocument(report.getID());
providers = (DataProviders) widoc.getDataProviders();
for(int prov=0; prov<providers.getCount(); prov++)
{
DataProvider providername = providers.getItem(0);
DataSource datasource= providername.getDataSource();
String universename=datasource.getName();
Query providetgetQuery=providername.getQuery();
System.out.println("Query:-"+providername.getQuery());
for(int k=0; k<providetgetQuery.getResultObjectCount(); k++)
{
providerQueryChild=providetgetQuery.getResultObject(k);
System.out.println("Columns:-"+providerQueryChild);
TreeNode providerQueryparent=providerQueryChild.getParent();
System.out.println("Tables:-"+providerQueryparent);
}
}
}

最佳答案

在 BO 3.1 中:

相反:

Query providetgetQuery=providername.getQuery();

试试这个:

Query providetgetQuery;
if (providername.hasCombinedQueries()) {
providetgetQuery = (Query) providername.getCombinedQueries().getQueryNodeAt(0);
} else {
providetgetQuery = providername.getQuery();
}

在 BO 4.0 中:

目前这部分 Report SDK 不可用。看看有什么可用:http://help.sap.com/businessobject/product_guides/boexir4/en/xi4_rebean_omd.pdf

它应该在 BO 4.1 中可用: http://scn.sap.com/community/bi-platform/blog/2012/11/18/what-is-coming-in-businessobjects-bi41-customer-validation-asug-webcast

关于java - 如何使用Java BO SDK 读取联合和合并的Webi 报告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16397438/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com