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!

grouping using specifed order

Status
Not open for further replies.

uksub

Programmer
Jun 15, 2003
51
US
i'm using "specified order" to group some accounting number ranges.

range1 [1000.2999]
range2 [1000.1050]

if the account number falls within both ranges i.e "1005", the account number is only showing up in the first group "range1", and not "both" ranges "range1", and "range2".

how do i get the account number "1005" to show up in both groups?
 
By definition, Grouping simply groups rows retrieved from the database. Thus, it cannot group a single row twice, because there is only one of them. What database field are you grouping on?
 
i'm grouping on the database field "account".
 
I wonder whether what you need is two groups instead of one. Is your range1 actually a higher order group? For example, let's say that that range1 = region, with values 1000 to 2999, representing accounts within the New England region. Your range2 might be cities, where 1000 to 1050 = New York, and 1051 to 2999 = Boston. In other words, since all instances of range 2 are within range 1, should this be treated as a separate group? Summaries would then be calculated at group 1 and group 2 levels.

For group 1:

if {table.field} in 1000 to 2999 then "New England" else "Other"

For group 2:

if {table.field} in 1000 to 1050 then "New York" else
if {table.field} in 1051 to 2999 then "Boston" else
"Other"

Summaries on group 1 will automatically include records from Group 2, so they can be considered to be in "both groups."

-LB

 
You won't get the data to show up in both groups if there's only one row in the table.

A group is designed to demonstrate uniqueness, not duplicate values.

Rather than posting text, try posting example data and expected output, there may be another approach to the need.

-k
 
report currently looks like this...

range1 400001-400999: Written Premium

account numbers:
400002 Booked Premium-Assumed
400002
400002

range2 400001 - 401999: Earned Premium
account numbers:
401002 Chg In UEP- Assumed
401002
401002
-----------------------------------------------------------
should look like this:

range1 400001-400999: Written Premium

account numbers:
400002 Booked Premium-Assumed
400002
400002

range2 400001 - 401999: Earned Premium
account numbers:
400002 Booked Premium-Assumed
400002
400002
401002 Chg In UEP- Assumed
401002
401002


range2 should include both range1 and range2.

the ranges overlap... i'm using "specified order on my grouping. is there another way of doin this?


 
If you want the same detail to appear twice, in two different places, then you really need a subreport. First range in the main report, and the second in the subreport. Which you can create easily by doing a copy of the main report and then importing it when creating the subreport. (This assumes Crystal 8.5.)

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top