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

Keep together with fist record

Status
Not open for further replies.

ryangus

IS-IT--Management
May 19, 2002
14
AU
I want to keep a group together, but if there is room for one record on the bottom of the page, I want begin printing on the bottom of the page. Microsoft Access does this quite well. Does anybody know how to do this?
 
I know about the Keep together function, but I only want to keep the group header together for the first record.

Thanks anyway
 
You can only do that using the Keep Group Together option in Format Section. (Right click the X+2 button, and enter OnFirstRecord).

Be aware that the Keep Together option needs to be turned off in Change Group.

Naith
 
Naith,

Thanks for your help, but unfortunately it did not fix the problem :(

For some reason, I still get a group heading on the bottom of the page with records commencing on the following page. Even by simply selecting Keep Together does not truly keep the group together (shouldn't it start a new page?).

Thanks anyway.

Regards,
Ryan
 
There is another technique where you put a fake details line in the GH by duplicating the detail fields at the bottom of the GH. These will print the values from the first record of each group. Then suppress the first detail of every group (since they are already printing in the GH of each group). This way the GH can't print without one detail. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Ken,

How do I suppress the first detail of every group?

Regards,
Ranga
 
I've managed to suppress only the first record of the whole recordset. Hence, the first instant of the group header shows the first record fine, and the details does not show this record. This works fine.

However, all subsequent instances of the group header show both records.

How do I suppress the first record within each group, rather than the whole recordset?

Regards,
Ranga
 
To suppress the first row of every group in the details use a suppression formula akin to:

{MyTable.MyGroupField} <> previous{{MyTable.MyGroupField})
or
onfirstrecord

This says that if the group is different (hence the 1st), or if it's the first row of the entire recordset, suppress it.

-k kai@informeddatadecisions.com
 
You should probbly reverse them so that you don't hit the NULL:


OnFirstRecord
or
{MyTable.MyGroupField} <> previous{{MyTable.MyGroupField})


Or you can create a group level running total that counts the records in each group, and suppress if the RT = 1. This is sometimes safer when you have multiple group levels.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top