Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Keep Details Sections Together Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Topic: Keep Details Sections Together
    Posted: 01 Aug 2014 at 5:48am
I have a report setup with the following sections (with descriptions):

Report Header - Title Page

Page Header - Suppressed

Details a - Text heading for 'Details b' (i.e. explaining the data contained)

Details b - Details/Statistics

Because 'Details b' has quite a lot of information, and spans over multiple pages, (in a tabular form) it messes with the formatting and, as such, I have two questions:

1) How do I make 'Details a' and the start of 'Details b' be on the same page? Currently I have a bit of text on one page (with a load of white space) and then the detail starts on the next page.

2) As the information spans across multiple pages (which isn't a problem) I'd like to know if it is possible to repeat the table headers on every page (like you can on Word).

Any help is gratefully received.

Regards,
Dr4ke


IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 01 Aug 2014 at 8:57am
1. Go to the Section Expert and turn off "Keep Together" for Details b.

2. Un-suppress your page header and put the column titles there. Then go to the Section Expert for the page header and click on the formula button to the right of "Suppress" (DO NOT check the Suppress checkbox!) and enter the following:

PageNumber = 1

This will suppress the page header on the first page but allow it to display on any additional pages.

-Dell
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 01 Aug 2014 at 8:58am
1) Instead of using Detail A, use a Group Header and uncheck Keep Details Together.

2) If you are using a Group Header instead of Detail A, go into the Group Expert, select the group and click Options. Click the Options tab and check repeat Group Header On Each Page.
|< /\ '][' ( )
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 03 Aug 2014 at 10:07pm
Hi Guys,

Thank you for replying. I should have mentioned, apologies that I didn't, I have used subreports (multiple); the four headings provided were actually just an example of what has been set up.

so 'Details a' still contains the text heading for 'Details b' and 'Details b' contains a sub report of the following:

Report Header - An explanation of what the report shows.

Page Header - The report headers

Details - the report data

I have also un-checked 'Keep Details Together' but the subreport still starts on a new page after 'Details a'
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 04 Aug 2014 at 3:55am
Dealing with subreports is a little different....

1. Right-click on the subreport, Format, and turn off "Keep Together".

2. Make sure that you've turned off "Keep Together" for all of the sections of the subreport.

3. Your column headings from Details A in the main report will NOT ever repeat on subsequent pages. Page headers in the main report don't really work for this either. Instead, since there are no page headers available in subreports, you have to "fake" it. Here's what you would do:

- Delete the column headings from the main report.

- Create a group in the subreport on a field that has only one value throughout the subreport. This can be one of the fields that you use to link the report or it can be a formula that you create in the subreport.

- Make this the outer-most group in the subreport.

- Edit the group and turn on "Repeat Group Header on Every Page".

This will get your column headers on every page.

-Dell
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 04 Aug 2014 at 9:51pm
Hi Hilfy,

Excellent! The first part worked (I have no massive white space); which was the biggest problem.

I don't fully understand the advice to get repeat headers, though? I don't have any fields that have just one value (that are currently in the report)..

Also I think I may have confused the situation in my last post (sorry again!). There are no 'headings' in the main report; Details a is just a text box explaining what Details b is (e.g. "Below is a table showing x, y and z").
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 05 Aug 2014 at 3:12am
The group headers info is for question 2 in your original post:
2) As the information spans across multiple pages (which isn't a problem) I'd like to know if it is possible to repeat the table headers on every page (like you can on Word).


Subreports don't have "page" headers or footers, so the only way to get your table headers repeated on multiple pages is to use a group in the subreport and set it to repeat the header on every page.

Since there is no field that only has one value throughout the subreport, you'll have to create a formula for this. You could use something as simple as this:

{@FakeGroup}
1

Make this the outer-most group in the subreport and put your table headers in the group header.

-Dell
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 05 Aug 2014 at 3:50am
Hi Hilfy,

Excuse my lack of experience with Crystal Reports...

I have created a Formula Field, called 'FakeGroup' (with 1 in the value window) and have selected the 'Insert Group' function in Crystal...

Unfortunately I cannot group on this formula field? Have I completely misunderstood your instructions?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 05 Aug 2014 at 4:09am
I'm working from memory here, without opening Crystal. Try changing the formula from "1" to "CurrentDate" and see if it will let you group on it then.

-Dell
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 05 Aug 2014 at 6:18am
Hi Hilfy,

That didn't seem to work either; however I did find a value to use (I didn't take it into consideration as it wasn't one that was in use on the report).

I grouped it, opened the Format Editor and ticked 'Repeat on Horizontal Pages' and re-uploaded the subreport; but the headings still aren't repeating?

Is there another option I was suppose to chose?
IP IP Logged
Page  of 2 Next >>
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.