0
webi 서버에 대한 보고서가 있습니다. 보고서가있는 폴더를 표시하는 코드 스 니펫이 필요합니다.비즈니스 개체 webi 보고서 폴더 가져 오기
webi 서버에 대한 보고서가 있습니다. 보고서가있는 폴더를 표시하는 코드 스 니펫이 필요합니다.비즈니스 개체 webi 보고서 폴더 가져 오기
가장 먼저 필요한 것은 찾고있는 WebI 보고서의 IInfoObject입니다. 그 후에 당신이 얻은 SI_PARENTID 값을 반복하는 IInfoStore에 대한 몇 가지 쿼리가 있습니다.
IInfoObject myReport; // the WebI report you are trying to find the folder it is in
IInfoStore infoStore; // your gateway to the CMS database
// I'm not sure what info is in your myReport IInfoObject, so make sure we have what is needed
String infoStoreQuery = "select SI_ID,SI_NAME,SI_PARENTID from CI_INFOOBJECTS where SI_ID="+myReport.getID();
IInfoObjects infoObjects = infoStore.query(infoStoreQuery);
// because I used the ID there should be only 1 object in the infoObjects
IInfoObject myReportWithParentFolder = (IInfoObject)infoObjects.get(0);
int parentFolderId = myReportWithParentFolder.getParentID(); // ID of the folder that contains the report
// BEGIN now loop through the folders going backwards to get full path to the report
// loop not shown
infoStoreQuery = "select SI_ID,SI_NAME,SI_PARENTID from CI_INFOOBJECTS where SI_ID="+parentFolderId ;
infoObjects = infoStore.query(infoStoreQuery);
IInfoObject folder = (IInfoObject)infoObjects.get(0);
String folderName = folder.getTitle();
int parentFolderId = folder.getParentID();
// END loop area