Unable to to upload a RPE report using the API
![]() Hi Folks, when I try upload a RPE report to RTC using the API, I get the following error message:
'An error ocurred during "Save Report Resource". Report contents are invalid. Cause: invalid CEN header (bad signature)'
The following code fragment may help in understanding this behaviour:
public String replaceReports(IProjectArea prj, String strReportIdentifier, String strRptdesignFilePath, String strDescription) {
IReportManager reportManager = (IReportManager) repo.getClientLibrary(IReportManager.class);
try {
if (!reportManager.doesReportDescriptorExist(prj, strReportIdentifier, null))
return "not found";
//Replace the Report descriptor
IReportDescriptor reportDescriptor = reportManager.fetchReportDescriptor(prj.getItemId().getUuidValue(), strReportIdentifier, null);
InputStream inStream = new FileInputStream(strRptdesignFilePath);
String strContentType ;
IContent newContent = repo.contentManager().storeContent("application/octet-stream", convertStreamToString(inStream), null);
reportDescriptor = (IReportDescriptor) reportDescriptor.getWorkingCopy();
reportDescriptor.setDesignContent("dta", newContent);
reportDescriptor.setDescription(strDescription);
reportManager.saveReportDescriptor(reportDescriptor, null);
I have the following questions:
1. Is the content type correct i.e. "application/octet-stream" ? NB using "text/Plain" seems to work fine for BIRT reports but not for RPE reports.
2. Is this technically possible?
|
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.