Print Page | Close Window

CR XI: suppress repeating column headers

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5604
Printed Date: 04 May 2024 at 2:17pm


Topic: CR XI: suppress repeating column headers
Posted By: Valmont
Subject: CR XI: suppress repeating column headers
Date Posted: 25 Feb 2009 at 8:49am
Hi peeps,
 
When exporting a crosstab to Excel (not "Excel Data"), the column headers keep repeating. The amount of repeats depends on page settings in CR XI.
 
However, I do not want those column names to be repeated. It should show only once at the top of the Excel sheet (and report), and that's it.
 
"Repeat Row Labels" and "Keep Column Together" is off!
So what else is missing?
 
Thanks,
Val



Replies:
Posted By: rahulwalawalkar
Date Posted: 26 Feb 2009 at 1:21am
Hi
 
Can you post the crosstab data  and what data is repeating when exported to excel,also what exporting options you are selection when exporting to excel .
 
Cheers
Rahul


Posted By: Valmont
Date Posted: 26 Feb 2009 at 8:30am
This the how the crosstab looks like basically:
                      Motherboards     Graphic Cards     Sound Cards
feb 20, 2009            16                      5             2
feb 19, 2009            15                      7             2
feb 18, 2009            19                      8             3
The header names "Motherboards     Graphic Cards     Sound Cards" are repeated after export to Excel. The amount of repetitions depend on de "Page Setup..."  properties in CR XI. The bigger the page, the less amounts of repeats. Obviously, I have much more dates then only 3 days, because this simple crosstab fits on the smalles page :).
Here is an example how it looks like after export to Excel:
 
                      Motherboards     Graphic Cards     Sound Cards
feb 20, 2009            16                      5             2
feb 19, 2009            15                      7             2
                      Motherboards     Graphic Cards     Sound Cards <-- remove repetition!
feb 18, 2009            19                      8             3
You also asked me how I export.
Well I export using the "Excel" option. Not the "Excel Data option".


Posted By: rahulwalawalkar
Date Posted: 26 Feb 2009 at 9:29am
Hi
 
When you export to Excel Check the value in the option for
 
Export Page Headers and Footers in Excel Format Options
 
 from the dropdown select Once Per Report this should resolve the issue.
 
Also if you  use the Data Only it will export properly, let us know if this works also.....
 
Cheers
Rahul


Posted By: Valmont
Date Posted: 02 Mar 2009 at 2:10am
Hi Rahulwalawalker,
 
First of all I appreciate your help a great deal.
 
I think I found a bug in CR XI. You helped me in the right direction.
Like you mentioned, there are two options to export to Excel: "Microsoft Excel 97-200 (XLS)" and "Microsoft Excel 97-200 (data only)"
The latter export option (data only), when DE-selecting Export Page Headers and Footers, then the column headers are exported only once. Perfect!
But when choosing the first export option (XLS), and setting the drop down menu to "none" the header columns are still repeated per page.
I think this is a bug.
 
So best way is to export using data only, keep object formatting and deselect Page Headers and Footers. However, I hope Crystal Reports Server 2008 has this option too. It will be installed this week or next week...
 
Thanks for guiding me into the right direction.
 
~ Val


Posted By: sandrak
Date Posted: 21 Mar 2009 at 12:13pm
Hello,
 
I was just working with different export to Excel options, and I need some help. I hope some of you encountered simmilar problem before.
I usually use Export to Excel (Data Only) option, but this time I needed to set specific column width for each of my Crystal report objects/fields.
To keep formatting of columns (I set field sizes in the Crystal report), I had to choose Export to Excel option. Excel sheet looks just the way I wanted except that each record is written in every 2nd raw of excel sheet, in other words - there is a blank line between every two records. I keep checking my Crystal report to see where does that line come from and I am not finding it. All I have is 8 fields in detail section and their headers/labels in the report header section. Everything else is suppressed. This problem does not occur when I use Export to Excel (data only) option, but in that case columns are shrinked and our customer wants to see the content of each column as the excel opens up.
Any kind of tip on how to avoid extra blank lines will be highly appreciated.
 
Thanks!


-------------
sandra


Posted By: perryvv
Date Posted: 14 Sep 2009 at 8:22am
Hi Sandrak,

Make sure all fields have the same height as the height of the detail row and are aligned. It worked for me...

GL.



Print Page | Close Window