Skip to Content
avatar image
Former Member

How to upload Crystal report to Business Objects 4.2 using the SDK?

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 22 at 12:31 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 12 at 04:36 AM
    Add comment
    10|10000 characters needed characters exceeded