Print Page | Close Window

Keep Together not working

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7076
Printed Date: 29 Apr 2024 at 9:59pm


Topic: Keep Together not working
Posted By: samirlogin
Subject: Keep Together not working
Date Posted: 17 Jul 2009 at 9:36am

Hi Friends,
I created five detail sections and set property Keep Together for all detail section. But Sometime 2 detail section displayed at first page and remaining 3 detail sections displayed at second page.
I want all five detail section on same page either first or second.

Please help me.
- Sam




Replies:
Posted By: hilfy
Date Posted: 20 Jul 2009 at 8:01pm
Keep Together applies to each section, not to all of the details sections together.
 
Do you have any groups?  Have you turned on Keep Together for the inner-most group?  That will keep all of the detail sections together.
 
-Dell


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


Posted By: samirlogin
Date Posted: 21 Jul 2009 at 9:30am
If we create a Group and keep togther now towking from below setting.
Not Working (Report->Section Expert->Select Group and enable Keep togther)
 
 
Working(Report->Group Expert->Select Grop and Oprions->Select Option Tab->Enable Keep Togther)
- Sam


Posted By: fwayner
Date Posted: 26 Nov 2009 at 12:37pm
I have found that both methods listed for "Keep together" work the same for me.
What I really want is "Keep with next".
I'm using Group Header 1 for the name, Group Header 2 for a 1 line sub-heading and Group Header 2 for a long paragraph. I never want the Name or the name and subheading to appear on 1 page and the paragraph start on the next.
I've tried lots of grouping options and the only one I've come up with is to use a subreport and that is limited by the "no nested subreports" problem/feature.
Anything else I can try?


Posted By: Leon52
Date Posted: 26 Jan 2011 at 10:22am
Ok I have a work around which may work for some people depending on what you need to do.

You need to Put your group heading 1 into group heading 2, suppress group heading 1.
Then go to section expert - group heading 2 and insert a SQL field that will turn off and on the "Supress(no drill down)".

I cannot give you the SQL for the SQL expression field because I dont know your database but it will be like something below:

select min({grouped item])
from table table_min
and table_min.field = table.field

The trick is to get first value of group1.

In your Suppress field formula you want to test it against itself and return true false.
E.g.
Case when @SQLExpressionField = [grouped item] then false else true end

Your new group heading 2 should only show at the start of each group1.

Then you make sure your keep together is ticked inside group heading 2 and the whole group will stick together and move to another page carrying the heading with it if it is bigger than a page.

Very hard to explain but it works.


Posted By: fwayner
Date Posted: 26 May 2011 at 9:58am
Ahhh. Finally found the answer I was looking for:

1. Click the group you want kept together, in my case, Group Header #2, right click the group and choose Change Group.
2. click to the Options tab and
3. tick Keep Group Together.




Print Page | Close Window