Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

headings in group header 1

Status
Not open for further replies.

sameer11

Programmer
Jun 17, 2003
89
US
Is there a way in CR to suppress the heading in the group header section from repeating for every group value.
I tried to do this in the GH section format
enabled suppress @ groupnumber > 1

to some extent it works, but how can I print the heading on everypage of the report. I don't want to use the headings in the page header.
I have also checked the option in the group expert for repeat on everypage.

Any advices please.......

Thanks,
Sameer
 
If you use groupnumber > 1 in the format section->group header->suppress->X+2 section, the group header will only print on those pages where there are some detail records for the first instance of the group. It sounds like you want it to print once per page.

What is your reluctance to use the page header? You can insert another page header section_b so that there are two sections, and then put your group headings either in page header_a or page_header_b, with your page headings in the remaining page header section.

If this doesn't help, maybe you could provide a little more information about your requirements.

-LB
 
I have created the report using the page header intial but after looking the report my users wanted some changes int he format that is why I don't want to use page header and trying to use group header. Here is the format for How it looked before(1) and how my users want it(2).
(1)
PH-
unit description account description totals lastupdate
-----------------------------------------------------------
gh1-group1-id group1 description
gh2-group2-id group2 description
gh3-group3-id group3 description
xxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxx 999999 mmddyyyy
xxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxx 999999 mmddyyyy
xxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxx 999999 mmddyyyy
xxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxx 999999 mmddyyyy
----------------------------------------------------------


(2)
gh1-group1-id group1 description
gh2-group2-id group2 description
gh3-group3-id group3 description
-----------------------------------------------------------
unit description account description totals lastupdate
-----------------------------------------------------------
xxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxx 999999 mmddyyyy
xxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxx 999999 mmddyyyy
xxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxx 999999 mmddyyyy
xxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxx 999999 mmddyyyy
-----------------------------------------------------------
yyyy yyyyyyyyyyy yyyyyyy yyyyyyyyyyy 999999 mmddyyyy
yyyy yyyyyyyyyyy yyyyyyy yyyyyyyyyyy 999999 mmddyyyy
yyyy yyyyyyyyyyy yyyyyyy yyyyyyyyyyy 999999 mmddyyyy
yyyy yyyyyyyyyyy yyyyyyy yyyyyyyyyyy 999999 mmddyyyy
----------------------------------------------------------


Is it possible to do this way
 
This should work:

Insert a Group#3b section and place the "page header" fields here. Go to report->change group expert->Group3->Options and check "Repeat group header on each page." Then create two formulas:

{@pagereset} should be placed in the page header and suppressed:

whileprintingrecords;
numbervar grpcnt := 0;

{@grpcnt} should be placed in the Group#3b header and suppressed:

whileprintingrecords;
numbervar grpcnt;

if onfirstrecord or
{table.group3field} = previous({table.group3field}) then grpcnt := 1 else
if {table.group3field} <> previous ({table.group3field}) then grpcnt := 1 + grpcnt;

Then go to format section->Group #3b Header->suppress->X+2 and enter:

{@grpcnt} <> 1

This will give you a &quot;page header&quot; (once per page) in a repeating group header section.

-LB
 
how can I do the same thing if in a subreport because there is no &quot;page header&quot;. where can i place this

{@pagereset} should be placed in the page header and Suppressed:


Thanks for your help
Sameer
 
The following should work in a subreport and is based on establishing a set number of records per page. In the formulas below, replace &quot;25&quot; with a number that works for you:

Make sure you have &quot;Repeat group header on each page&quot; checked.

Create a second group section_b for the &quot;page headers&quot; and add the fields. Then create the following formula {@resetgrpno} to be placed in the details section of the subreport:

whileprintingrecords;
numbervar grpcnt;
if remainder(recordnumber, 25) = 0 then grpcnt := 0 else grpcnt;

Then create a second formula {@grpcnt} to be placed in the group header_b section:

whileprintingrecords;
numbervar grpcnt;
if not onfirstrecord and
{yourgroupfield} <> previous({yourgroupfield}) then
grpcnt := 1 + grpcnt else
grpcnt := 1;
grpcnt;

Then go to format section and suppress the report header, and conditionally suppress the group header_a and _b sections with: {@grpcnt} <> 1

In the details section, check &quot;new page after&quot; and in the x+2 area enter:

remainder(recordnumber,25) = 0

Suppress the group footer sections.

-LB
 
Dear Friends ,
I have opted the same technique but the other change I want in my case is that the group header is getting repeated in its child group also after clicking . how can the same be supresses in thsi example scenario. I dont have repeat grup header on every page enabled.

thanks


vijkid

 
I have the same problem but the diff is I dont want the group header on every page, where as when i click on group one i go to group 2 and the group header 1 is displayed there. for non repetition I have divided the group 1 to two parts a and b and condiiton i have put in section 1 is supress when groupnumber > 1 . but this is getting displayed in the child section also,

any suggestions

vijkid
 
Hi lbass

I just used your suggestions for suppressing group headers - it worked perfectly, saved me a lot of time.

Many thanks,

John
 
Group Header question...
CR 8.5, Access db. I am grouping on a formula. The formula simply creates a group name (text) based on ranges of values calculated in another formula. The problem I have is that if there are no instances of data in the range of any of the group names, the group name header does not print.

Example:
Would like to see:
Group Name: Count
<10 days 455
11-15 days 0
>15 days 333

But Crystal spits out:
<10 days 455
>15 days 333

Any help would be greatly appreciated.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top