cancel
Showing results for 
Search instead for 
Did you mean: 

When changing text interpretation to HTML Crystal reset the font color to black ONLY

borozu
Explorer
0 Kudos

What a stupid software. When text interpretation set to HTML it does default text color to black. Any way to change it?

The text formula field is inserted into text object. And formula field itself and text object have color set but CR completely ignores it.

borozu_0-1711617870566.png

borozu_1-1711617953426.png

 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

JWiseman
Active Contributor
0 Kudos

Hi borozu, on CR2020 sp4 p1 I don't see that behaviour in a simple formula...i.e. the color applied in the Format Field > Font > Color dialogue is not overwritten when HTML Text Interpretation is applied, when there is nothing specified in the formula's style.

 

Perhaps it's something in the desc formula that is causing the issue? Can you post a sample output of from the description formula?

 

The HTML version that is used in that interpretation is fairly simplistic in that it is pretty much limited to things that you can do in a Text Object manual formatting...this in turn can lead to the output not being what the report developer wants.

borozu
Explorer
0 Kudos

Hi JWiseman.

if isNull({V_QUOTE_LINES.CUSTOMER_PART}) or {V_QUOTE_LINES.CUSTOMER_PART} = "" then {V_BI_LASER_QUOTE.DESCRIPTION}
else if NOT(isNull({V_QUOTE_LINES.CUSTOMER_PART})) or NOT({V_QUOTE_LINES.CUSTOMER_PART} = "")
then {V_BI_LASER_QUOTE.DESCRIPTION} + "<br>(<b>YOUR PART NUMBER: </b>" + {V_QUOTE_LINES.CUSTOMER_PART} + ")"

That's the full formula, it's pretty simple.

JWiseman
Active Contributor
0 Kudos

Thanks for the code...that does indeed look like a bug. (The Font style applied to a formula is ignored when the formula, which has HTML Interpretation applied, is added to a Text Object.) As a workaround if you haven't done this already is add a style attribute inside your formula...then "<p style='color:red;'>" + {V_BI_LASER_QUOTE.DESCRIPTION} + "<br>(<b>YOUR PART NUMBER: </b>" + {V_QUOTE_LINES.CUSTOMER_PART} + ")" + ")</p>"

borozu
Explorer
0 Kudos

Hi JWiseman.

Can I use RGB pallete? As when try to do so it goes back to black. As you see I need to make id dark blue: rgb(6,14,98). It works fine with just "color:red"

if isNull({V_QUOTE_LINES.CUSTOMER_PART}) or {V_QUOTE_LINES.CUSTOMER_PART} = "" then "<p style='color:rgb(6,14,98);'>" + {V_BI_LASER_QUOTE.DESCRIPTION}+ "</p>"
else if NOT(isNull({V_QUOTE_LINES.CUSTOMER_PART})) or NOT({V_QUOTE_LINES.CUSTOMER_PART} = "")
then "<p style='color:rgb(6,14,98);'>" + {V_BI_LASER_QUOTE.DESCRIPTION} + "<br>(<b>YOUR PART NUMBER: </b>" + {V_QUOTE_LINES.CUSTOMER_PART} + ")</p>"

 

JWiseman
Active Contributor
0 Kudos

It looks like rgb() doesn't work...hex does. I would have thought that rgb would work as it can be used in all of the conditional format dialogues. In RTF rgb color tables work. Here's a list of what is supported for HTML Interpretation...

 

html
body
div (causes a paragraph break)
tr (causes only a paragraph break; does not preserve column structure of a table)
span
font
p (causes a paragraph break)
br (causes a paragraph break)
h1 (causes a paragraph break, makes the font bold & twice default size)
h2 (causes a paragraph break, makes the font bold & 1.5 times default size)
h3 (causes a paragraph break, makes the font bold & 9/8 default size)
h4 (causes a paragraph break, makes the font bold)
h5 (causes a paragraph break, makes the font bold & 5/6 default size)
h6 (causes a paragraph break, makes the font bold & 5/8 default size)
center
big (increases font size by 2 points)
small (decreases font size by 2 points if it's 8 points or larger)
b
i
s
strike
u

align
face
size
color
font-family
font-size
font-style
font-weight

ul ( bulleted list ) Important Note: The bullet will not show up as a regular size bullet, but as a small dot.
ol ( ordered list )
li ( tag defining a list item used for both list type: ul and ol. )
Important Note: It only support simple list, with no combinaison with other HTML tags within the list.

strong ( bold )

borozu
Explorer

Ok I sorted it out by using standard HTML colour which is MidnightBlue:

 

if isNull({V_QUOTE_LINES.CUSTOMER_PART}) or {V_QUOTE_LINES.CUSTOMER_PART} = "" then "<p style='color:MidnightBlue;'>" + {V_BI_LASER_QUOTE.DESCRIPTION}+ "</p>"
else if NOT(isNull({V_QUOTE_LINES.CUSTOMER_PART})) or NOT({V_QUOTE_LINES.CUSTOMER_PART} = "")
then "<p style='color:MidnightBlue;'>" + {V_BI_LASER_QUOTE.DESCRIPTION} + "<br>(<b>YOUR PART NUMBER: </b>" + {V_QUOTE_LINES.CUSTOMER_PART} + ")</p>"

Answers (0)