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

Group on concatenating two fields after trimming down the length

Status
Not open for further replies.

mycrystalbaby

Programmer
Jun 16, 2005
42
US
Hi,
I am using CR-X wit SQL 8.0.
I have a report, where two fields are coming from the data base
Building and Data Center, field’s length for each field is 50.
I would like to concatenate these and create a group on top of that.

Building +"->"+Data Center.
It works, but the problem is if the names are two long then the tree preview on the group panel, it looks odd.
Is there a way that, I can trim these down and then concatenate.
I created two formulas for Building and data Center to define the length to 15 and then tried concatenating these.
Concatenation works, but when I crate a group on this formula, it does not work and I get some error
"Group Specified on a non recurring field. Details: Group
Please help.
Thanks
 
Try:

trim(left({table.Building},15)) +"->"+trim(left({table.DataCenter},15))

And please don't state that you tried a formula and not show the attempted formula, it just wastes time.

-k
 
Thanks for the solution and I will make sure not to write the old formula.
Well, it worked but I forgot to mention that, I also wanted to have ... as suffix, whenever it trims down the value.
e.g, if the Building is Newyork and I have trim (left({table.Building},5))
Then it should display Newyor...
 
Newyor is 6 characters, why would a left 5 show 6 characters?



And again you don't show your formula, please, it doesn't take that much effort... I can guess all day long, but youneeed to put some effort forth up front, especiallyl after someone asks with PLEASE!

I wrote "And please don't state that you tried a formula and not show the attempted formula, it just wastes time."

You responded with ?!?!?!?:

"Thanks for the solution and I will make sure not to write the old formula."

Post the formula you tried, please, please, please.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top