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!

Combining Records

Status
Not open for further replies.

Goosetown

Technical User
May 26, 2004
8
CA
Hello all,
First of all I want to thank everyone in this forum. It's the most helpful forum I've ever participated in. Again, thank you so much.

I have a field that returns discreet records such as:

NEGATIVE
POSITIVE
INDETERMINATE

or
1+
2+
3+
4+

The number of records is not constant nor is the format. It can be a number or a string.

Is there any way that I can combine the records into one field so that:

NEGATIVE
POSITIVE
INDETERMINATE

would be combined into NEGATIVE POSITIVE INDETERMINATE (as one field)

Or

1+
2+
3+
4+

would be combined into 1+ 2+ 3+ 4+ (as one field) ?

Thanks for any information. Again, this is a great forum.

Goosetown
 
First, the field isn't a string or a number, what is contained within it might be used as a number, but the format +1 means that it's a string.

You might use some formula to concantenate the different strings based on length into 2 different fields by using something like:

whileprintingrecords;
stringvar longvalues;
stringvar shortvalues;
if len({table.field}) < 5 then
shortvalues:=shortvalues+{table.field}+" "
else
longvalues:=longvalues+{table.field}+" ";

Now you can display these values later using:

whileprintingrecords;
stringvar longvalues

and

whileprintingrecords;
stringvar shortvalues

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top