Help Regarding Exporting to Excel format Crystal Report XI SP5

I am trying to export a report in MSExcel format but when i do so it gives me an error that the following export format is not supported or recognized ......
I am able to export into PDF, RTF and CSV (Server Side Only) formats .
Here is the code i am using provided on the business objects help site :
<%
     // Working for all but exporting to Excel and Text
     IReportSource reportSource = (IReportSource)session.getAttribute("reportSource");
     session.setAttribute("reportSource", null );
     ReportExportControl exportControl = new ReportExportControl();
     //Object reportSource = session.getAttribute("reportSource");
     System.out.println(exportControl.getName());
    exportControl.setReportSource(reportSource);
    ExportOptions exportOptions = new ExportOptions();
     exportControl.setExportAsAttachment(true);
     exportControl.setName("Excel");
     //exportControl.setOwnForm(true);
     //exportControl.setOwnPage(true);
     String selectedFormat = "2";
     if(selectedFormat.equals("0")/Crystal Report/){
          exportOptions.setExportFormatType(ReportExportFormat.crystalReports);
     else if(selectedFormat.equals("1")/Word/){
               exportOptions.setExportFormatType(ReportExportFormat.MSWord);
     else if(selectedFormat.equals("2")/Excel/){
               exportOptions.setExportFormatType(ReportExportFormat.MSExcel);
     else if(selectedFormat.equals("3")/Rich Text Format/){
               exportOptions.setExportFormatType(ReportExportFormat.RTF);
     else if(selectedFormat.equals("5")/PDF/){
               exportOptions.setExportFormatType(ReportExportFormat.PDF);
     else if(selectedFormat.equals("6")/Excel without formatting/){
               exportOptions.setExportFormatType(ReportExportFormat.recordToMSExcel);
     else if(selectedFormat.equals("7")/Text/){
               exportOptions.setExportFormatType(ReportExportFormat.text);
     else if(selectedFormat.equals("8")/editable RTF/){
               exportOptions.setExportFormatType(ReportExportFormat.editableRTF);
     else if(selectedFormat.equals("9")/Server Side CSV/){
               ReportClientDocument reportClientDoc = (ReportClientDocument)session.getAttribute("rptDoc");
               PrintOutputController printOutputController = reportClientDoc.getPrintOutputController();
               ByteArrayInputStream byteIS = (ByteArrayInputStream) printOutputController.export(ReportExportFormat.characterSeparatedValues);
             byte[] buf = new byte[2000 * 1024];
             int nRead = 0;
             response.reset();
             response.setHeader("content-disposition", "inline;filename=example.csv");
             response.setContentType("application/csv");
             while ((nRead = byteIS.read(buf)) != -1) {
                 response.getOutputStream().write(buf, 0, nRead);
             response.getOutputStream().flush();
             response.getOutputStream().close();
    if (!selectedFormat.equals("9")/Don't use the export control for CSV/){
               exportControl.setExportOptions(exportOptions);
               Fields parameterFields = (Fields)session.getAttribute("parameterFields");
               exportControl.setParameterFields(parameterFields);
               ConnectionInfos oConnectionInfos = (ConnectionInfos)session.getAttribute("oConnectionInfos");          exportControl.setDatabaseLogonInfos(oConnectionInfos);
        exportControl.processHttpRequest(request, response, getServletContext(), null); //getServletConfig().getServletContext()
       // exportControl.dispose();
%>
And if it isn't possible to export to excel then how can i isolate the report/page header sections in CSV format so that i can atleast get headings in the CSV file ..
Please help me out with This as i am stuck on this for some time now !!

Only if you export to OfficeHTML or OfficeMHTML and then open with Excel
Wayne Van Sluys
TopDown Consulting

Similar Messages

  • Exporting Into Excel from Crystal Reports 8.0.1.0

    Post Author: Manoj
    CA Forum: Exporting
    Hi, I am using Seagate Crystal Reports 8.0.1.0 along with my VB application. System was exporting into Excel on Older Versionsof Windows like 98 and all. But in XP, after exporting if i open the exported file, either i get a message like Cannot Read From Fileor A Blank Sheet in the Excel. I have already tried copying the U2*.dll from the crystal folder to System/System32 folder but it is notexporting. Somebody please help... RgdsManoj

    Sage is an OEM partner. For any database issues please ask Sage for assistance.

  • Reports exported to Excel - Formatting issues

    We have two Business Objects Enterprise servers (boxi r2 and boxi r3.1 sp3) running side by side.  We find that reports created using boxi r2 and exported to Excel format look fine.  When we run the same report and export to excel using boxi r3.1 sp3, we encounter the following formatting issues:
    <ol>
    <li>All columns do not fit on pages.  The last 2 to 3 columns spill over onto extra pages.</li>
    <li>There are some columns where most of the values are blank, but when a row is exported that has a value in that column, all subsequent column positions for that row shift.</li>
    <li>All rows do not fit on page.  The last two rows flow onto a new page, then there seems to be a page break.</li>
    <li>On some reports dates are displayed as ######.</li>
    <li>On some reports column headings are  not centered.</li>
    <li>I would appreciate any input that would help us determine a fix for the formatting issues we are encountering.</li>
    </ol>
    The report is executed using CrystalDecisions.CrystalReports.Engine.
    Here is the code from the application that does the export:
                                ExportOptions exportOptions = new ExportOptions();
                                exportOptions.ExportFormatType = ExportFormatType.Excel;
                                exportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                                DiskFileDestinationOptions diskOptions = new DiskFileDestinationOptions();
                                diskOptions.DiskFileName = filename + ".xls";;
                                exportOptions.ExportDestinationOptions = diskOptions;
                                ExcelFormatOptions XLOptions = new ExcelFormatOptions();
                                XLOptions.ExportPageBreaksForEachPage = true;
                                XLOptions.ExportPageHeadersAndFooters = ExportPageAreaKind.OnEachPage;                           
                                exportOptions.ExportFormatOptions = XLOptions;
                                rptDoc.Export(exportOptions);
    Please note the following details about our environment:
    <h5>Report Designers:</h5>CR Designer version:  xi Rel 2
    <h5>Developer environment</h5>Has the following installed:
    - Business Objects Enterprise XI Release 2
    - VS .Net  2008
    - Crystal reports Basic for Visual Studio 2008
    - Crystal Report 2008 Runtime SP3
    - Boxi .Net SDK
    - SAP BusinessObjects Enterprise XI 3.1 Client Tools sp3
    - .Net Version:  2.0
    <h5>Crystal Server environment:</h5>Two clustered  Business Objects Enterprise servers with the following installed & configured
    - Business Objects Enterprise XI Release 2
    - Crystal Reports XI Release 2
    - SAP BusinessObjects Enterprise XI 3.1 SP3
    - .Net Version:  2.0
    <h5>Web Servers:</h5>Two load balanced web servers with the following installed and configured
    - Business Objects Enterprise XI Release 2
    - Crystal Report 2008 Runtime SP3
    - Crystal Reports XI Release 2 .Net 2005 Server
    - SAP BusinessObjects Enterprise XI 3.1 SP3
    - .Net Version:  2.0

    Umm, the code you provided has nothing to do with Business Objects Enterprise...(?). So, I'm a bit confused by the mention of BOE and "The report is executed using CrystalDecisions.CrystalReports.Engine" in essentially one paragraph.
    Can you pls explain?
    - Ludek

  • Error while Exporting to Excel from ALV Report

    Dear Experts,
    When I am exporting my report output to an Excel Sheet  directly some of the headers are appearing in Row No 1 and some are displaying in Row No. 2. Hence the corresponding values are also showing in the same manner.
    I want to show all the Rows in a single row in row No 1. I am unable to find the solution for this.
    But when I am exporting the same report into the MHTML Excel format the Report Headings are showing correctly in a single row and hence the respective values are also showing correctly in a single row. And if I save the same MHTML Excel as normal EXCEL(97-2003) format then also it is showing correctly.
    The problem comes only when I as exporting it directly into EXCEL(97-2003) format. 
    Plz help.

    Hi,
    This is the Technical limitation of ABAP list export to local file.
    ALV grid greater than 1023 characters per line will be split into 2 lines.
    To prevent a line break occuring when you download the list as a local spreadsheet file, you must reduce the width of the list in ALV. You can do this either by hiding columns or by changing the column widths in the ALV. Take care that the column heading characters also dont exceed 1023 characters. This will work.
    Thanks
    LG

  • How can I schedule an export to excel format of an OBIEE Analysis or Dashboard to a local directory ?

    Hello,
    I would like to schedule with an agent some reports in OBIEE 11g that must be exported in excel format to a specific local directory.
    There is a need for a group of OBIEE users to have a set of reports ready (exported in .xlsx) every morning.
    Furthermore, if the previous scenario is possible then could I deliver a whole OBIEE Dashboard with the same way?
    Any input will be appreciated.
    Thank you in advance.

    Hi,
    As of now , we are not able to save the report in shared location in Linux /Unix.
    Windows it is possible.
    http://satyaobieesolutions.blogspot.com/2013/03/oracle-bi-ee-11g-calling-vb-scripts-to.html
    http://satyaobieesolutions.blogspot.com/2013/03/oracle-bi-ee-11g-calling-js-scripts-how.html
    Thanks,
    Satya Ranki Reddy

  • Status gui &XXL (export to excel format)command doesnu00B4t work

    hi gurus i copied the standar GUI menu from SAPLKKBL and every thing its ok except the &XXL (export to excel format)command .
    i push this button and nothing happens. The popup doesn appear what is wrong? i have excel in my pc and when i use the %PC
    command it works fine and converts to excel but i need the mmhtml format so i need the &XXL command works . any idea?

    IM DOING SOME TEST I CHANGE THE TYPE OF ALV AND IT WORKS, BUT I NEED TO USE THE REUSE_ALV_BLOCK_LIST_DISPLAY AND THE PROBLEM IS WITH THIS TYPE OF ALV
    Moderator message - Please do not use all caps!
    Edited by: Rob Burbank on Sep 27, 2010 5:25 PM

  • Crystal reports 13.5 : Export to excel formatting

    Hi. We are developing web application using VS 2010. We are using crystal reports 13. Initially we had VB6 application which used crystal reports 8.5. The format for excel report generated by crystal report 8.5 and crystal report 13.5 is different. We are using the export option in crystal report viewer for both reports. Is there any way in which we could make changes to crystal reports 13.5 to achieve similar excel formatting as crystal reports 8.5.

    Hi Pooja,
    Back in CR 8.5, it was the RDC COm SDK (CRAXDRT.dll) and with CR for VS 2010 it is .NET SDK which are two complete different SDKs and could not be compared.
    However, the .NET SDK should export the report same as it is exported through CR designer.
    Could you export the report in a newer designer possibly CR 2008 or CR 2011/2013 and compare the exported output with your .NET SDK export?
    You could get the trial free download for CR desiner here.
    http://www.sap.com/solution/sme/software/free-trials.html
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • WAD report export to excel formatting not preserved

    Hi,
    when i export BI 7.1 WAD template to excel and copy to another excel sheet cell formatting changes.color formatting is
    not preserved when we copy to another excel sheet.I tried resetting the "preserve visual appearance of workbook" to the
    exported excel sheet, but this didnot work.I am using excel 2007.
    Can anyone tell me how to preserve the excel formatting for WAD template.
    Thanks,
    Harsha

    Hi Roy
    Have you got the report set to bring back a specific number of rows at a time (ie retrieve data incrementally in sets of : setting in options)?
    If so set this to a larger number of rows, Discoverer will then return all data when the reports is run and will export all data to the spreadsheet.
    Hope this helps
    Melanie

  • Reports built in CR Developer - Exporting to Excel through Crystal Viewer XI

    Post Author: Screenpoet
    CA Forum: Other
    I'm not sure if this is the right forum for this question - so if not - please let me know.  Currently we build small reports in Crystal Developer XI.  As we only have this type of license (and only 2 of them), we only share reports to our end-users by having them install the Crystal Viewer XI application.  Our users are indicating that they can open the reports, but when they export to Excel, the column headings are not exporting with the data.  We also tried exporting in PDF and RTF format and the column headings do export.  Any insight on why the Excel export would not bring in the column headings?  

    Upgrade to CR XI R2 for free and test again

  • Java application export output file of Crystal Report in .TXT format

    Hi,
    I have a Java application which is able to export the output file of Crystal Report in PDF format. But I'm trying to change the export file to .TXT format. Is this possible? I'm using Crystal Report XI. Is there any available updates or fixes to solve this? Please advice.
    Thank you

    I've tried, but I have an error
    frm-40735: when button-pressed trigger raised unhandled exception ORA-06502
    ORA-06502 when I try write a text field to the file the text field in question is a date.
    Did a similar problem ever occured to you?

  • Issue with exporting line to excel on Crystal Report 2013

    Hi all,
    I got the issue when exporting to Excel
    I would like to export to excel with line border in cells. But it seems there is limitation when using "line" object. If I use line, in excel file, there is nothing. Then I changed to use border cells. It's exported fine to excel, but I got another issue.
    Because data is so long, so I use "can growth" function. But if I use "can growth" function. I got issue when export to excel file like the picture I attach here.
    There are a lot of empty cells when wrapping text, how can we remove empty cells? And the line was drawn incorrectly.
    Thanks so much.

    I need a report with border cell and do not merge cell or blank row/cell after exporting to Excel. Most of them are fine (using border cell instead of line object). But I got issue when using "CanGrow" option to extend height of text object automatically.
    Below is detail.
    1. If the "CanGrow" option is false
    - In preview report, the field does not extend the height to show all data if it is over
    - Then, export to Excel by "Microsoft Excel (97-2003)"=> it shows exactly what I saw in previewing (data has been truncated automatically).
    - If export to Excel by "Microsoft Excel (97-2003) Data only" => it shows all data but the formatting of cell (border, width) is missing
    2. If the "CanGrow" option is true
    - In preview report, the field extends automatically if the field is too long but other fields still remain
    - Then, export to Excel
    I expect I can see all data with the correct border cell and do not merge cell in the preview and Excel (the cell may be wrap text or not if it is over the size but the data need to be kept instead of truncating)
    Is there any solution to meet it?
    Many thanks.

  • JRC Export to Text like Crystal Report Designer Export

    We need to Export report to Text like Crystal Report Designer Export using JRC. Is this possible? I see export ReportExportFormat CSV, PDF and RTF only. These exports are working, But I need plain text that looks like Text export of Crystal Reports Designer. I see this working in RAS 2008. What I can do to get this with JRC. I am using Crystal Reports 2008 to design reports.
    Thanks for any help.
    Regards
    Raveendra
    Clarification

    Thank you Jitin.
    What could be solution to this problem?
    If still I want to go with JRC, Can I write some Java code to perform this export?
    I see TextExportFormatOptions and its not working.
    If I want to export automatically to text format, what other choices are there?
    Basically I need to execute report and generate text file automatically. Text file should look like Crystal Report Designer Exported Text file.
    Thank you for your time.
    Regards,
    Raveendra

  • Export to Excel Formatting Lost

    I've got a CR designed such that the report prints out a separate page for each grouping of data bay a certain data field.
    The Crystal format and PDF format look beautiful and the paging is perfect.  Yet when I export to Excel it all runs together and does not page correctly at all.  Plus the formatting is totally screwed.
    Is there a secret to getting the Excel export to behave as the report was written? 
    TIA
    Harry

    <<What version of CR?>>
    11.0.0.1830
    <<What CR SP has been applied?>>
    unknown
    <<Is this in an app?*>>
    The call to create the report is in an app.  Uses CrystalDecisions.CrystalReports.Engine
    CrystalX.RptUtils.GenerateCrystalReport(mDbx, argReportName, argParms, argOutputType)
    Select Case piStrFormat
                    Case "Crystal"
                        tOk = ExportToCrystal(tReportDoc)
                    Case "Excel"
                        tOk = ExportAndView(tExportFolder, tReportDoc, piStrCrystalReportName, "XLS", CrystalDecisions.[Shared].ExportFormatType.Excel)
                    Case "PDF"
                        tOk = ExportAndView(tExportFolder, tReportDoc, piStrCrystalReportName, "PDF", CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat)
    <<If an app, what SDK are you using?>>
    CrystalDecisions.CrystalReports.Engine
    10.2.3600.0  Crystal Reports for .NET Framework 2.0
    <<If you are using .NET, what version?>>
    Microsoft Visual Studio 2005  Team Suite
    Version 8.0.50727.762 (SP.050727-7600) SP2
    <<If the report was created in a stand-alone version of CR, how is the export there?>>
    the report is created in CR v11.0.0.1830 above and uses a stored procedure for the datasource for the fields
    <<"formatting is totally screwed" - a link to a screen shot would help. "Screwed" is not particularly descriptive(?)...>>
    You're right that really doesn't tell you much. 
    The formatting is probably fine for it being an Excel file. Whereas the Crystal viewer and the PDF viewer isolate each page from the other, the Excel has the pages on same screen by its very nature. 
    I think what I may have to do is create another report that basically creates a separate Excel file for each grouping.  I've got screen shots but the content is NDA cept I could pobably zip and send to your email if that's possible or a ftp site......Can the Crystal Report detect Excel export and if so create as many Excel files as groupings?

  • Error  while exporting in pdf in crystal report XI

    Post Author: Siddheswar
    CA Forum: General
    hi
    I am getting the following error in crystal report XI while exporting to pdf.
    The Error:
    Method 'ISCREditableRTFExportFormatOptions_reserved5' on type 'CrystalDecisions.ReportAppServer.ReportDefModel.EditableRTFExportFormatOptionsClass' from assembly 'CrystalDecisions.ReportAppServer.ReportDefModel, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is overriding a method that has been overridden.
    Please Help.
    Thanking in advance.
    Regards
    Siddheswar

    The stack trace is caused by whitespace in your CrystalReportViewer.jsp file.  Look up SAP Note 1199025 for the resolution.
    It's not related to the PDF formatting issue.  There's been changes to the formatting with the most recent version - Crystal Reports for Eclipse 2.0 - so if you haven't already, I recommend you upgrade.
    Note that there's differences in font metric calculation when using Adobe PDF format such that there's no way to get exact agreement between output of the CR and PDF.  But the latest version helps greatly.
    Sincerely,
    Ted Ueda

  • Report with Summary & Detail - Exporting to PDF in Crystal Report

    Hi,
    I am using Crystal Reports XI (release 2). I am trying out a report with Summary and Detail sections.
    Requirement:
    1.     Report should display both Summary and Detail Sections
    2.     Summary section should be displayed first followed by Detail Section
    3.     A field in summary section should have a hyperlink to Detail Section
    4.     On clicking the hyperlink the user should be navigated to the corresponding detail record
    5.     User should be able to download the whole report as a single PDF (i.e., both summary and detail together)
    Implementation in Crystal Report:
    This feature could be implemented using
    a.     Linked On Demand Sub report
    b.     Using Hide (Drill down ok) option
    c.     Hyperlinks
    Issue Faced:
    I used the on demand sub report option. When i clicked on the sub report (hyperlink), the details get displayed. But the details get displayed in separate viewer and hence when we export to PDF both summary and detail are not getting exported together. User has to select each detail report and export to PDF. Is this a limitation in CR XI? - proprietary Crystal Report features, such as drill-down and on-demand subreports, are supported only in the native Crystal Report format. These special features are ignored when exporting a report to a non-Crystal format like pdf.
    Is there any workaround for exporting both the summary and detail (in subreport) as a single PDF file?
    Any help will be greatly appreciated.
    Thanks,
    Viji.

    Hi
    Hyperlink would not be a solution to what you are asking for.
    If you want to see the records related to a particular employee id by clicking on emp id, you can try the below:
    - Apply a group on employee id on the main report.
    - Insert a subreport with the required fields and place it on the Employee id Group header. You can put a name of the subreport as "Check Employee details" or something else as per requirement and make it a on demand subreport.
    - Link the subreport on Employee id.
    Hope this helps!!!
    Regards
    Sourashree

Maybe you are looking for

  • Report on power generation from each plant and shift wise(PP report)

    Hi, i got one  Functional spec on pp module. this FS main object is calculate the daily smelter performance. Based on this FS  I will make a report on POWER GENERATION FROM EACH PLANT AND  SHIFT WISE. so please can  anyone of you  advice to me  , is 

  • Dealing with large amounts of data

    Hi I am new to using Flex and BlazeDS. I can see in the FAQ that binary data transfer from server to Flex app is more efficient. My question is: is there a way to build a Flex databound control (e.g. datagrid) which binds to a SQL query or web servic

  • Icon + Master Template colours not matching

    Hello: I created an icon image using photoshop to match the colour of our SharePoint site but when I upload it to the site it shows up a different colour. I have tried saving it 'for web' but still looks different. See below. Does anyone know how to

  • Checking Linux Kernel Parameters before installation

    Hi Everyone. I am planning to install Oracle 10g XE and I know that with the installation kernel parameters will change. As I don`t know what will happen that in relation to the system, I would like to check default kernel parameters. I know it`s a L

  • Playback of podcasts stops with 44 seconds left

    I've got a 5th generation iPod. Recently, several podcasts have hung up with 44 seconds left to play. The iPod behaves as if it has finished playing back the recording, returning to the menu or cycling to the next podcast, depending on what it is bei