on 02-08-2018 8:06 PM
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
Using upload documents using REST : https://blogs.sap.com/2016/02/09/uploading-agnostic-documents-with-bi-platform-restful-web-services/
REST API details : https://help.sap.com/viewer/db6a17c0d1214fd6971de66ea0122378/4.2.5/en-US/13b5eb029d0b409bb7cb311ff9b...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nick
You will need to use the Report plugin (com.crystaldecisions.sdk.pluigin.desktop.report ) and cast the infoobject as an iReport object. from there you can access the Report's IReportRefreshOptions and refresh the object, after committing it to the infostore.
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.