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

Grouping data

Status
Not open for further replies.

scclem

Technical User
Jul 10, 2001
21
US
I am putting together a report that contains data for items listed in a catalog. I would like to show the detail level grouped by each distinct page number. As the next highest level of grouping I need to group two pages together and am having difficulties.

Example:

Group = pages 2 & 3
subgroup = page 2
detail
summary page 2
subgroup = page 3
detail
summary page 3
summary pages 2 & 3

etc.

Any suggestions on how to do the main grouping?



 
Create the below formula and then group on it. The grouping will be by even pages being first and then the next page.


if remainder({page},2)=0 then "Pages " + totext({page},0,"") +" and " + totext({Sheet1.page}+1,0,"") else
if remainder({page},2)=1 then "Pages " + totext({page}-1,0,"") +" and " + totext({page},0,"")
 
How about:

Truncate ({page} / 2)

This won't work for display but will group correctly. The display could be anything you like, including:

"Pages " + totext({page},0,"") + " and " + totext({Sheet1.page}+1, 0, "")
Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top