I'm trying to upload a crystal report to Business Objects 4.2. This is my deployer class
ReportDeployer.java
byte[] content= reportTemplate.getContent(); \\ report encoded to base64
CeSession ceSession = null;
CeLoginInfo login = new CeLoginInfo(userName, password, serverName, authType);
try {
ceSession = CeSessionPool.getInstance().acquire(login);
IInfoStore infoStore = ceSession.getInfoStore();
IInfoObjects infoObjects = infoStore.newInfoObjectCollection();
IInfoObject infoObject;
infoObject = infoObjects.add(contentType);
infoObject.setTitle(templateName);
infoObject.getFiles().addFile(content,"","",rpt.getName(),"");
infoObject.setParentID(folderID);
ICommitResult commitResult=infoStore.commit(infoObjects,false, CommitMode.STRICT);
ICommitErrors errors = commitResult.getErrors();
if(errors.size()>0){
status.setStatusMessage("Error occured while deploying the report :"+errors.get(0).toString());
status.setStatusType(Status.ERROR);
}else{
status.setStatusType(Status.SUCCESS);
status.setStatusMessage("Successfully deployed the report");
}
}
This uploads the report to the BO Server but, it doesn't have the prompts and database configurations. If I right click on the report and select refresh options, report now has the database configurations and prompt fields.
So, am I doing it right?. If yes, how do I refresh the options through SDK?. If this is not how it should be done, can anyone please suggest the best way to upload a report.
Thanks