我需要閱讀具有表格和列的web報告metedata信息。我可以讀取少量webi報告metedata信息,但對於組合和獨特的webi報告,我無法讀取任何metedata數據信息。對於這種報告,我收到了空值查詢。任何人都可以讓我知道如何從中讀取metedata數據。如何閱讀來自BO Java SDK的聯合報告和組合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? 4.0? – Samoth 2013-05-09 08:32:22
我正在使用BORX4 – Navyah 2013-05-09 09:57:48