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

Can I force a group break in CR 8.5? 1

Status
Not open for further replies.

mpdinosaur

Programmer
Aug 13, 2003
21
0
0
US
Folks;

I need to be able to force a group break in CR 8.5 if I detect a certain condition in the data. Unfortunately I also need to have the already defined group break in place, too.

The condition I need to detect, is: if ten detail lines have printed, I want to perform the group break. If not, and the group break I've alreay defined happens first, I want it to happen, too.

Hope this adequately defines the problem.

Thanks in advance for your help.

Mike [bigears]
 
Right Click on Format Section in the X+2 box for New Page After Right this


RecordNumber Mod 10 = 0

Or Right a formula that increments a variable each time the detail section is printed and right this formula


Variable Mod 10 = 0

Replace variable with what you created
 
Combine those two conditions. Create running total of records that would reset per group or page -- whatever you need, then go to format detail section and type in the formula for the "New page after" option. The formula would be:
(your running total divisible by 10) OR (your existing page break condition)
 
Thanks for the quick response. Unfortunately, what I need to do is force a group break, not necessarily a page break.

Will the same kind of thing work?

Sorry if these are lame-o questions. I'm still kind of new to CR formulas.

Thanks again.

Mike [bigears]
 
You can simulate group break by inserting extra space between records and repeating group header. Just insert another detail section with all the group header information you need, and then conditionally suppress that extra section unless the condition for a "new" group is true (like every tenth record of whatever you need).
 
Folks;

In case anyone's interested, I figured out my solution.

To refresh you memory: my group header has a bitmap (about 3.5 in. high) which underlays following sections. My group break is by machine. I must print no more than 10 detail lines (products, in this case) over the bitmap. There may be fewer products per machine, but there may be as many as 50. I needed to "force" a group break to re-print the bitmap. Apparently, no can do.

Anyway, here's the solution:

I added another group below the machine group that broke on a field that I knew was different for each record. I copied the bitmap to it and inserted a formula that checked the record count. Unless the count was 11, 21, 31, etc., I supressed the group break. Works like a charm.

Maybe not the fastest way to do it, but what works, works.

Thanks for all your suggestions.

-Mike the Cobol Dinosaur [bigears]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top