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

multiple formulas

Status
Not open for further replies.

jschill2628

Programmer
Nov 3, 2009
156
US
I am working in Crystal reports 2008 version 12. I am trying to extract data for a data conversion. Currently I have the following formula:

if (isnull({IRSCLAIM.MISCA_DESC}) or ({IRSCLAIM.MISCA_DESC}) ='') then "*"
else {IRSCLAIM.MISCA_DESC}

however with this formula it does not take care of the carriage returns or the pipes.

The following formulas that takes care of that, but then according to the vender that need the asterisk in the "last" null fields.

REPLACE(REPLACE(REPLACE({IRSCLAIM.MISCA_DESC},"|",","),CHR(13)," "),CHR(10)," ")

is there anyway to combine these two formulas so we get rid of the null values, pipes and carriage returns?

thank you in advance
 
Use the first formula in the second formula or combine the two like I show below. NOTE: I would set the formula editor to "Use default values for NULLS" instead of "Exceptions for NULLS" to get this to work correctly.

StringVar result := REPLACE(REPLACE(REPLACE({IRSCLAIM.MISCA_DESC},"|",","),CHR(13)," "),CHR(10)," ");
if result = '' then "*" else result


-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top