Link to home
Start Free TrialLog in
Avatar of Amour22015
Amour22015

asked on

Crystal Reports 2008 - First position in field is " "

Hi and thanks,

I have this code:
If {TEMP_PWC_Sales_Report_SP_MAIN.OwnerAddress} > "" Then
Left({TEMP_PWC_Sales_Report_SP_MAIN.OwnerAddress}, Instr({TEMP_PWC_Sales_Report_SP_MAIN.OwnerAddress}, " ") -1)
Else "";

This works fine until there is a bland in the first position of the field Example:

|1234 Church Street| <== this works fine and gives me |1234|
| 1234 Church Street| <=== This give me a return that is blank

Also:
I would like to find the formula for:
|1234 Church Street| = |Church Street|

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Jared_S
Jared_S

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nasir Razzaq
Should

If {TEMP_PWC_Sales_Report_SP_MAIN.OwnerAddress} > "" Then

not be

If {TEMP_PWC_Sales_Report_SP_MAIN.OwnerAddress} <> "" Then
Avatar of Mike McCracken
Mike McCracken

Does the text always have the | | around it or did you add those for clarity?

mlmcc
Avatar of Amour22015

ASKER

mlmcc,
added || for clarity
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for all your help...