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!

CR85 Grouping Problem

Status
Not open for further replies.

foxid

MIS
Apr 20, 2007
5
ID
Hi all,

I got a table with a structure :

ID char(10)
Unit_ID char(10)
Name char(60)
Desc nvarchar(600)

with sample data:

001 A01 Andy a very long desc
001 A02 Andy a very long desc
001 A03 Andy a very long desc
002 A04 Lucy blahblah...

the desc is very long so it will grow to more than one line in CR

then i create a report (grouped by ID)

001 Andy A01 desc line 1
desc line 2
desc line 3
desc line 4
A02 <desc suppressed>
A03 <desc suppressed>
002 Lucy A04 blahblah...

is is possible to change it to :

001 Andy A01 desc line 1
A02 desc line 2
A03 desc line 3
desc line 4
002 Lucy A04 blahblah...

thanks...

Deddy
 
To clarify, when there are several detail lines, you would like to share the description between them? But the numbers are variable?

You could have two subreports placed in the ID Group Header or Footer, placed side by side on a single line. One will list the detail records for that ID, the other will show the descripting. Slow and inefficient but easy to code.

The alternative would be to use a lot of sections at detail line level. Suppress those that are not needed for a particular combination of detail lines and description lines Do a running-total distinct count at group level and also a summary distinct count. (If you're not already familiar with Crystal totals, the basics are explained at FAQ767-6524.)
To selectively suppress a section, right-click on the section and choose Section Expert. Choose the formula icon (x+2 and a pencil) for suppression. Enter a formula.
Long descriptions can be split using Mid and also Length to find the total non-blank length.
This method will be slow to code but run very efficiently.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Put the description in the ID group header and then format the group header to "underlay following sections".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top