Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: CR v10: subreport data not lining up Post Reply Post New Topic
Author Message
huddy33
Groupie
Groupie


Joined: 23 Apr 2009
Location: United States
Online Status: Offline
Posts: 54
Quote huddy33 Replybullet Topic: CR v10: subreport data not lining up
    Posted: 17 Sep 2009 at 12:48pm
I have a main report showing five fields and a subreport pulling data in from another table.  The subreport is not lining up with the other fields (in the row) and also is very large, making the report five times as long as it should be.  The actual subreport field is the same size as the other fields.  How can I fix this?  Thanks!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Sep 2009 at 3:54pm
So, if I understand you correctly, you're using a subreport to get one or more fields of data to include in a row with other data in the main report.  Correct?
 
If you haven't already done so, try this:
 
1.  Suppress all sections in the subreport except the one that contains your data.
 
2.  In your main report, get the height of the existing fields in the same line (on one - right-click and select "Size and Position").  Make all of the fields in the subreport the same height as the main report.
 
3.  Put the subreport fields at the very top of the section they're in (Y = 0 in the Size and Position screen).
 
4.  Move the bottom border of the section they're in up until it won't move up any more - it will stop at the bottom of the fields.
 
5.  On your main report, make your subreport just a little bit taller than the main report data on the same line.  Make it only as wide as the data it's showing.
 
6.  Place the sub report so that it's top is at most a 10th of an inch above the other fields in your main report.  You'll have to play with the position to get the data to line up.
 
Note: Be aware that if your users want to export to Excel, using a subreport this way may or may not export cleanly.  There may not be anything you can do about this other than finding a way to get your data without the subreport.
 
Note2:  Subreports are slow - it's not recommended to use them on details lines in the main report unless you have a very small set of data because they completely re-query the database every time they have to run to get the data you want.
 
Good luck!
 
-Dell


Edited by hilfy - 17 Sep 2009 at 3:54pm
IP IP Logged
huddy33
Groupie
Groupie


Joined: 23 Apr 2009
Location: United States
Online Status: Offline
Posts: 54
Quote huddy33 Replybullet Posted: 18 Sep 2009 at 5:03am
Thanks, Dell.  I got the fields to line up, but now it is doing something crazy to the row height.  I've set the subreport field to the same height as the rest of the fields (as you suggested), but now the rows are nearly 2" each, when they are set to be .25".  Any ideas?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 18 Sep 2009 at 6:23am
Is every section in the subreport suppressed except the one where you have data?
 
-Dell
IP IP Logged
huddy33
Groupie
Groupie


Joined: 23 Apr 2009
Location: United States
Online Status: Offline
Posts: 54
Quote huddy33 Replybullet Posted: 18 Sep 2009 at 7:08am
Originally posted by hilfy

Is every section in the subreport suppressed except the one where you have data?
 
-Dell


Yes.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.