Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Problem in Exporting Crystal Sub-report to Excel Post Reply Post New Topic
Author Message
tenzinbhuthi
Newbie
Newbie
Avatar

Joined: 02 Nov 2008
Location: India
Online Status: Offline
Posts: 7
Quote tenzinbhuthi Replybullet Topic: Problem in Exporting Crystal Sub-report to Excel
     Posted: 03 Nov 2008 at 11:45pm
Hi all,
I have an export issue while downloading a crystal sub-report in MS-Excel(data only and with guidelines).
Say I have  data corresponding to main report columns C1, C2 , C3 as a,b & c and data corresponding to sub report columns Sub1,Sub2 are d & e and f,g correspond to columns C6 and C7 which are again from main report .
While exporting this to Excel, (data only format), the problem is the data for sub-report is getting displayed in the next line and the data for the columns from main report following it is getting displayed in the line after it starting from the first sub-report column
 
                
C1           C2          C3       Sub1     Sub2     C6    C7  
 a              b            c                                    
 
 d              e
 
                                            f            g        
 
 
Please help
Tenzin Bhutia
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 04 Nov 2008 at 1:40am
Hi,
This is a bug in Crystal Report which needs to be fixed,the workaround is
either get all the fields data in single report using SQL Subqueries or Joins or
Create the Main report fields in SubReport i.e. all the main report fields will be linked to subreports as Parameters ,then use that parameters in your subreport to display entire data.
 
So you will have all your data coming from subreport including the subreport data ........
 
Cheers
Rahul
IP IP Logged
tenzinbhuthi
Newbie
Newbie
Avatar

Joined: 02 Nov 2008
Location: India
Online Status: Offline
Posts: 7
Quote tenzinbhuthi Replybullet Posted: 04 Nov 2008 at 2:23am

Hi Rahul,

Thank you so much for the solutions.
Is there any other way we can do this because these will affect the earlier reports design.
 
Thank you once again!!
Tenzin Bhutia
IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 04 Nov 2008 at 3:09am
is the subreport printed on the same line of the main report?
Thanks
Savan
IP IP Logged
tenzinbhuthi
Newbie
Newbie
Avatar

Joined: 02 Nov 2008
Location: India
Online Status: Offline
Posts: 7
Quote tenzinbhuthi Replybullet Posted: 04 Nov 2008 at 3:44am
Hi Savan,
Yes the sub-report is printed on the same line.
 
 
Thanks


Edited by tenzinbhuthi - 04 Nov 2008 at 3:44am
Tenzin Bhutia
IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 04 Nov 2008 at 4:22am

ok while exporting the report to excel, you have a report export option, there you can set the width of columns of excel based on the width of column from a particular section of report i.e page header section, detail section etc.

so what you have to do is the set the same width for all the columns in all the section of the reports.
 
place the headings for the data dispalyed in subreport also in the main report and supress the page header in the subreport.
 
now in report export option for excel select the section based on which u want the wdith columns in excel.
 
one more care to be taken is dont leave space between the columns in the report, so as to avoid blank columns in excel.
Thanks
Savan
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum