Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export to Excel format not supported

Status
Not open for further replies.

ililal

Programmer
Dec 4, 2006
15
US

The Export to Excel option returns this error:"Export format is not supported or not recognized"

However, Microsoft Word and PDF work fine. Furthermore, I gathered the below source code from the
Business objects "Tutorials Section", and it doesn't work.

Also, when I click on the business objects export image, excel is missing.
I think.... perhaps a jar or dll is missing. I'm not sure.
Thanks



String reportName = (String)session.getAttribute("ReportName");
ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);

if (clientDoc == null)
{
clientDoc = new ReportClientDocument();

clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
session.setAttribute(reportName, clientDoc);
}

ReportExportControl exportControl = new ReportExportControl();
exportControl.setReportSource(session.getAttribute("reportSource"));

//Some formats allow you to set certain options.
ExportOptions exportOptions = new ExportOptions();

exportControl.setExportOptions(exportOptions);
exportControl.setExportAsAttachment(true);
exportControl.setOwnForm(true);
exportControl.setOwnPage(true);

exportOptions.setExportFormatType(ReportExportFormat.MSExcel);
exportControl.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
exportControl.dispose();
 
Yep, probably something amiss with the install.

Can't see how you expect anyone to assist you since you don't even bother to post the software or the version being used.

Posting code without the specific error doesn't help either, unless you're saying that the error mentioned is returned during the execution of the code.

Try going into the Remove or Add Programs for the Crystal install and make sure that the Excel Export is selected, it's probably best to make sure that all of them are for future use, if that fails, go to the Bo support site and do a search for whatever software and version you're working with.

-k
 
My mistake,
I'm using crystal reports XI. This is in a Crystalreportviewer.jsp on a sun app server.

This is the line with the problem:
exportOptions.setExportFormatType(ReportExportFormat.MSExcel);
because if i change it to
exportOptions.setExportFormatType(ReportExportFormat.MSWord);
I have a word document.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top