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

Formatting colors in Formula

Status
Not open for further replies.

zwieback89

Programmer
Mar 8, 2001
42
US
Hi,

I display @AccessType in the details section where the formula is:

if {web_HD_Orders.Vascular_access} = "Fistula" or
{web_HD_Orders.Vascular_access} = "Graft: Natural" or
{web_HD_Orders.Vascular_access} = "Graft: Synthetic" then
{@Fistula}
else
{@Catheter}

where @Fistula is:

"Needle: " + {web_HD_Orders.needle_type} +
" Guage: " + " " + {web_HD_Orders.needle_guage} +
" Length: " + " " + {web_HD_Orders.needle_length};

and @Catheter is:

"Catheter: "+ {web_HD_Orders.catheter_type} +
" Art Lumen: " + " " + cstr({web_HD_Orders.arterial_lumen}) +
" Art Ven: " + " " + cstr({web_HD_Orders.venous_lumen});

How am I to show the labels within quotes in teal and bold and the field values in normal black font ? I have looked into all the examples and they say something like:

if {tablename.fieldname} = "somevalue" then
red
else
black

But this is not the logic I want to follow. Is there a way we can combine different colors as I am showing as one entire label in the details section.

This is confusing to me.
Padmaja.

 
did you try right clicking on the object where the text will be dispalyed.....there's multiple formatting options in there incuding color and font sizes....

How it helps

Peace
Jason
 
Thanks for the tip, Jason. I clicked on Format Object, and under the font tab, I entered teal under the formula button near Font color, and 'crBold' near under the formula button for font style. But when I preview it, my who string is displayed in the same format.

Is there a way where in a particular formula, I show only certain sections of the formula in one color and other contents in another color.

Thanks,
Padmaja.
 
There's probably a way to do it with some code...but I'm not sure how....

one thing you could do is that you could devide the result of your formula in diferent objects....(If only I could show you, i'm not very good with explaning stuff in words)...

..you create one formula field that would have the same formula has if {web_HD_Orders.Vascular_access} = "Fistula" or
{web_HD_Orders.Vascular_access} = "Graft: Natural" or
{web_HD_Orders.Vascular_access} = "Graft: Synthetic" then...

here you put in your new formula field
{@NF}

and

NEw formula has only one section:
"Needle: " + {web_HD_Orders.needle_type}
and then you can modify the fonts and colors by right clicking on this object. After that you can repeat the same procedure with the rest of the items....and then place and resize the objects so they line up....

Hope it helps

Peace
Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top