Excel Export Formatting Issue
HI,
I am working with CR XI R2 and asp.net2.0.
I am facing some formatting issue when the report is exported to excel.
I have to maintain the same formatting as in the crystal report ,when the data is exported to excel.
My report is a tabular report.I tried exporting the report from Crystal report designer.Not via web application.
I have used the data only option.When i used the other option (Excel 97-2000(xls)) the text was getting rotated at 90 degree but other formatting was not exported correctly.So i found data only option was more appropriate in my case.
I hope same things can be achieved by asp.net also one we get it in the designer.
while exporting from the designer,the main issues i am facing are
1) In the report some headings i have put at 90 degree rotation.
When it gets exported to excel the headings are getting exported with 0 degree rotation.
2) I have applied some back groud color for groupfooter and page header.
This setting is also not getting exported .the report is getting exported with out any back ground color formatting
Is there any way to attach the exported pdf and excel file ,so that the issue would be more clear for you all.
Please let me know if you require more information.
Regards,
smitha
Edited by: smitha thomas on Jul 3, 2009 6:12 AM
Edited by: smitha thomas on Jul 3, 2009 7:43 AM
Hi Smitha,
Use the other option of Microsoft Office Excel Workbook(*.xls) instead of (Excel 97-2000(xls))
*Close the thread if issue solved.
Regards
Jambulingam.P
Similar Messages
-
ALV Excel export format XXL & MHTML
Hi Experts,
In the ALV export to Spreadsheet there are several formats to choose from. MHTML follows the screen column order (or as set in fieldcat). But XXL format moves the columns around -- columns with floating number are shifted to the very end of a row.
Is there a way to make XXL respect the column order as set in the Field Catalog? I know MHTML format can be a workaround. But users have used XXL for most of other reports, I don't want to make an exception.
Thank you!
PulauHi Dan,
no, I don't think so. MHTML is really what-you-see-is-what you get, ABAP uses it internally for the data transfer for inline excel (application running in control area) and everything is retained including sort orders, totals and subtotals and cell colors.
I think you can get your users used to MHTML. Probably if you rename it to .xls excel will open it anyway.
Regards,
Clemens -
Excel 2007 Formatting Issues When Making PDF
Running Excel 2007 on XP Pro. When I make a pdf file from an existing Excel file in Excel 2007 (originally created in Excel 2000), a lot of the formatting changes. Cells that were aligned to the center are now aligned to the top or bottom with no rhyme or reason.
I would hate to have to go through and fix all the alignment problems in Excel 2007.
Any suggestions or has anybody else had this problem?Not so much Excel (or, at least not so much that I remember) but I've read a
LOT of messages about problems with Word'07
You might want to check and make sure you have all MS Office updates installed, to fix any known bugs... plus make sure your version of Acrobat is fully up to date
Acrobat Updates Here - Updates are NOT cumulative, so install in number order
http://www.adobe.com/support/downloads/product.jsp?product=1&platform=Windows -
ALV grid to excel (.XLS) format issue
im trying to export an ALV grid to excel file using FM 'GUI_DOWNLOAD'.
the output is located at the link below:
http://img393.imageshack.us/my.php?image=excelproblemjt4.jpg
some how the fields arent inside the individual boxes..
can anyone provide me with the solution? thanks
below are the codes of how i implement the 'GUI DOWNLOAD' FM
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_file " C:\filename.xls
write_field_separator = 'X'
IMPORTING
filelength = lv_size
TABLES
data_tab = ltt_dataREPORT test0012 .
INCLUDE test_top.
INCLUDE test_f01.
INCLUDE test_alv.
START OF SELECTION
START-OF-SELECTION.
PERFORM get_data.
PERFORM process_data.
END-OF-SELECTION.
IF tt_output IS NOT INITIAL.
PERFORM prepare_excel_data.
Download CSV file to local
IF c_loc = 'X'.
PERFORM convert_to_xls.
PERFORM download_local.
ENDIF.
ELSE.
Show Message when no records selected
MESSAGE I016 WITH TEXT-005.
ENDIF.
PERFORM f_alv_disp.
*& Include test_TOP *
TABLES: vbrk, vbrp, vbak, vbap, kna1.
DATA: total_value TYPE p DECIMALS 2 LENGTH 15.
DATA: total TYPE c LENGTH 5 VALUE 'total'.
TYPE-POOLS
TYPE-POOLS: slis, truxs.
-ALV----
DATA:
wa_alv_layout TYPE slis_layout_alv,
tt_alv_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
tt_alv_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
tt_alv_events TYPE slis_t_event WITH HEADER LINE,
wa_sort TYPE slis_sortinfo_alv,
tt_sort TYPE slis_t_sortinfo_alv,
v_pagno TYPE sy-pagno,
s_keyinfo TYPE slis_keyinfo_alv.
TYPES
TYPES: BEGIN OF vbrk,
vbeln TYPE vbrk-vbeln,
fkdat TYPE vbrk-fkdat,
vkorg TYPE vbrk-vkorg,
vtweg TYPE vbrk-vtweg,
spart TYPE vbrk-spart,
kunag TYPE vbrk-kunag,
END OF vbrk,
BEGIN OF vbrp,
vbeln TYPE vbrp-vbeln,
aubel TYPE vbrp-aubel,
vgbel TYPE vbrp-vgbel,
aupos TYPE vbrp-aupos,
END OF vbrp,
BEGIN OF vbak,
vbeln TYPE vbak-vbeln,
auart TYPE vbak-auart,
bstnk TYPE vbak-bstnk,
END OF vbak,
BEGIN OF vbap,
vbeln TYPE vbap-vbeln,
posnr TYPE vbap-posnr,
netwr TYPE vbap-netwr,
mwsbp TYPE vbap-mwsbp,
END OF vbap,
BEGIN OF kna1,
kunnr TYPE kna1-kunnr,
name1 TYPE kna1-name1,
END OF kna1,
BEGIN OF output,
fkdat TYPE vbrk-fkdat,
vkorg TYPE vbrk-vkorg,
vtweg TYPE vbrk-vtweg,
spart TYPE vbrk-spart,
kunag TYPE vbrk-kunag,
name1 TYPE kna1-name1,
auart TYPE vbak-auart,
bstnk TYPE vbak-bstnk,
aubel TYPE vbrp-aubel,
vgbel TYPE vbrp-vgbel,
total LIKE total_value,
END OF output.
Type for download to excel use.
TYPES: BEGIN OF ty_excel,
col1(20), sp01,
col2(25), sp02,
col3(23), sp03,
col4(14), sp04,
col5(15), sp05,
col6(23), sp06,
col7(13), sp07,
col8(25), sp08,
col9(20), sp09,
col10(30), sp10,
col11(13),
END OF ty_excel.
DATA: wa_vbrk TYPE vbrk,
wa_vbrp TYPE vbrp,
wa_vbak TYPE vbak,
wa_vbap TYPE vbap,
wa_kna1 TYPE kna1,
wa_output TYPE output,
tt_vbrk TYPE STANDARD TABLE OF vbrk,
tt_vbrp TYPE STANDARD TABLE OF vbrp,
tt_vbak TYPE STANDARD TABLE OF vbak,
tt_vbap TYPE STANDARD TABLE OF vbap,
tt_kna1 TYPE STANDARD TABLE OF kna1,
tt_output TYPE STANDARD TABLE OF output.
Table for download to excel use.
DATA: tt_excel TYPE STANDARD TABLE OF ty_excel,
wa_excel LIKE LINE OF tt_excel,
tt_excel_output TYPE truxs_t_text_data.
wa_excel type ty_excel.
Data Declaration for CSV file use
CONSTANTS : c_comma TYPE c VALUE ','.
Selection-Screen
SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
SELECT-OPTIONS: s_fkdat FOR vbrk-fkdat OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b01.
SELECTION-SCREEN BEGIN OF BLOCK b02 WITH FRAME TITLE text-b02.
PARAMETERS: p_vkorg TYPE vbrk-vkorg OBLIGATORY.
SELECT-OPTIONS: s_vtweg FOR vbrk-vtweg,
s_spart FOR vbrk-spart.
SELECTION-SCREEN END OF BLOCK b02.
SELECTION-SCREEN BEGIN OF BLOCK b03 WITH FRAME TITLE text-b03.
SELECT-OPTIONS: s_kunag FOR vbrk-kunag.
SELECTION-SCREEN END OF BLOCK b03.
SELECTION-SCREEN BEGIN OF BLOCK b04 WITH FRAME TITLE text-b04.
PARAMETERS: c_loc AS CHECKBOX,
p_file LIKE rlgrap-filename DEFAULT 'C:\filename.txt'.
SELECTION-SCREEN END OF BLOCK b04.
*& Include test_F01 *
FORM get_data
FORM get_data.
DATA: lt_vbrk TYPE STANDARD TABLE OF vbrk,
lt_vbrp TYPE STANDARD TABLE OF vbrp.
SELECT vbeln fkdat vkorg vtweg spart kunag
FROM vbrk
INTO TABLE tt_vbrk
WHERE fkdat IN s_fkdat
AND vkorg = p_vkorg
AND vtweg IN s_vtweg
AND spart IN s_spart
AND kunag IN s_kunag.
lt_vbrk[] = tt_vbrk[].
SORT lt_vbrk BY vbeln.
IF lt_vbrk[] IS NOT INITIAL.
SELECT vbeln aubel vgbel aupos
FROM vbrp
INTO TABLE tt_vbrp
FOR ALL ENTRIES IN lt_vbrk
WHERE vbeln = lt_vbrk-vbeln.
ENDIF.
lt_vbrp[] = tt_vbrp[].
SORT lt_vbrp BY aubel.
IF lt_vbrp[] IS NOT INITIAL.
SELECT vbeln auart bstnk
FROM vbak
INTO TABLE tt_vbak
FOR ALL ENTRIES IN lt_vbrp
WHERE vbeln = lt_vbrp-aubel.
ENDIF.
lt_vbrp[] = tt_vbrp[].
SORT lt_vbrp BY aubel aupos.
IF lt_vbrp[] IS NOT INITIAL.
SELECT vbeln posnr netwr mwsbp
FROM vbap
INTO TABLE tt_vbap
FOR ALL ENTRIES IN lt_vbrp
WHERE vbeln = lt_vbrp-aubel
AND posnr = lt_vbrp-aupos.
ENDIF.
lt_vbrk[] = tt_vbrk[].
SORT lt_vbrk BY kunag.
IF lt_vbrk[] IS NOT INITIAL.
SELECT kunnr name1
FROM kna1
INTO TABLE tt_kna1
FOR ALL ENTRIES IN lt_vbrk
WHERE kunnr = lt_vbrk-kunag.
ENDIF.
ENDFORM. "get_data
*& Form process_data
FORM process_data.
LOOP AT tt_vbrk INTO wa_vbrk.
wa_output-fkdat = wa_vbrk-fkdat.
wa_output-vkorg = wa_vbrk-vkorg.
wa_output-vtweg = wa_vbrk-vtweg.
wa_output-spart = wa_vbrk-spart.
wa_output-kunag = wa_vbrk-kunag.
read table tt_vbrp into wa_vbrp with key vbeln = wa_vbrk-vbeln.
if sy-subrc = 0.
wa_output-aubel = wa_vbrp-aubel.
wa_output-vgbel = wa_vbrp-vgbel.
endif.
READ TABLE tt_kna1 INTO wa_kna1 WITH KEY kunnr = wa_vbrk-kunag BINARY SEARCH.
IF sy-subrc = 0.
wa_output-name1 = wa_kna1-name1.
ENDIF.
LOOP AT tt_vbrp INTO wa_vbrp WHERE vbeln = wa_vbrk-vbeln.
wa_output-aubel = wa_vbrp-aubel.
wa_output-vgbel = wa_vbrp-vgbel.
READ TABLE tt_vbak INTO wa_vbak WITH KEY vbeln = wa_vbrp-aubel BINARY SEARCH.
IF sy-subrc = 0.
wa_output-auart = wa_vbak-auart.
wa_output-bstnk = wa_vbak-bstnk.
ENDIF.
READ TABLE tt_vbap INTO wa_vbap WITH KEY vbeln = wa_vbrp-aubel
posnr = wa_vbrp-aupos BINARY SEARCH.
wa_output-total = wa_vbap-netwr + wa_vbap-mwsbp.
APPEND wa_output TO tt_output.
ENDLOOP. "endloop tt_vbrp
wa_output-total = wa_vbap-netwr + wa_vbap-mwsbp.
append wa_output to tt_output.
CLEAR wa_output.
ENDLOOP. "endloop vbrk
ENDFORM. "process_data
*& Form APPEND_EXCEL
FORM append_excel .
wa_excel-sp01 = wa_excel-sp02 = wa_excel-sp03 =
wa_excel-sp04 = wa_excel-sp05 = wa_excel-sp06 =
wa_excel-sp07 = wa_excel-sp08 = wa_excel-sp09 =
wa_excel-sp10.
APPEND wa_excel TO tt_excel. CLEAR wa_excel.
ENDFORM. " APPEND_EXCEL
*& Form PREPARE_EXCEL_DATA
FORM prepare_excel_data .
List's Header for excel file
WRITE 'Billing Date' TO wa_excel-col1.
WRITE 'Sales Organization' TO wa_excel-col2.
WRITE 'Distribution Channel' TO wa_excel-col3.
WRITE 'Division' TO wa_excel-col4.
WRITE 'Sold-to Party' TO wa_excel-col5.
WRITE 'Name of Sold-to Party' TO wa_excel-col6.
WRITE 'Order Type' TO wa_excel-col7.
WRITE 'Customer PO Number' TO wa_excel-col8.
WRITE 'Sales Order Number' TO wa_excel-col9.
WRITE 'Delivery Order Number' TO wa_excel-col10.
WRITE 'Total Value' TO wa_excel-col11.
PERFORM append_excel.
Item data for excel file.
LOOP AT tt_output INTO wa_output.
WRITE wa_output-fkdat TO wa_excel-col1.
WRITE wa_output-vkorg TO wa_excel-col2.
WRITE wa_output-vtweg TO wa_excel-col3.
WRITE wa_output-spart TO wa_excel-col4.
WRITE wa_output-kunag TO wa_excel-col5.
WRITE wa_output-name1 TO wa_excel-col6.
WRITE wa_output-auart TO wa_excel-col7.
WRITE wa_output-bstnk TO wa_excel-col8.
WRITE wa_output-aubel TO wa_excel-col9.
WRITE wa_output-vgbel TO wa_excel-col10.
WRITE wa_output-total TO wa_excel-col11.
PERFORM append_excel.
ENDLOOP.
List's Header for excel file
CONCATENATE '"' 'Billing Date' '"' INTO WA_EXCEL-COL1.
CONCATENATE '"' 'Sales Organization' '"' INTO WA_EXCEL-COL2.
CONCATENATE '"' 'Distribution Channel' '"' INTO WA_EXCEL-COL3.
CONCATENATE '"' 'Division' '"' INTO WA_EXCEL-COL4.
CONCATENATE '"' 'Sold-to Party' '"' INTO WA_EXCEL-COL5.
CONCATENATE '"' 'Name of Sold-to Party' '"' INTO WA_EXCEL-COL6.
CONCATENATE '"' 'Order Type' '"' INTO WA_EXCEL-COL7.
CONCATENATE '"' 'Customer PO Number' '"' INTO WA_EXCEL-COL8.
CONCATENATE '"' 'Sales Order Number' '"' INTO WA_EXCEL-COL9.
CONCATENATE '"' 'Delivery Order Number' '"' INTO WA_EXCEL-COL10.
CONCATENATE '"' 'Total Value' '"' INTO WA_EXCEL-COL11.
PERFORM APPEND_EXCEL.
Item data for excel file.
LOOP AT TT_output INTO WA_output.
CONCATENATE '"' WA_OUTPUT-FKDAT '"' INTO WA_EXCEL-COL1.
CONCATENATE '"' WA_OUTPUT-VKORG '"' INTO WA_EXCEL-COL2.
CONCATENATE '"' WA_OUTPUT-VTWEG '"' INTO WA_EXCEL-COL3.
CONCATENATE '"' WA_OUTPUT-SPART '"' INTO WA_EXCEL-COL4.
CONCATENATE '"' WA_OUTPUT-KUNAG '"' INTO WA_EXCEL-COL5.
CONCATENATE '"' WA_OUTPUT-NAME1 '"' INTO WA_EXCEL-COL6.
CONCATENATE '"' WA_OUTPUT-AUART '"' INTO WA_EXCEL-COL7.
CONCATENATE '"' WA_OUTPUT-BSTNK '"' INTO WA_EXCEL-COL8.
CONCATENATE '"' WA_OUTPUT-AUBEL '"' INTO WA_EXCEL-COL9.
CONCATENATE '"' WA_OUTPUT-VGBEL '"' INTO WA_EXCEL-COL10.
CONCATENATE '"' total '"' INTO WA_EXCEL-COL11.
PERFORM APPEND_EXCEL.
ENDLOOP.
ENDFORM. " PREPARE_EXCEL_DATA
*& Form Convert_to_xls
*form Convert_to_xls.
LOOP AT TT_EXCEL INTO WA_EXCEL.
MOVE WA_EXCEL TO LTT_DATA-TEXT.
APPEND LTT_DATA. CLEAR LTT_DATA.
ENDLOOP.
LV_FILE = P_FILE.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ';'
I_LINE_HEADER =
i_filename = lv_file
I_APPL_KEEP = ' '
tables
i_tab_sap_data = LTT_DATA
CHANGING
I_TAB_CONVERTED_DATA = tt_excel_output
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2.
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*endform.
*& Form DOWNLOAD_LOCAL
FORM download_local .
TYPES:
BEGIN OF lty_data,
text(800),
END OF lty_data.
DATA:
lv_file TYPE string,
lv_size TYPE i,
lv_msg TYPE bapi_msg,
ltt_data TYPE STANDARD TABLE OF lty_data WITH HEADER LINE.
LOOP AT tt_excel INTO wa_excel.
MOVE wa_excel TO ltt_data-text.
APPEND ltt_data. CLEAR ltt_data.
ENDLOOP.
lv_file = p_file.
CONCATENATE LV_FILE 'file.csv' INTO LV_FILE.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_file
write_field_separator = 'X'
FILETYPE = 'ASC'
IMPORTING
filelength = lv_size
TABLES
data_tab = ltt_data
EXCEPTIONS
OTHERS = 1.
IF sy-subrc EQ 0.
"File &1 downloaded successfully - &2 bytes transferred
MESSAGE e419(3e) WITH lv_file lv_size INTO lv_msg. "#EC *
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO lv_msg.
ENDIF.
WRITE LV_MSG.
ENDFORM. " DOWNLOAD_LOCAL
*ENDIF.
*& Include test_ALV *
FORM build_layout .
wa_alv_layout-zebra = 'X'.
wa_alv_layout-colwidth_optimize = 'X'.
wa_alv_layout-window_titlebar = sy-title.
ENDFORM. " build_layout
*& Form f_build_event
text
--> p1 text
<-- p2 text
FORM f_build_event .
REFRESH tt_alv_events.
tt_alv_events-name = slis_ev_top_of_page.
tt_alv_events-form = slis_ev_top_of_page.
APPEND tt_alv_events.
CLEAR tt_alv_events.
tt_alv_events-name = slis_ev_top_of_list.
tt_alv_events-form = slis_ev_top_of_list.
APPEND tt_alv_events.
CLEAR tt_alv_events.
ENDFORM. " f_build_event
*& Form f_alv_disp
text
--> p1 text
<-- p2 text
FORM f_alv_disp.
DATA lv_repid TYPE sy-repid.
REFRESH: tt_alv_fieldcat, tt_alv_events.
PERFORM build_layout.
PERFORM f_build_event.
lv_repid = sy-repid.
PERFORM f_build_fieldcat_summary.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = lv_repid
is_layout = wa_alv_layout
it_fieldcat = tt_alv_fieldcat[]
I_GRID_TITLE = 'Billing Due List Report'
it_sort = tt_sort
i_save = 'A'
it_events = tt_alv_events[]
TABLES
t_outtab = tt_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f_alv_disp
*& Form f_build_fieldcat_SUMMARY
text
--> p1 text
<-- p2 text
FORM f_build_fieldcat_summary .
do_sum no_out outputlen
PERFORM f_fieldcat USING:
'tt_output' 'FKDAT' text-c01 ' ' ' ' '10' ,
'tt_output' 'VKORG' text-c02 ' ' ' ' '10',
'tt_output' 'VTWEG' text-c03 ' ' ' ' '10' ,
'tt_output' 'SPART' text-c04 ' ' ' ' '10' ,
'tt_output' 'KUNAG' text-c05 ' ' ' ' '10' ,
'tt_output' 'NAME1' text-c06 ' ' ' ' '10' ,
'tt_output' 'AUART' text-c07 ' ' ' ' '10' ,
'tt_output' 'BSTNK' text-c08 ' ' ' ' '10' ,
'tt_output' 'AUBEL' text-c09 ' ' ' ' '10' ,
'tt_output' 'VGBEL' text-c10 ' ' ' ' '10' ,
'tt_output' 'TOTAL' text-c11 ' ' ' ' '15' .
ENDFORM. "
*& Form f_fieldcat
FORM f_fieldcat USING pv_a TYPE any
pv_b TYPE any
pv_c TYPE any
pv_d TYPE any
pv_e TYPE any
pv_f TYPE any.
tt_alv_fieldcat-tabname = pv_a.
tt_alv_fieldcat-fieldname = pv_b.
tt_alv_fieldcat-reptext_ddic = pv_c.
tt_alv_fieldcat-do_sum = pv_d.
tt_alv_fieldcat-no_out = pv_e.
tt_alv_fieldcat-outputlen = pv_f.
APPEND tt_alv_fieldcat.
CLEAR tt_alv_fieldcat.
ENDFORM. " f_fieldcat -
Xcelsius 2008 - PDF Export Formating issue (Landscape)
I've created an app that uses a landscape layout. When exported in PDF the SWF opens with a massive white space above and below the app. If I rotate the view in Adobe it cures the problem until the PDF is opened again.
Is there a way to export to PDF in the intended aspect ratio without the white space?Hello,
I am facing the same problem. Is your problem solved?
FYI: I am using Xcelsius Enterprise 5.5.0.0 and the build Number 12,5,0,1388.
Thanks in Advance! -
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.0Umm, 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 -
Invalid export DLL or export format" with Crystal Reports 2008 to Excel xls
We are experiencing the same issue as reported in the sticky thread. I answered in that thread, but thought that I woudl open a new thread to keep track of this issue. I can give you the responses to your questions you have requested in that thread:
Server Operating System - MS Windows Server 2003 R2 Enterprise Edition SP2
Version of the .NET Framework - MS .NET Framework 3.5 SP1
How did you deploy? - Installed CR 2008 SP1 runtime with msi package
If you deployed with CRRuntime_12_0_mlb.msi - what was the date of the file and its size? CRRuntime_12_1_mlb.msi dated Sept. 16, 2008 12:55:00 PM, size: 56,717,824 bytes
What is the file version of crpe32.dll on your server? You'll find this in the C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 directory - File was created 9/13/08 11:21AM, 9451KB File Version: 12.1.0.882
How many libpng10.dll files are on your system? List all instances. - 1 instance is on the system located in C;\Program Files\Business Objects\Business Objects Enterprise 12.0\win32_x86 directory. It is dated 9/13/08 8:52:26AM 132KB version 1.0.30.1
Any additional comments - We have tried to export to PDF and this works successfully. However, we can not export to xls or rft formats.
CRXF_XLS.dll is 905KB 9/13/08 9:38AM Version 12.1.0.882
CRXF_RTF.dll is 509KB 9/13/08 9:35AM Version 12.1.0.882
We also have the CR XIR2 server runtime installed side by side on the server as we migrate from CR 2008 to CR XIR2 SP4 ( where this function does work currently).
Please let me know if you need anything additional.
Phil
"Invalid export DLL or export format" with Crystal Reports 2008
Posted: Sep 27, 2008 12:36 AM E-mail this message Reply
I've included this sticky because we are seeing many posts in this forum regarding the error Invalid export DLL or export format when exporting to Excel and RTF in .NET applications using the Crystal Reports 2008 .NET SDK.
Issue
Exporting a Crystal Report to Excel or RTF format
.NET application using the Crystal Reports 2008 runtime (version 12.0)
error Invalid export DLL or export format
We've been doing some testing in-house and haven't reproduced this behavior. In order to figure this issue out we will need your help. If you are getting this error please reply to this post with the following information:
Server Operating System
Version of the .NET Framework
How did you deploy?
If you deployed with CRRuntime_12_0_mlb.msi - what was the date of the file and its size?
What is the file version of crpe32.dll on your server? You'll find this in the C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 directory
How many libpng10.dll files are on your system? List all instances.
Any additional comments
What We Know
The error invalid export DLL or export format may occur when exporting to Excel and RTF formats in .NET applications utilizing the Crystal Reports 2008 runtime (v 12.0)
Other export formats like Adobe PDF, Crystal Reports, CSV all export with no error
Some customers have resolved this by adding C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 to their environment path variables
This may have something to do with the file libpng10.dll. Both crxf_xls.dll and crxf_rtf.dll are dependent on it.
Thanks in advance for your co-operation. We hope to figure out what is causing this issue soon.Hi,
I am also having the same problem, except that I am not using Crystal Report 2008 runtime but the actual Crystal Report 2008 installation on Windows XP SP2 with VS Studio 2005 (VC++). MS .NET Framework 2.0.
Cyrstal Report XIR2 was installed on the same machine but uninstalled before installing Crystal Report 2008.
So only one instance of libpng10.dll and found in C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86
Crpe32.dll 3/1/2008 version 12.0.0.683
Crxf_xls.dll 3/1/2008 version 12.0.0.683
Crxf_rtf.dll 3/1/2008 version 12.0.0.683
crdb_oracle.dll 3/1/2008 version 12.0.0.683
libpng10.dll 3/1/2008 version 1.0.30.0 122880 bytes
There is no problem for exporting to pdf, html, word, csv, Crystal Report. If I create a testing report without any data from database, the testing report can then be exported also to rtf and xls.
Oracle 11.1.0.6 is the DB for the reports.
Adding C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 to the path did not resolve my problem.
Any idea to fix this issue?
Thanks
Kin H Chan -
Excel export (webui crm -- excel) wrong format of house number
Hi,
in an excel export (webui crm ---> Excel) is displaying the wrong format.
If the house number contains a special character such as "/" then the house number displayed in the date format in Excel.
And if in the field house number is a number and a letter such as "9 a", then the house number is displayed in time format (9:00 am) instead the house number.
Does anybody know, how can I solve this problem?
Thank you in adance.
Best regards, JasminHi,
There is no error from the CRM functionality. If you SAVE the excel,instead of opening it directly and then " open with "
word pad or notepad, you can see the phone no.s and fax no.s are properly transported to excel.There is a default format setting of
excel from the Microsoft, so you are getting the default format after opening the excel.
Steps:
1.Export to excel.
2.Choose the BP,PHONE and FAX columns holding the 'CTRL'key.
3.Right click on the chosen columns and choose "format cells".
4.Under the tab "number" choose 'number' and and reduce the decimal
place to '0' and click "OK".
5.Now you will be able to see the expected format.
If you are using IE then the excel file that is being generated should be an XML file which would help with the formating issue. But when there is a problem in the generation of the XML file a CSV file is created instead.
The kind of problems that can cause this could be :
- Wrong version of Excel (professional needed)
- Error in encoding (note 1560243 corrects this)
- Active X Settings on browser are not properly setup or disabled
- Other problems (some fixed in note 1457261)
I hope this helps.
Br,
Lloyd -
Export to Excel is formatted differently since we upgraded to XI release 2
Hi,
For many of our reports were using the Crystal Reports that came embedded VisualStudio2002. Recently, some of our developers needed to upgrade their laptops to Crystal Reports XI release 2. This forced us to install the Crystal 11.5 redistributable on our web servers, so those developers would be able to run their new reports.
However, now we are noticing problems with the export-to-excel feature on some of our OLD reports. Even though we have not change/touched the OLD reports at all, the export to excel feature is acting differently. I strongly suspect it has something to do with the 11.5 redistributable I installed on the servers.
Specifically, these are the things we noticed missing on our old reports...
1. Previously, the export-to-excel would mimic the page breaks we setup in the rpt file. Now it does not. The page breaks seem random in the Excel export. If I export the report to PDF the page breaks seem fine (i.e. exactly how I set them up in the rpt file).
2. Previously, the page header section would repeat within every page of the Excel document (that is how we wanted it). Now it does not. The page header only shows up once, but then does not repeat anymore.
Previously, we did not have to set any of the format options in the report, and it worked fine. To try and resolve the problems I have now tried these settings (C#):
ExcelFormatOptions efo = new ExcelFormatOptions();
efo.ExportPageBreaksForEachPage =true;
efo.ExportPageHeadersAndFooters = ExportPageAreaKind.OnEachPage;
Those format changes did not help at all. Does anyone know how to get my page breaks back?
thanks, --RickHi Rick,
The version of CR included in .NET 2002 was version 9. There have been a lot of changes done to our exporting dll's since then that cleaned up how CR exported. You won't be able to fix this using code, it is due to your objects in the page layout that is causing the changes.
There is a Document that the Report Design team has that is "Best Practices" when laying out reports for exporting so I am transferring this posting to the Report Design Forums to help you with "fixing up" your reports. If you still have issues when previewing/printing/exporting through your application they can transfer this post back.
Thank you
Don -
Export to excel with formatting was autowrapping text in a cell
Export to excel with formatting was autowrapping text in a cell without having to check the can grow option. When the can grow option is checked it does wrap the text however it spans multiple rows, which causes complications when trying to sort.
It worked in:
ProductVersion=10.0.0.533
ProductName=Crystal Enterprise 10 Embedded
Doesnt work in:
Crystal Reports 10.0 Service Pack 6
After the upgrade the reports did not autowrap, b/c the "can grow" option was not checked. I believe this was fixed by "ADAPT00305137 Patch ID: 36479914
Description:
When users export to Excel 97-2000 with the page-based format, text fields are wrapped, even when the "can grow" feature in the
Designer is turned off." . After we turn the option to grow on it does wrap however it spans across multiple rows. So I guess my question is there a way for it not to span multiple rows when wrapping text?
Edited by: dforde on Jan 27, 2010 11:12 PMI could be wrong, but I believe the export to excel option exports the database values, and the export to HTML exports the values seen in the sheets. If the database values are stored as seconds, the Excel will see them as seconds, and the data will have to be formatted properly in Excel.
I haven't toyed around with Excel exports that much, but it might be possible to set up a template or macro in excel that would have the proper formatting, and use it when opening the Disco export. -
Export to excel loses formatting
I have a region whose source is a SQL query.
My SQL query contains function calls that return a value.
source of the region:
select nvl(GETSRHR(:P253_STARTDATE,:P253_ENDDATE),0) as "REQUESTS",
nvl(GETTBHR(:P253_STARTDATE,:P253_ENDDATE),0) as "BENEFITS",
nvl(GETTOTALHRS(:P253_STARTDATE,:P253_ENDDATE),0) as "TOTALS"
from dual
Report template chosen is: default vertical report look 1 (include null columns)
when I run the page the report looks as follows:
REQUESTS 20
BENEFITS 120
TOTALS 140
When I export this it looks like:
REQUESTS BENEFITS TOTALS
20 120 140
Why is the formatting lost when I export to Excel? am I missing a step somewhere?
thanks for the feedbackThe CSV/Excel export always exports your data horizontally. Similar to what you would get if you were running this in SQL Plus. The vertical look report template only applies to the report when shown in your web page. The template selection has now affect on the structure of the CSV export. If you need to export your data in a different way, one way to implement this would be to write a PL/SQL region or process that stores the data in that format first, e.g. in another table or using HTML DB collections and then write a report that is based on that temporary storage.
Regards,
Marc -
Hello.
I've been attempting to do a very simple task that just isn't working. For a Data Flow Task action in SSIS, I am trying to export data from a single SQL Server (2008 R2) database table to an Excel spreadsheet (.xlsx). No matter what I do, it
just keeps failing. The columns in the table match the column header names (in the first row) in the tab I select. Here is the output I get.
SSIS package "Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Warning: 0x80049304 at Data Flow Task, SSIS.Pipeline: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available. To resolve, run this package as an administrator, or on the system's
console.
Information: 0x40043006 at Data Flow Task, SSIS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Data Flow Task, SSIS.Pipeline: Pre-Execute phase is beginning.
Error: 0xC0202009 at Data Flow Task, Excel Destination [52]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
Error: 0xC0202025 at Data Flow Task, Excel Destination [52]: Cannot create an OLE DB accessor. Verify that the column metadata is valid.
Error: 0xC004701A at Data Flow Task, SSIS.Pipeline: component "Excel Destination" (52) failed the pre-execute phase and returned error code 0xC0202025.
Information: 0x40043008 at Data Flow Task, SSIS.Pipeline: Post Execute phase is beginning.
Information: 0x4004300B at Data Flow Task, SSIS.Pipeline: "component "Excel Destination" (52)" wrote 0 rows.
Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: Data Flow Task
SSIS package "Package.dtsx" finished: Success.
I kick-off the action and sometimes is hangs for a few seconds (20+ seconds) and sometimes it doesn't, but either way it fails. I tried this on a 32-bit machine, 64-bit machine, and still it fails. I tried an OLE DB connection to Excel and
that doesn't work either. I made sure that the connection string for the Excel spreadsheet is Provider=Microsoft.ACE.OLEDB.12.0;Data Source=[filepath\excelfile].xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES"; and still it doesn't work.
Now, when I switch it over to export to an Excel 2003 spreadsheet (.xls) it works! But I don't want it to go to the old Excel spreadsheet format, my requirement is to export the data to the new format. Is there a bug in the Access 2010 Database
Engine that won't allow me to export to the new Excel format? Otherwise, what can I be doing wrong? I set the Run64BitRuntime property to False and it still doesn't work.
My solution (so far) is to export it to Excel 2003 and then via the Script Task action use the Excel COM API (Microsoft.Office.Interop.Excel.dll) for 2010, open the file and save it in the new format (.xlsx) and that works great! However, the client
doesn't want to install Excel on the database server! So what can I do when the Excel Destination or OLE DB Destination (to connect to Excel) actions don't work!? Please help!!!
Like I mentioned, if this is a bug, that would be great to know so I can stop wasting my time. Thanks again.Alright, so you mean to say is that the driver is not installed. Isn't version 12 the 2010 Access Database Engine Driver? I did install that, and I also tried the 2007 Access DB Engine driver, and both don't work. What driver am I missing?
The connection string is correctly formatted, yes?
Also, when setting up the OLE DB Destination action and I have it point to the Excel spreadsheet, and I specify as the provider "Microsoft Office 12.0 Access Database Engine OLE DB Provider" and click on Test Connection, the connection is
successful. Wouldn't that mean the 12.0 version driver is installed?
Thanks in advance. -
Error inExportToDisk method for Excel (nvalid export DLL or export format)
Hi,
I'm new to Crystal Reports and facing a problem with its ExportToDisk method. I'm using Crystal Reports 2008 with MS .Net v3.5 SP1. I get the below error while trying to export to a Excel file. The Datasource is a dataset. Could you please help me out?
-Stack Trace
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
-Error message
Error in File stdiface {3C162A12-5142-4F2C-8709-154FDD0843DB}.rpt:
Invalid export DLL or export format.
-Exception source
CrystalDecisions.ReportAppServer.DataSetConversion
-Error ID
InvalidExportOptions
Any help will be appreciated!
Thank You!Further, our application has recently upgraded to Crystal Reports 2008, and this problem wasn't observed on any of the previous versions.
Let me summarize the findings as follows:-
1)When I install my application on a clean XP machine, (which installs Crystal Reports 2008) as a prerequisite, the window service which uses the ExportToDisk method of Crystal Report engine works without a hitch. The report is successfully generated.
2)However, if I install my application on a machine which had previous version of my application installed (which used Crystal Reports 10) it gives me a problem with the ExportToDisk method (Invalid export DLL or export format) when it's called through a windows service.
Let me know if you need any additional information.
Do help!
Thanks! -
Hi,
I have a report where on taking an excel export, the last column header appears without border and cell color.
Could someone suggest which system files to look into to resolve this??
Regards.i'm using 11.1.1.5 and i have been reading about a lot of bug in this version, specially with excel exports and formats. So i suppose we need to apply a consolidated patch to get over this. Any idea whats the patch id ? is it going to be a good idea to convince the client for an upgrade to 11.1.1.6 ?? what are the pros and cons in this action stated?
Regards. -
Export to Excel 2007 failed - Invalid export DLL or export format.
Hi,
Environment:
OS: Windows XP (SP3)
Crystal Reports : 12.1.0.892
We have a problem for exporting few reports to Excel 2007 (Export to Excel 2003 works fine for those reports).
Getting the bellow while trying to Export to Excel 2007.
Crystal Report Windows Forms Viewer
Error in File CDSFUN01 {99B42BC5-2FBB-4F75-A4F5-D7B5B7B6AE0B}.rpt:
Invalid export DLL or export format.
OK
Export Report
Export failed.
OK
Its the same case even if we try to Export blank report to Excel 2007 as well. Please help.I will make sure that I am on the latest patch ie SP4
https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
You can find the rumtimes here:
MSI:
https://smpdl.sap-ag.de/~sapidp/012002523100008782532011E/cr2008sp4_redist.zip
MSM:
https://smpdl.sap-ag.de/~sapidp/012002523100008782522011E/cr2008sp4_mm.zip
ClickOnce
https://smpdl.sap-ag.de/~sapidp/012002523100008782442011E/cr2008sp4_clickonce.zip
Recompile the app and then deploy.
What is the .NET Framework used by the application?
Method of deployment?
OS where app is deployed, x86 or x64?
Are you able to export the report from designer ie CR2008 Standalone?
- Saurabh
Maybe you are looking for
-
How do you get your email account back online
how do you get your email address back online
-
I am using a Toshiba 1400u. When I coukd not get ANY think on myTV after hooking up apple TV, I called Toshiba suoort and they recommendd I try the HDMI cable tcame as part of the Toshiba package. Then I did get an apple tv picture on my tv screen sh
-
Mandatory parameter in Oracle BI Publisher 10g
Can we define a parameter to be mandatory so that user needs to enter some value for it in Oracle BI Publisher 10g? If yes how do we do that? Edited by: 933296 on Aug 23, 2012 7:49 PM
-
Hi I need to create a report with template by using Bi publisher. I have a xml data of the report and created rtf template with Desktop plugin.I made all placeholders and alloted required fields to them. Here the issue is i need to divide the field b
-
Widgets move when I switch displays
I switch between my MBP and a desktop LCD and have had this problem in both Tiger and Leopard. The widgets just shift a little when I change displays. It's not as if all of my widgets shift together, and they don't shift every time either. Certain, s