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

How to ignore/delete if records are double?

Status
Not open for further replies.

OLTU

Technical User
Feb 14, 2005
39
NL
Hi,

I'm using Cryst. version 8.5

I'm trying to delete/ignore the one of the double records
in my report.

Example;

(Text)
Name1 Name2 Name3 Name4 Name5
-----------------------------------
(details)
A B C D E
A F C D E
G B C H I
A B C D E (This is double record
which I am trying to ignore this in my report.

This because I don't want to sum or count the record if
I have a double line.(With double line, I mean
all the Name records must be the same)

Thanks,MHP
 
You can add this to the Suppress option on the detail Section>Click the X-1 button

If Previous ({Name1}) = {Name} Then
true
Else
false

Name1 being your field



Mo
 
Create a Formula Field that combines the five names. Group using this field. Suppress details and Group Header, and put the record details into the footer.

For counting, use a running total that counts once per group.

You haven't said what order the records should appear in. If it were account number, say, then you'd need to have account number as another higher group.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Sorry I totally Mixed up the row value for the Field value








Mo
 
Mo,

My field isn't always the same, this change every day
from the database.

One day is "A" as record 123456 the other day is "A" 125436,
and the same with rest fields, so I think the solution

If Previous ({Name1}) = {Name}Then
true
Else
false
will not help because {Name} will change anyway.



Madawk,

One of the five names is always a number field (Quantity) and the rest are letter fields.

I already tried to group these but when I'm trying to count or sum the records I get again the qty from the record +
the rest.
By the way, what do you mean with "Create a Formula Field that combines the five names" can you give me an example
for this formula?

Thanks,
Murat,.
 
you can alway convert the numebr field to text
like
totext({Field})
and if have decimaldo a
replace(totext({Field}),'.00','')

you can then use this as Madawk has suggested or you can use it in the Previous formula

Mo
 
Sorry I forgot to paste the top part of my text

Formula = ({Field1}) + {Field2}+ {Field3}




Mo
 
Crystal syntax for concatenating the fields would be:

{table.string1} + {table.string2} + {table.string3} + {table.string4} + totext({table.qty},0,"")

Group on this formula and then use the running total expert. Choose {table.qty}, sum, evaluate on change of group (this formula), reset never.

You probably don't really need {table.qty} in the formula, unless the there can be multiple quantities per group.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top