Print Page | Close Window

"Can Grow" fields create extra rows in Excel expor

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=22748
Printed Date: 04 May 2024 at 4:01pm


Topic: "Can Grow" fields create extra rows in Excel expor
Posted By: pmjewett
Subject: "Can Grow" fields create extra rows in Excel expor
Date Posted: 20 Mar 2019 at 8:06am
Hello,

The report I'm creating couldn't be simpler but I have a need to set some of my detail fields to "Can Grow" but as soon as I do this I get extra rows upon exporting to Excel (I need to use the Excel 97-2003 export option).

Rows that do not have output that produces a "wrap" in these "Can Grow" fields don't produce the 2nd line.

This report is meant to replace an old Cognos version that allows for the growth of the fields but does not produce the extra line in an Excel export.

Any advice on this would be greatly appreciated.

Thanks



Replies:
Posted By: kevlray
Date Posted: 20 Mar 2019 at 8:12am
Unfortunately when you export to Excel, if a text box (or field) is set to grow and it spans more than one line, then an extra row will be created (one of the fun things with exporting to Excel).  Only 'fix' to this that I know of is to make the text box (or field) wide enough so that it does not wrap.  The Cognos Excel export code apparently works different than the Crystal Report Excel export code.

If anyone else has a solution, I would like to know also.


Posted By: pmjewett
Date Posted: 20 Mar 2019 at 8:20am
Originally posted by kevlray

Unfortunately when you export to Excel, if a text box (or field) is set to grow and it spans more than one line, then an extra row will be created (one of the fun things with exporting to Excel).  Only 'fix' to this that I know of is to make the text box (or field) wide enough so that it does not wrap.  The Cognos Excel export code apparently works different than the Crystal Report Excel export code.
If anyone else has a solution, I would like to know also.


Thank you for the reply. I don't have the option to simply widen the field in this (rare) case as not only does the return data in these fields vary greatly, but I'm exporting the same report as a PDF as well (and the requirement here is for it to fit on 8.5 x 11).

The extra rows are an issue as they interfere with users efforts to use vlookup functions or to simply click on a column to get an accurate record count.


Posted By: hilfy
Date Posted: 20 Mar 2019 at 9:26am
The only way I've found around this is to not turn on Can Grow. From there, you don't have to expand the width of the field, it will export to Excel correctly. However, this won't work for your PDF export. You may need to have two versions of the report - one for PDF export and one for Excel export.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: pmjewett
Date Posted: 20 Mar 2019 at 9:42am
Originally posted by hilfy

The only way I've found around this is to not turn on Can Grow. From there, you don't have to expand the width of the field, it will export to Excel correctly. However, this won't work for your PDF export. You may need to have two versions of the report - one for PDF export and one for Excel export.

-Dell


Yep, I was trying to avoid having different versions of the report to maintain. :)

Thank you though.

I didn't hold out much hope there would be an alternative solution but worth a try. Thanks again



Print Page | Close Window