Cognos SDK Guide by BI Centre can be purchased from PayPal.

You will have your own functional Cognos 8 SDK web solution that has been tailored to be scalable and flexible in order to adapt to your unique business requirements and solution architecture.


Sunday, March 2, 2008

Cognos 8 SDK -- example of capturing reporting history

private boolean reportJobStatus()

{

boolean blnError = false;

Vector reportHistories = getReportHistories();

String reportName = "";



PropEnum props[] = new PropEnum[]{PropEnum.searchPath, PropEnum.defaultName, PropEnum.detail, PropEnum.detailTime, PropEnum.severity};

Sort sort = new Sort();

sort.setOrder(OrderEnum.ascending);

sort.setPropName(PropEnum.defaultName);

Sort[] sortOrder = new Sort[]{sort};



try

{

if(reportHistories.size() > 0)

{

for(int i =0; i < reportsearchpath =" (String)reportHistories.get(i) + "//historyDetail";

reportName = getReportName(reportSearchPath);

BaseClass bc[] = cmService.query(new SearchPathMultipleObject(reportSearchPath ), props, sortOrder, new QueryOptions());

if(bc != null && bc.length > 0)

{

for(int j =0; j < historydetail =" (HistoryDetail)bc[j];" blnerror =" true;">" + reportName + "" +

" " + historyDetail.getDetailTime().getValue().getTime() + "" +

" " + historyDetail.getDetail().getValue() + "";

}

}


}

}

}

}

catch(Exception e)

{ System.out.println("RunJobNowAndCaptureError::reportJobStatus()");

e.printStackTrace();

}

return blnError;

}