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!

Report Help

Status
Not open for further replies.

joshiss

MIS
Jan 22, 2007
1
US
Here's what I am trying to do.

I have a table that contains the following information

ACCT# Documents
123 Doc1
123 Doc2
456 Doc1
456 Doc2
789 Doc1
789 Doc2
789 Doc3
789 Doc4

I want a report that will show me all accounts that do not have Doc4 and for accts that do not contain Doc4, show me what docs are available.

For example, the results I am looking for would be the following:
123 Doc1
123 Doc2
456 Doc1
456 Doc2

Any ideas are appreciated.
 
On the basis of the data you show, this could be done by grouping on ACCT#, using a summary total for "Documents" and suppressing those where it is Doc4.

This method would fail if there was a Doc5, of course. Another method would be to use a running total for records with Doc4 and show / suppress the group footer. But you seemed to want to show the details and that would not be possible without a subreport, very slow and inefficient.

If you're not already familiar with Crystal's automated totals, see FAQ767-6524.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Create a formula {@hasdoc4}:

if {table.documents} = "Doc4" then 1

Insert a group on {table.acct#} and then go to report->selection formula->GROUP and enter:

sum({hasdoc4},{table.acct#}) = 0

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top