views:

122

answers:

3

Hello All,

I am having an issue is that while exporting a report to excel sheet, there are lots of spaces and empty cells between the data, as well as, the cells are merged.

Is there is a way to export the report and each field will be in a cell ot to control that exportation, suppose my report looks like this:

No Trans_No

1 123

2 333

In my excel sheet, I would like

A B

No Trans_No

1 123

2 333 , But currently it is showing a merging of the cells and spaces , so instead of Trans_No will be in CELL B, it is in D.

So, is there is a way to control o export that?

A: 

If you are finding empty rows between your data, you can filter these out in Excel:

  • Select column
  • Data > Filter (Excel 2010)
  • Dropdown > uncheck 'Blanks'

I don't use Crystal Reports, but could you export to a CSV file, then import into Excel. The import will allow you to specify the delimiters and should format your data better.

Edward Leno
Edward, Crystal Reports lets you export your report to Excel. But it's an imperfect conversion that leaves alot of gaps and such.
PowerUser
The problem is also that there are some merged cells which can't easily be figured out.
mohs
The merged cells are probably due to fields which aren't perfectly aligned with each other and the same size.
PowerUser
+1  A: 
PowerUser
Hello PowerUser, yes I will export the report to excel and then a machine will read the values. The problem is that my report is very complex and lots of formulas and subreports which can not be done directly. While exporting to CSV file the name of the formulas and subreport formula name will be at the beginning and then the data. So what do you suggest?
mohs
Make 2 versions of this Crystal Report: 1 for human eyes and 1 for machine reading. Then you can simplify the machine read-version and strip it down to just the fields you want. This can probably be done, you just need to put some work into revising your format.
PowerUser
A: 

From experience with exporting from older versions of Crystal to Excel, a couple of options:

(1) Export to CSV and open the CSV file in Excel.

This had the disadvantage that instead of appearing at the top of the report above the data values, the column headings would appear on every line of the output before the column values - like so:

No   Trans_No   1   123
No   Trans_No   2   333

This issue may have been resolved in CR XI - if not, the workround we used for this was to suppress column headings (so that only the values were included in the output), then copy and paste a standard spreadsheet heading for the report into the output in Excel.

(2) Consistently format all fields to the same, minimum size (typically, two grid widths), with columns aligned by snapping the left edge of fields to guidelines.

This produces output which is almost unreadable in the standard report viewer, but which should align correctly in Excel.

Mark Bannister
I will try your method. The need of exporting is because the exported data will be loaded and must be in an excel sheet
mohs
@mohs: good luck!
Mark Bannister