TOPIC: Exporting report to Excel 97-2000 (XLS)

Exporting report to Excel 97-2000 (XLS) 03 Jan 2014 17:16 #1504

  • RonMoses
  • RonMoses's Avatar
  • Offline
I'm having a problem with one of my Crystal reports. This report exports cleanly to Excel 97-2000 (XLS) out of CR XI R2. When run from Logicity, the columns are all screwed up. Some of the column headers in the report header section are spanning two columns, and it's throwing off the entire report. I don't understand why this happens in Logicity and not in Crystal. It also didn't happen in our previous automation software, which we recently abandoned for Logicity.

I've attached the rpt file in case anyone's interested.

thanks,
ron
Attachments:
Last Edit: 03 Jan 2014 17:18 by RonMoses.
The administrator has disabled public write access.

Exporting report to Excel 97-2000 (XLS) 06 Jan 2014 13:35 #1506

  • RonMoses
  • RonMoses's Avatar
  • Offline
I have a better idea what's happening now, but I still don't have a solution. There is a "Middle Name" column that is often blank. The export is shifting all the columns to the right of this field to fill the empty space, thereby screwing up the columns.

Again, this does not happen in Crystal. I suspect there are export options that could resolve this, but unfortunately Logicity offers no additional options when exporting, apart from the general format.

I also tried exporting to csv to see if that would help, but the csv export doesn't do anything. I get an empty file every time.
The administrator has disabled public write access.

Exporting report to Excel 97-2000 (XLS) 06 Jan 2014 14:18 #1508

  • aellis
  • aellis's Avatar
  • Offline
Hey Ron,

Logicity does have support for export formats in Pro (on the Start Menu / Logicity there is a link for Export Format Options where you can tweak settings per export type). Unfortunately I am not seeing a setting jump out that seems like it would fix this. If you are not seeing this behavior in CR XI R2 then there must be a difference in the way this works in between that version and CR 2008 (which Logicity is built on). Can you have your report maybe use a formula for the Middle Name column and have it throw a single blank space if it is blank to see if that maybe resolves it?

Regards,
Adam
The administrator has disabled public write access.
The following user(s) said Thank You: RonMoses

Exporting report to Excel 97-2000 (XLS) 06 Jan 2014 14:21 #1509

  • RonMoses
  • RonMoses's Avatar
  • Offline
Thanks aellis, I was actually about to post that exact thing. Creating a formula out of the middle name did the trick. Thank you!

ron
The administrator has disabled public write access.

Exporting report to Excel 97-2000 (XLS) 17 Mar 2016 14:46 #2176

  • Elwam
  • Elwam's Avatar
  • Offline
For anyone else who's having this problem and doesn't want to create a formula for every field that could possible have a blank value, the answer is indeed in the Export Format Options. I opened the file and scrolled to <Excel> then <ExcelAreaType>. Mine was originally set to 0 which means Invalid (why should this be the default?). I changed it to 255 for whole report and this seemed to fix the problem. My Excel exported reports now match the Crystal version perfectly. Also, I discovered that changing the setting <ShowGridLines> to True caused the Excel reports to now have gridlines. This has been something that has annoyed me for ages, so I'm very pleased to now have user friendly Excel reports! I have pasted the Excel portion of the code that I changed below.

P.S. I'm using Crystal Reports 2013 and Logicity Professional 1.8.8
<Excel>
    <ConvertDateValuesToString>False</ConvertDateValuesToString>
    <ExcelAreaGroupNumber>0</ExcelAreaGroupNumber>
    <ExcelAreaType>255</ExcelAreaType> <!-- 0=Invalid, 1=ReportHeader, 2=PageHeader, 3=GroupHeader, 4=Detail, 5=GroupFooter, 7=PageFooter, 8=ReportFooter, 255=WholeReport-->
    <ExcelConstantColumnWidth>36</ExcelConstantColumnWidth>
    <ExcelTabHasColumnHeadings>False</ExcelTabHasColumnHeadings>
    <ExcelUseConstantColumnWidth>False</ExcelUseConstantColumnWidth>
    <ExportPageBreaksForEachPage>False</ExportPageBreaksForEachPage>
    <ExportPageHeadersAndFooters>1</ExportPageHeadersAndFooters> <!-- 0=None, 1=OncePerReport, 2=OnEachPage-->
    <FirstPageNumber>1</FirstPageNumber>
    <LastPageNumber>999</LastPageNumber>
    <ShowGridLines>True</ShowGridLines>
    <UsePageRange>False</UsePageRange>
  </Excel>
The administrator has disabled public write access.

Exporting report to Excel 97-2000 (XLS) 09 May 2016 15:36 #2250

  • RonMoses
  • RonMoses's Avatar
  • Offline
I had to dig this thread up again after upgrading to the latest version, as apparently the formats.xml file gets overwritten. Hey devs, if you could maybe not overwrite that file, or at least make a backup of the existing file first, that would be greatly appreciated. This is just the sort of thing that makes me nervous about installing new Logicity versions.
The administrator has disabled public write access.

Exporting report to Excel 97-2000 (XLS) 10 May 2016 14:24 #2253

  • eremington
  • eremington's Avatar
  • Offline
Definitely! I replied to your other post but I will make sure to pass this along to the developers to see what we can do to eliminate the issue.

We always appreciate the feedback...keep it coming!

-Eli
The administrator has disabled public write access.