Crystal Reports repeats previous groups header together with current header - crystal-reports

I have a report made with Crystal Report 10 that is structured like this:
(Note that this example has 1 page with Value A and 2 pages with Value B)
PAGE 1:
Group Header Value A
(Sub)Group Header with some headings for Group Header Value A
Detail section with values for Group Header Value A
PAGE 2:
Group Header Value B
(Sub)Group Header with some headings for Group Header Value B
Detail section with values for Group Header Value B
PAGE 3:
Group Header Value B
(Sub)Group Header with some headings for Group Header Value B
Detail section with values for Group Header Value B
My problem is that when I fill it with data, it displays as follows:
(The Group Header Value A displays also on PAGE 2, together with Group Header Value B)
PAGE 1:
Group Header Value A
(Sub)Group Header with some headings for Group Header Value A
Detail section with values for Group Header Value A
PAGE 2:
Group Header Value A
Group Header Value B
(Sub)Group Header with some headings for Group Header Value B
Detail section with values for Group Header Value B
PAGE 3:
Group Header Value B
(Sub)Group Header with some headings for Group Header Value B
Detail section with values for Group Header Value B
The PAGE 2 should only display Group Header Value B.
How can I stop Group Header Value A from displaying on PAGE 2?
Thanks
POST-EDIT: I actually found a solution to this issue, although since it may not look like a proper solution, I would like to hear of other ways to solve this issue.
My solution is to do as follows:
1. right-click on the Group Header and select "Section Expert".
2. in "Section Expert", tick the checkbox "Underlay Following Sections". This will place any subsequent header on top (on the z-axis) the first groups headers.
3. make sure that the field used for displaying the Group Header data has a black background (and e.g. white text). This way the new subsequent groups names will fully cover the first groups name.

You have to move GroupHeader into the page header section.
but be sure group must be there. only group header moves to the page header section.
then right click on object and edit formula for display string property.
then put this condition on formula editor.
if ({GroupFiledName} = next ({GroupFiledName}))
then
// if you required group header on each page
{GroupFiledName}
// if you not required group header on each page
''
else
next({GroupFiledName})
try it.. it worked for me.

You have to take the GroupHeaderSection for the subHeader. And supress the GroupHeaderSection With formula DRILLDOWNGROUPLEVEL = 0.
In the GroupHeaderSection you can put the Header details for subreports.
Thus you can get the different header

Related

How will I repeat group header of same group where I only want to repeat the second portion of the group?

