Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Keeping multiple detail sections together Post Reply Post New Topic
Author Message
LaurenNY
Newbie
Newbie
Avatar

Joined: 15 Feb 2013
Online Status: Offline
Posts: 10
Quote LaurenNY Replybullet Topic: Keeping multiple detail sections together
    Posted: 28 Oct 2013 at 8:42am
Hi all,

I have a report with Detail sections A through F. Is there any way of forcing sections to stick together? As an example, I would like to force section C to always move with section D to the next page if it can't fit both on the same page.

Is this possible?

Lauren
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 29 Oct 2013 at 12:27am
Hi
 
Have you tried by checking ' Keep Together' option in section expart  ?
 
If that is not working out, you may have to write a formula to club two details into one.  After making this formula right click on that formula and go in common tab and check you have 'Keep Object Toget' is checked.
 
Thanks,
Sastry
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 29 Oct 2013 at 4:42am
I have found that the Keep Together in the section expert doesn't work as I would like.

If you go into the Group (I right click on the group and select Change Grouping) then go to one of the tabs (I think that there are only 2) and select Keep Together on this tab that the report performs as I expect it to...which I think is what you are after.

HTH
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 30 Oct 2013 at 1:56am
Hi HTH
 
You are right when we have a group in our report.  If you don't have any groups and you want to keep only detail lines together, then there is no option other than using keep together in section expert.
 
Please correct me if I am wrong.
 
 
Thanks,
Sastry
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 30 Oct 2013 at 4:50am
Keep together only really works with groups...
You can keep a group together (or at least try), but if there is no group, there is nothing for Crystal to 'anchor' the details on. If the report is longer than 1 page, it has to break...if a group is longer than 1 page it has to break...

So if there is no group, what is there to 'Keep Together'?

My only point really was that if I don't check the 'Keep Together' in the Group Expert, then it doesn't seem to work. The option in the Section Expert just doesn't seem to work...for a group or not.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Oct 2013 at 7:07am

My understanding of the 'Keep together' is that I have to look only at what it is referencing and only that, not what I "think or want it to reference".

I also pay close attention to how 'keep together' is set to all of the objects inside another object (like a memo/string field in a detail section)

All of the Keep together options in the Section Expert are referencing only that particular 'band' or 'row'. I believe it also only references the preset height of that band as it is set in the design. It does not account for fields that 'can grow'. So it only 'Keeps Together' for a predefined height.

It sometimes appears to account for growing but it is more about how you set the 'keep together' option on the "growing" field that resides in the section and it is handling that requirement/setting.

An example of this is setting a detail the height of one single line of text and having it set to 'Keep Together' in the section expert.
Place a memo/string field in it with Can Grow as true and have it so it expands the field to a height more than the one print row.

If you set this to memo field as 'keep together' you will see new pages start to keep from breaking up the memo field. This seems like it is keeping the detail section together but I think it is only keping the memo field togther.
If you set the memo field to not keep together (uncheck the box) you will see that the detail section is not kept together because the memo field will straddle pages.


If you were to expand the height of the detail section (in the report design) to be more along the lines of 5 text rows and none of your memo field ever expand past 4 rows, the 'keep togther on the detail section will 'seem to work' because it is keeping it together based on the height of the actual detail in the design not the expanding memo field.

This is just my testing and what I could garner from it, definately not decisive.



Edited by DBlank - 30 Oct 2013 at 7:10am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 30 Oct 2013 at 7:32am
Interesting insight.

I think that I will agree with DBlank's assessment, and that the Keep Together in each object/band is a flag to display that object/band on the same page.

When a group is created, we have the option of making this new 'object'(which a group of bands) display on one page. Which is an extension of DBlank's observations.

So going back to the original post, which in retrospect I misunderstood, I think that the answer is No, you cannot force a group of detail bands to 'Keep Together' if there is outer force that contains them ie a Group.

Each detail band is Keeping Together by printing on the same the page, but there is no mechanism to force all the related detail bands to stay on the same page.

Hopefully, clearer than mud

IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 30 Oct 2013 at 8:13am
i assume that you have different fields on details sections
something like
details C somename
details D somedescribtin
you could try to concatenate this fields together
then group on the new field
then in group options choose keep together.
but first you need to figure out group hierarchy to not to miss any data.
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.031 seconds.