Link to home
Start Free TrialLog in
Avatar of bgbissell
bgbissell

asked on

Can you put a Text Object within a Text Object in Crystal?

Can you put a Text Object within a Text Object?

I have several database fields, but I'll use 3 for an example: Make, Model, Color.

Each of the fields is in its own Text Box with a header  like "Make:  {database.Make}."  The Text Box is suppressed so if there is a null value (i.e., no Make), nothing in the Make text box would print.  If I hadn't used the text box, and  the Make was null it would still print "Make:"    with a blank for where the Make name would go (if there were one). [the Bold print has nothing to do with it, just added it for clarity].

So, if all the elements are there it looks like this:

Make:  Chevy        Model:   Impala       Color:  Silver

If the Make has no value, it looks like
                               Model:   Impala       Color:  Silver      

I want it to look like
Model:  Impala        Color: Silver

So i thought I could put all 3 text boxes into one (bigger) text box.  I'm not finding that possible.  Is it?  And if so, what do I need to do?

Thanks!
SOLUTION
Avatar of Kurt Reinhardt
Kurt Reinhardt
Flag of United States of America image

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
ASKER CERTIFIED SOLUTION
Avatar of vasto
vasto
Flag of United States of America image

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
Which means ... that you can add one text box into another by dragging it
Sorry, you can add field or formula to a text box. You will be still not able to drag text box created from the insert menu into another text box
Avatar of James0628
James0628

Just to add a little explanation to what the others posted, your Make formula, for example, might look like this:

if IsNull ({make field}) or {make field} = "" then
  ""
else
  "Make: " + {make field} + " "


 As Kurt mentioned, you can't easily format the parts of a formula differently, so putting "Make:" in bold and the Make field in a regular font, as in your first post, would be a problem.  It sounds like you don't actually want the values formatted that way, but, FWIW, depending on the formatting, you might be able to do it using HTML or RTF formatting.  You'd add the codes to the formula and then set the "Text Interpretation" for the field accordingly.

 James
Avatar of bgbissell

ASKER

The formulas work.  Thanks!

BUT it turns out I do want to bold the value (Chevy, Lumina, etc). Makes it easier to read.

James, I'm only a little familiar with  HTML or RTF formatting (meaning, I'd need help!) and I have no idea what your suggestion (You'd add the codes to the formula and then set the "Text Interpretation" for the field accordingly)  means. LOL
However, I'd like to try because I think having the value as bold improves the report's readability.  Is it something you can tell me how to do?
Thanks!
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
You could also create 3 formulas, 1 for each part you want to display.  
You can then put them in the text object and even format each individually

mlmcc

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.