Here you can see the report. Here you can see the header that is Material Name and so on. Now I want to repeat that header on each page without repeating the details above the Material Header table.
]4
Here the group by is implemented using one attribute. That is why when I changed the second subgroup to Repeat group header on each page it also keeps repeating the details above the material header table. I want only the material table header to be repeated.
To repeat only a part of a group header there are (at least) two different approaches:
multiple (sub-)header on a group and suppressing the unwanted header
multiple, identical groups, repeating only some of them
To use multiple group header:
Create a group a field (PONo) in your case).
Check Repeat Group Header On Each Page in the Group Options in the Group Expert.
Create group headers for the group (#1a and #1b in your case)
Add a Suppression Formula for the group header that should not repeat (#1a), put InRepeatedGroupHeader in the formula body
This will print both group header when a group is printed first but only group header #1b on following pages.
To use multiple groups:
Create two groups on the same field (Group 1 and 2 on PONo)
Check Repeat Group Header On Each Page only for group 2
This will print both group header when a group is printed first but only group header #2 on following pages.

Repeat group header even after footer bleeds over

My group header is set to repeat on each new page. My details section follows it and the group footer has a subreport. On some pages, the subreport flows onto the next page - so the group header will not display before the rest of the subreport.
How can I display the group header even after a subreport break?
You can do this if you use two groups and place your subreport into the group footer of the second group.
Create a second group (for the same field as used in group one)
Configure group header 1 so that it will be repeated on every page (in group assistent, i don't know the english option name)
use group header 1, suppress group header 2
put the subreport in group footer 2, suppress group header 1
If you subreport bleeds over (in group footer two) group header 1 will be repeated.
Hope this helps.

Crystal reports: how to conditionally suppress sections

I am having difficulty suppressing a group header if another group header is blank/suppressed.
Originally I had a layout as follows:
Group Header a - contains client details
Group Header b - contains a subreport that showed details of the incoming calls from client that were received in the last 24 hours.
If the sub report in group header b was blank (because no calls had been received in the last 24 hours), my report was still showing the client details in group header a.
I can suppress the group header b section if the subreport is blank, but cannot work out how to suppress group header a if group header b is blank/suppressed.
After reading various other discussions, I understood that if you want to suppress a section when a subreport is blank, then the subreport would need to be in a section before the section you want to suppress.
So, I changed my layout as follows:
Group Header a - contains sub report showing details of calls in last 24 hours (sub report is suppressed if blank, and group header a is suppressed if blank)
Group Header b - contains client details
Group Header c - contains same subreport showing calls received in last 24 hours
So what I now need to work out is, how do I suppress group header b and c if group header a is suppressed?!
Any help would be greatfully received.
You will need to check record count of sub report, if it is zero then suppress the group using conditional suppress formula. So basically in your group query somewhere you must have field which keeps the count of records in sub report.
Right Click on section
Section Expert
Suppress No Drill
Click x-2 formula editor
if {count} = 0 then true else false
Where {count} is the field having total records for that group
Hope this helps you!

Crystal Reports: Display a group section always on 2 pages

I have a Crystal Report with only one group section on it. After the last group footer I use “New Page After” in order to start each group on a new Page. The Details section in my group depends on the data that comes from the database, so the whole group can sometime take 1 or 2 pages. Theoretically it can take more than 2 pages too. But with the current data the maximum of pages are 2. The new requirement is now to always use 2 pages for each group even if the data in the group does not require a second page. If this is the case, then the second page should be empty (at least the group part of the page).
How can I achieve this with Crystal Reports?
You can achieve it as:
Split your Group Footer, after which you want a blank page, into two sub-sections e.g. Group Footer a, Group Footer b.
To insert a sub-section: open Section Expert, select Group Footer and then click on Insert button.
Create three Formula Fields named as ffReset, ffIncrement and ffCurrent and set their values as:
ffReset:
WhilePrintingRecords;
numberVar counter:=0;
ffIncrement:
WhilePrintingRecords;
numberVar counter:=counter+1;
ffCurrent:
WhilePrintingRecords;
numbervar counter;
Place ffReset in Group Footer b sub-section and ffIncrement in top level Group Header section
Enable / check New Page After option of both of theses sub-sections (i.e. Group Footer a and b) in Section Expert
Set suppression formula of New Page After for Group Footer b sub-section as:
if {#ffCurrent} < 2 then true
Ensure that Suppress Blank Section is unchecked for Group Footer a and b
If required, to disable insert blank page at the end of the report set suppression formula in New Page After as Not OnLastRecord for Group Footer a sub-section only
To repeat Group Headers on every page you may also need to enable / check Repeat Group Header On Each Page option in Group Expert

crystal report - repeat group header across multiple column

I have a report that has 3 columns and it is grouped by a value that i display in the group header. The report is setup to run down then across.
If the details span across multiple columns, how do I repeat that group header on the next column.
I have already checked "repeat group header on each page" in the group expert.
I have already checked "format groups with multiple column" in the Layout tab of the details section.
It will not let me insert a text object in the group header of each column.
Not sure how to do this. I could write a formula to only show at the top of each column, but not sure if there is a function to find out when the second column has started.
edit
What i want is below
Group Header Text Group Header Text Group Header Text
Detail Values Detail Values Detail Values
Detail Values Detail Values Detail Values
I would like to have the Group Header Text show at the top of each column. Doesn't matter if its the start of a new group or in the middle of the group.
thanks.
okay, I have your solution, the field, that you are grouping by , just place it on to the page header and it will repeat itself on every page until the columns of that group are finished.
Lets say you are grouping by Employee Names, just put the Employee Name field on to the page header and it should solve the issue, I jsut tried it and it worked, thanks.
There is Previous() function available in formulas that allows to show-hide a Text Object based on the change of specific field value from previous to current record.
Is this what are you looking for? Can you edit you question drawing a sample af what you have and what you want?