Print Page | Close Window

Exporting to Excel with subreports

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=18372
Printed Date: 29 Apr 2024 at 1:37am


Topic: Exporting to Excel with subreports
Posted By: duprekk
Subject: Exporting to Excel with subreports
Date Posted: 04 Jan 2013 at 11:41am
I have the need to export my Crystal XI report that contains three subreports (all in the Details section) to a .csv or Excel file.
 
The info in the subreports, after opening in Excel, appears on a separate row just beneath the main report data row.
 
I need all the info in the Details section to be on one line once it is in Excel (just like it would be if I viewed it in Crystal Reports).
 
I've tried several different export formats - all do something similar.
 
I tried the Find/Replace Line Break suggestion found on this forums, but Excel 2010 can't find a Line Break in that worksheet.
 
Are there other ideas I should try?
 
Thank you in advance for any assistance you can give!
 
KKD



Replies:
Posted By: hilfy
Date Posted: 28 Jan 2013 at 6:39am
If I understand you correctly, you have a subreport that returns some piece of data on the same line as other data in your main report.  Is that correct?
 
The Excel exports in Crystal are really picky about formatting.  Here's what I would try:
 
1.  In the subreport, suppress all sections except the one that contains your data.
2.  In the subreport, go to File>Page Setup and set ALL of the margins to 0.
3.  In the main report, turn off the borders on the subreport. 
4.  In the main report, set the location of the top of the subreport to be the same as other data on the line.  If you have column headers, set the location of the left of the subreport to be the same as the column header that it is under.
5.  In the main report, set the height of the subreport to be the same as the other data in the section where it's located.
 
I can't guarantee that this will work, but I believe it will.
 
-Dell


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



Print Page | Close Window