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

Weird Problem

Status
Not open for further replies.

harding1031

Programmer
Oct 21, 2004
65
0
0
US
CR v 9.0
I have a grouped report that have multiple pages per group. I only want to print the first page of each group.
I used "pagenumber<>1" to suppress all subsequent pages, almost works fine. The problem is when I put this formula for suppression of GF1, only the first group prints, when I remove the formula, a blank page with only the GF1 prints after each 1st page of the group. I also set the "newpage after" in the GF1 section to reset page number after each complete group.

I want my output to look like below for each group.
GH1
GH2
detail(one page)
GF2
GF1
 
When you say "I only want to print the 1st page of each group", can explain this? Most likely this can be done in another way.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
I remember your earlier post where you said there were hundreds of pages per group, but you only wanted to show the first page. The pagenumber <> 1 solution (mine) doesn't work, when I test it, but I see now that you want to show the group footer--which wouldn't appear unless you were only suppressing detail records.

Also I'm not sure whether you want to show one page per group#1/group#2 combination either, but I think you should try the following: Create a running total {#cntwingrp} using the running total expert where you choose a recurring field, count, evaluate for each record, reset on change of group (#1 or #2, depending upon whether you want one page for each Group #1 or Group #2). Then go to the section expert->details->suppress->x+2 and enter:

{#cntwingrp} > 40 //pick the number that will result in only one page of details with group footer and header sections.

-LB
 
Makes sense.

Try using a different method:

Group header formula:
whileprintingrecords;
numbervar CurrPage := pagenumber;

Now in all subsequent sections that you wish to suppress use the following formula:

whileprintingrecords;
numbervar CurrPage;
Currpage<>pagenumber

It should now suppress if the page number isn't the same as the page number for the group header.

-k
 
OK, for each group printed there will be about of 100 pages per group. I have about 3 groups-about 300 pages. I want to print only the first page of each group - 3 pages total printed. For example
grp header 1
page1(print)
page2(suppress)
...suppress rest of pages
grp footer 1
grp header 2
page1(print)
page2(suppress)
...suppress rest of pages
grp footer 2
 
The key question is why are you getting 300 pages in the first place? Please post example data, table relationships and expected output.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Thanks guys, you all are great!!! I am going to try this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top