Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Combining Text and field in Formula Post Reply Post New Topic
Author Message
lawrenceks
Newbie
Newbie


Joined: 07 Aug 2014
Online Status: Offline
Posts: 6
Quote lawrenceks Replybullet Topic: Combining Text and field in Formula
    Posted: 11 May 2015 at 5:44am
I am trying to include both a text phrase and a field into a formula.

I am using an IF/THEN statement. If a defined field is equal to "SUB" then I want the footer to say both "Text" and the data from the {example.sub} field.


When I try:
IF {field} = "SUB" THEN "Text"
-then "Text" appears in the footer.

When I try:
IF {field} = "SUB" THEN [example.Sub}
-then the example.sub data appers in the footer.

When I try:
IF {field} = "SUB" THEN "Text" {example.Sub}
-I get an error that {example.sub} does not appear to be part of the formula.

When I try:
IF {field} = "SUB" THEN "Text";{example.Sub}
-I only get the example.sub in the footer.

How can I get BOTH of the items I want in the same formula?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 11 May 2015 at 8:18am
Have you tried
IF {field} = "SUB" THEN "Text"+{example.Sub}
IP IP Logged
lawrenceks
Newbie
Newbie


Joined: 07 Aug 2014
Online Status: Offline
Posts: 6
Quote lawrenceks Replybullet Posted: 11 May 2015 at 8:24am
That works. I didn't think about just using the +. Thank you.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.