Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Indenting top record in a subreport Post Reply Post New Topic
Author Message
trentz
Newbie
Newbie
Avatar

Joined: 19 Jun 2012
Location: Australia
Online Status: Offline
Posts: 16
Quote trentz Replybullet Topic: Indenting top record in a subreport
    Posted: 10 Sep 2012 at 2:22pm
I have a report that uses several subreports, each with a short heading, that looks something like this:

SubH1: Record 1 bla bla
       Record 2 bla bla
       Record 3 bla bla

SubHeading2: Record 1 bla bla
             Record 2 bla bla
             Record 3 bla bla

SubH3: Record 1 bla bla
       Record 2 bla bla
       Record 3 bla bla


Note that the heading for the second subreport is longer than the 1st and 3rd. The headings are in the main report. I'd like the subreports to be commonly aligned despite this, ie:


SubH1: Record 1 bla bla
       Record 2 bla bla
       Record 3 bla bla

SubHeading2: Record 1 bla bla
       Record 2 bla bla
       Record 3 bla bla

SubH3: Record 1 bla bla
       Record 2 bla bla
       Record 3 bla bla

Is there a way to achieve this? Also is there a way to get the headings into the subreports and get the same outcome?
A world of unexamined lives is a waste of a world!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 11 Sep 2012 at 8:58am
I don't think that this can be accomplished, as sees the subreport as a block...
 
well maybe on second thought...going with that idea, push the subreport to the back and align it under the heading and with the other subreport.
 
Now the fun, you can either 1) conditionally move all the objects in the subreport OR 2) create a second detail line that is 'indented'
 
Then you only need to conditionally suppress the rows so that only 1 shows at time.  You can probably look at row of the data you're on (but I don't know how to do that off the top of my head) or you can create a flag that a shared variable and gets changed in the suppress routine. something like (for the indented line):
shared booleanvar displayed;
local booleanvar hide := true;
if displayed then (
  hide:=false;
  displayed := false;
);
hide
 
for the regular detail line the suppression would like:
shared booleanvar display;
not display
 
this assumes that the indented row is the top detail row(DetailA) while the regular row is below (DetailB).
 
HTH
 
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.033 seconds.