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

Simpe formula - Add two string

Status
Not open for further replies.

SueSp

MIS
Jul 26, 2004
39
0
0
US
Hi.

Using CE10/CR10
MSSQL
MS Windows Server 2003

I have a simple report where I am trying to add togther two fields. The report is eventually exported to Excel using the ActiveX Viewer.

This reports two fields come from two different tables as the reult of a left outer join.

Table.field = Order.Cust
Table.field = Cust.Destination

I need to have those two above combined into one field so when exported to Excel they end up on one cell. Everything I do causes multiple cells in Excel.

My formula so far is:
---------
local stringvar cust;
local stringvar dest;
local stringvar both;
if isNull({Order.Cust}) then cust = "" else cust = ToText({Order.Cust});

if isNull({Cust.Destination}) then dest = "" else dest = ToText({Cust.Destination});

both = ToText(cust + dest)
---------

I just keep getting the return value of True.
How the heck do I get this to work!!! Seems so simple!

Thank you.


 
You forgot the colon:

both := cust + dest

If {Order.Cust} and {Cust.Destination} are already strings, you don't need to use the totext function anywhere.

-LB
 
OMG! That's it? Geez. It's the simple things in life...

Thanks a ton.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top