cancel
Showing results for 
Search instead for 
Did you mean: 

Keep column headers in order after Excel export

06-23-2014 10:50 PM
3947 views 4 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hello everyone.  Using CR2008 and I have a question about getting my Page Headers to align with the right data in my Group Footer, after exporting to Excel.

In the screenshot below you can see my Page Header with terribly named dummy column headings (I didn't even try).  When I export this to Excel using the 97-2003 data-only option, the column headings move to an order which I have deemed undesirable.  It looks like what is happening is that the taller column headings with 2 lines of text are brought to the front, presumably because the tops of them are located higher than the other headings.

In other reports, this hasn't mattered, but in this report, it does.  Does anyone know how I can keep my "column heading" order after a data-only export to Excel?

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor

Crystal is very picky about formatting for Excel export.  So, there are a couple of tricks that I've found:

1.  Use guidelines to line up your data with the column headers.  The data width and the header width must be exactly the same and they must line up on the left and right.

2.  Do not include any space between columns - each data field/header object should start on the right-hand edge of the object to its left.

3.  If you have headers or titles that span multiple columns, line up the left side with the left side of one column and the right side with the right side of another column.

4.  Crystal doesn't export correctly when there are multiple lines in some headers and single lines in others.  So, you need to make the header objects all the same height, edit the text object for each of the single-line headers, and do one of the following:

     a. If you want the header text to appear at the bottom of the box, put your cursor at the beginning of the text, add a space and press Enter.

     b.  If you want the header text to appear at the top of the box, put your cursor at the end of the text, press Enter, and add a space.

-Dell

Answers (3)

Answers (3)

Former Member
0 Likes

Thank you all for the abundance of information!  I got lucky and managed to order things in such a way to make it work this time, but next time I will use the information here. 

Former Member
0 Likes

I have found that if you use empty text boxes to fill in the spaces between labels. You will want the same number of objects in your detail row as you have in the page header and group headers/footers to get things to line up. You also want to have the sides of the objects lined up exactly. I export to Excel(97-2003) with the option of 'Show Gridlines' and the Column Width Based on Objects in the Whole Report.

That way you can check how the objects are positioned. I also will select all objects in a Section and align their tops, us the up or down arrow in Design view to move the objects up/down until they jump out of the section, then move them one click back into the section. I do this for each section. This will prevent tiny rows from appearing in you excel export.

It's laborious, but it works.

Former Member
0 Likes

Also, see the document How to WYSIWYG SAP Crystal Reports Export to XLS.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter