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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Header Issues

Status
Not open for further replies.

SarahS81

Programmer
Mar 18, 2004
19
AU
Hello..

I'm sure this should be an easy one but i just cannot get it right..I am usin CR 9 and have a report that has one group header and the details section is supressed. All the information is in the group footer...the group header contains the labels for each of my columns, as the report footer contains some graphs that occasionally appear on the last page by themselves so i cannot put my column labels in the page header (i then have lines all through my graphs on the last pages)...I want the group header only to appear once on each page that there are instances of the footer section on...I can't get this to work for me. I tried placing a counter in the group header (that resets in each page header) and then supressing the header when the counter <> 1..it sort of works in that the group header only appears once on ech page, but I get one footer section above the header on my pages (except the first page). I tried the keep group together flag and the keep section together flag but these are not working for me..I have a feeling the placement of my counter in the group header has something to do with it but I am stuck!!..any help would be appreciated!
 
Why don't you move your column labels into the page header and then suppress the group header?

You can suppress the page header on the last page conditionally ot get around the chart on the last page.

Go to Format, Section.
Higlight the Page Footer section.
Click the X+2 button next to Suppress (No Drill Down).
Enter this line in the editor, then Save and Close.

onlastrecord;

~Brian
 
Thankyou..but the problem is sometimes the charts appear by themselves on the last page and sometimes they are preceeded by the data that requires the labels to be displayed - this solution doesn't cater for this does it?
 
Brian's suggestion makes sense.

Your statement that charts appear by themselves does not.

And which footer do you mean by "I want the group header only to appear once on each page that there are instances of the footer section"? You have a report footer, group footer and a page footer.

Whatever criteria is used to make charts appear by themselves can be used to suppress the page header on the last page if that is the intent.

You can also use a new page after or before to help in this.

Do you have the repeat group header on each page turned on?

Overall the posting is too vague, try stating the requirements in technical terms.

-k
 
Can you explain what you mean by:

"...as the report footer contains some graphs that occasionally appear on the last page by themselves so i cannot put my column labels in the page header (i then have lines all through my graphs on the last pages)..."

Specifically, I'm wondering what the lines refer to.

-LB
 
Without second guessing you further, you could place your fields above the chart in the group footer (and report footer, if you want the fields to appear there), and then use a reset formula in the page header, the counter in the group footer, and then select all of the fields and use format->field->suppress with counter <> 1. That should work the way you want.

-LB
 
..sorry I am new to CR and still trying to pick things up..my report format is as follows:=

page header - supressed
gh1 - contains column labels
details - supressed
gf1 - contains summary info on each group
rfa - subreport
rfb - charts
rfc - charts

synapsevampire - i an talking about the group footer.
Because there are three report footers pending how far down my last gf1 falls down the page then sometimes all the rfs fit on the one page or sometimes the there may be spit between the second last and last pages.. if my column labels and seperating lines are in the page header then i get the seperating lines extending all the way down each page (even though they do not extend to the page footer or the report footer - the lines end inthe group footer)..so i need my labels in the group header..

LB are you suggesting i have the column labels in the group footer with my data and supress except when its the first instance on a page?..wont i then have to deal with blank space?..shouldnt the same concept work with the labels and counter in the group header and supressing it when the counter <>1? why do i get one footer appearing above my first header on each page when i do this (as explained in my original post)?
 
If you place the fields in the group header and you have the group formatted with "Repeat Group Header on Each Page", you will not get a repeating group header on a page that only has group footers, unless you also check "Keep Group Together" (report->change group expert->options). If you have both of these checked, your method still will not work if you try to use conditional section suppression on the group header. But if you select the group header fields and enter your field suppression formula (format field->common->suppress->x+2), your suppression formula should work appropriately:

whileprintingrecords;
numbervar counter <> 1;

This assumes you have:

//{@reset} in the page header:
whileprintingrecords;
numbervar counter := 0;

//{@counter} in the GH:
whileprintingrecords;
numbervar counter := counter + 1;

At least this is what I found when testing here.

However, I got the same, correct results if I DID use group suppression on the GH as long as I placed the reset formula in BOTH the page header and the page footer. I can't really explain why this is the case.

I have also had the experience you've had with a footer appearing above a group header--but I can't remember what the cirucumstances were or how I fixed it, unfortunately. But try one of the above and see if that helps.

-LB
 
Sarah,

Using the page header for the column headers should work without causing "lines through the chart". Is it possible these mysterious lines are caused by accidently turning on 'UnderLay Following Section'?

In any case, assuming we can't use the page header section (an assumption that doesn't sit well with me because it keeps the lines mystery unsolved), here's a simple alternative approach:

1. Insert a new Group based on a formula that returns a constant (for example, '1'). This would create Group Level 2.

2. Drag GH2 above GH1 to swap the group levels. Your old Group Level 1 would now become Group Level 2 within the new constant Group Level 1.

3. Place your Column Headers in GH1 and turn on the option to Repeat group header on each page.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I think it make sense to separate physically the graphs from the data.
Yousay that at the end of the report, the charts are on one page except when the data leave room on the before last page.
I think you can always put your graphs separetly, even when the data leave space. Just check new page before on the RFa or RFb following your policy to separate the final subreport from the graphs or not.

For the labels you have to put them in the page header and hide the GH.
To prevent the page header to exist on the page of the graphs or even for the page of the subreport, you have to suppress it on the last page and even on the page with the subreport. As you have put a newPageBefore in the RF, you can test 'not onLastRecord' to achieve this

Before making this check carefully to suppress all test or other test that have consequencies on the report appearence.
For this maybe it will be more convenient to recreate the sections from scratch!

--------------------------------------------------
[highlight]Django[/highlight] [thumbsup]
bug exterminator
tips'n tricks addict
 
Thanks LB - very much appreciated, I'll see how I go this morning with your suggestion!

Ido - thanks. Adding a higher grouping level such as this was my last resort, because I will be working with CR fulltime from here on in I thought I'd search out the proper way to resolve this rather than working around it this way. I agree, something strange is happening with my seperating lines - I'm not sure whether it's my inexperience and I've done something blindingly obvious incorrect, or whether this is just the way the program behaves. I am pretty well read on all the options for/within groups - ie keep together, repeat header on each page, keep section together and keep group together...using combinations of these that should work hasn't been successful. 'Underlay following section' is definitely not selected.

Any recommendations on good reference material for more advanced material on working with sections??
 
Yes, looking for the "proper way to resolve this" is the correct approach but that, as I mentioned above, brings us back to those "lines"...

Can you describe in more detail those "lines"? What exactly do they look like? How many of them? Do they look like a line that was actually placed anywhere on the report? If so, where (which section)?

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Sorry I thought the lines issue was sort of irrelevant now - they are my dividing lines seperating the columns in my report. They currently run from gh1 to gf1a and are fine (appearing correctly) as I have my column labels in gh1. When I had my labels in the page header they ran from the page header to gf1a. When I had the last of my three report footer sections appear on the last page of the report by itself (happens regularly pending which parameters are selected and the length of report varies), as you would expect I got a page header appearing on this last page. However these seperating lines went from the page header all through the whole page. I can not supress the page header on the last page because the length of the report varies and sometimes the gf1b is on the last page (which requires the label at the top of the page). It is a specific request of the client that the report footer does not take a new page for itself. Hence I have the labels in my gh1 and I am supressing them except when it is the first header on the page, ie counter<>1

Using a counter and supressing in this way is now working for me - with a reset of the counter in both the page header and page footer..thankyou!!..Although one more issue has presented itself - even though there is room on the second last page of my report, the last line of data (which is my last instance of gf1a) is always on the last page of my report with the report footer - just one line of data on the very last page although the second last page has half a page of empty space at the bottom. There is definitely no supression formula for the take new page before or after property for any sections...has anyone seen unusual behaviour such as this before?
 
I believe you could cut those lines into 2 parts (vertical lines in the page header, and vertical lines in GF1). This would provide another solution.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Yeah - I have used this method in other reports but because of having no definite criteria for supressing the page header on the last page I opted for the group header.

Thanks for your help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top