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!

Text summary operation

Status
Not open for further replies.

victorthomas

Programmer
Nov 26, 2003
12
US
Here is my issue:

In the details section I have a bunch of last names displayed, some lastnames have been displayed as all caps ucase() or all lowercase lcase() based on a certain if...then condition.

An example result set in the details section looks like this:

THOMAS
THOMAS
thomas
THOMAS
THOMAS

I want to summarize this result set so that if there is ever a lcase() result, the entire result set is summarized into a group header as just lcase() ie. "thomas" instead of "THOMAS". I have tried the maximum() & minimum() summary operators (in the Insert Summary GUI). That did not work for me!!

Any Ideas anyone? Your input will be very appreciated!

Thanx
 
Let me get this straight...if one value is lower case you want the group header to be lower case...

Show us the layout of your report from a grouping point of view....is this value a grouped field??

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Thanks for the reply!

I misstated the original question. The summary field GUI does work but it seems unable to tell the difference between the strings "thomas" and "THOMAS" using the maximum and minimum group summary operators.

So the summary operator only returns "THOMAS" as the summarized field in the group header.

I came up with a work around. Instead of the if...then statement returning lcase(string) or ucase(string), it assigns a numerical value of zero or a one.

I then pass the numerical value zero or one to another formula which will use those values to assing lcase(string) or ucase(string).

Slows things down a little bit but I'm fast approaching my deadline.

Thanks again for your prompt reply!
 
First, go to file->report options and uncheck "Case Insensitive SQL Data." Then group on a formula {@groupname}:

uppercase({table.name}) //this will cause lower and uppercase names to group together

Next create a formula {@islowercase} for the details section:

if lowercase({table.name}) = {table.name} then 1 else 0

Then create a second formula {@haslowercase}:

if sum({@islowercase},{table.name}) > 0 then lowercase({table.name}) else {table.name}

Remove {@groupname} from the group header and replace it with {@haslowercase}.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top