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!

Carriage return, conditional skip line

Status
Not open for further replies.
Jul 13, 2002
36
US
Using CR 9.2, ODBC database:
I have numerical fields that = 1 or 2. I wrote a formula for each of these stating if fld = 1, assign "some kind of text." I am writing a concatenation field with each of these formula fields using chr(13), chr(10), and my goal is that if the field does NOT =1, that line should be skipped. If the user only assigns a 1 to field 2 and 15, those should be the only ones that show up as the final text. My problem is that huge spaces show up between fields with my formula, which looks like this:
{FormulaFld1}+chr(13)+chr(10)+
{FormulaFld2+chr(13)+chr(10)+
{FurmulaFld3 etc.

Any ideas how to get the field to be skipped if it does not=1?

Technonurse-Spokane
 
Build the returns and line feeds into the conditional clause in your formula like this:

(
if fld = 1 then
"ABC"+chr(13)+chr(10)
) +
(
if fld = 2 then
"DEF"+chr(13)+chr(10)
) + //etc.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top