Link to home
Start Free TrialLog in
Avatar of NoorFaz
NoorFaz

asked on

How to display conditional text if it contains reserved keywords and quotation marks.

Hi,
I need to display conditional verbage that contains crystal report reserved keywords (like "or" and "and " and so many others), quotation marks and need to insert field values in between also. How can this be achieved in formula field.

Thanks
Avatar of Mike McCracken
Mike McCracken

I don't follow what your problem is.

Are you trying to create a formula to display text?
"OR"  displays OR
"AND" displays AND

You can use "  "  or '  ' around text so if you have a sentence like

"John's ...."

'John said "there ..."  '

mlmcc
Avatar of NoorFaz

ASKER

Its like
" john said it's going to rain or shine in " + '{table.city}' + " and people will be happy"

In this case we have reserved keyword OR and AND and need to include "'" also as a displayed text.
Thanks
I
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

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
Avatar of NoorFaz

ASKER

Thanks for all the help guys.

I agree with both of you but whenever I'm appending database field to the text, records are disappearing as well as there is no text in the text formula field. Is there any thing else I need to consider while concatenating database field to the text. I have tried using both + and & for appending dynamic data into static text.

Thanks again.
Avatar of NoorFaz

ASKER

Here is a little update I changed the join type between Parent and child table as left outer join instead of inner join. Now my records are unaffected, but still cannot see the formula text field's verbiage when I append the database field.(Although when I right-click on the field and browsed the data I can see the data in the field).
Any thoughts on that please.
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
Avatar of NoorFaz

ASKER

I went into field explorer, right-clicked on database field, choose database expert and clicked the links tab. Selected the join and right-clicked on it to pick different link types.
As I have mentioned I can see the data in the field by browse data option, so this means its not NULL.
Avatar of NoorFaz

ASKER

you are right mlmcc when I inserted that appended field on the report itself, it does not show any data in that field, although I can browse data, wierd.
So I'm not using that particualr field, instead I choose another field thats suppose to carry the information I'm looking for.

Thanks for your patience and dedication.
If the browse option is showing some data, that means that the field sometimes has data in it.  It may be null or blank in the specific records that you're looking at on the report, but some other records have values.

 James