Skip to Content
0
Former Member
Feb 17, 2011 at 05:20 PM

Error calling IReport.refreshProperties() for publishing reports to BOE12

133 Views

I am trying to code report publish using Java. I am able to publish them successful, but not able to set data source to the new published reports. I have tried several ways posted in the forum, but there is no luck. Can someone help please?

Here is my part of code to call this method:

oInfoObjectNewReport.setTitle(reportName);

oInfoObjectNewReport.setTitle(reportName);

oInfoObjectNewReport.properties().setProperty(CePropertyID.SI_PARENTID, props.getPublishFolderId());

try{

System.out.println("Refresh properties ...");

/*IReport report = (IReport)oInfoObjects.get(0);

report.getReportRefreshOptions().addOption(IReportRefreshOptions.CeRefreshOption.TITLE);

report.refreshProperties();

report.getReportRefreshOptions().removeOption(IReportRefreshOptions.CeRefreshOption.TITLE);*/

IReport report = (IReport)oInfoObjects.get(0);

IFiles reportFiles = report.getFiles();

IFile rptFile = (IFile) reportFiles.get(0);

rptFile..overwrite(reportLocation);

rptFile.commit();

report.refreshProperties();

}catch(Exception ex){

System.out.println(ex);

}

oInfoStore.commit(oInfoObjects);

Thanks in advance,

Zhang