views:

139

answers:

2

The title of the question pretty much tells it all.

When using the java SDK provided by Crystal Reports to export a report as an Excel spread-sheet. Although the cells grow even now, only the first line is visible in the export XLS.

In the Crystal Reports UI, this is achieved by setting the 'Grow' option from the Report Export options.

What parameter must be set so that the corresponding cell visibly grows to accomodate large/multi-line text?

A: 

Given the hugely different nature of the 2 formats, exporting to Excel is always tricky. However, I did do a quick test exporting a dummy report from my CR standalone developer version, and replicated & solved your problem.

In your text fields that you want grown, go into the Format Editor->Common and turn on the Can Grow option. It looks like this activates Excel's Wrap Lines option, but unforunately also adds extra rows to make up for it.

PowerUser
Ah. The 'Can Grow' option was already activated. The solution is posted below.
Everyone
A: 

My problem was that the field width was set to the width of the matter it contained. What worked eventually was to have the field-width in Crystal Report set to slightly smaller than the matter it is to contain.

Say, the matter to be written is 'Address Line One'.

Set the field in design view such that only 'Address' is visible. Then set the field to 'Can Grow' with 0 (no-limit) on the number of lines to grow.

When the report is exported to XLS, the cell in XLS will be resized to display the rest of the body.

Everyone