shahabas sageer
shahabas sageer

Reputation: 241

how to split and change the font style of a crystal report element?

we are having a report generated using crystal report While generating we have a request to have a checkbox with a list of items. The checkbox is only available in the Wingdings font. Since we are using Arial font for the list items we can not change the font of the formula field through which we are showing the list. Eg: [] task1 [x] task2

we need to split each list item and replace the square brackets with checkbox form the wingdings font.

how can we create a formula for this in crystal report?

Upvotes: 0

Views: 1507

Answers (2)

MatSnow
MatSnow

Reputation: 7517

Without using HTML or RTF Text interpretation, Crystal Reports can't display two fonts in one formula field, but it is possible with a Text Object.

  • Create two formulas, one with the checkmark and one with the item-text.
  • Drag & drop the formula-fields into an empty text object.

Now you can format the two formula fields independently of each other but inside the same field.

Upvotes: 0

shahabas sageer
shahabas sageer

Reputation: 241

I found a way

  1. Create a formula with this code:

stringvar MYARRAY:= Replace ({Notes1},"[]" , '< font face = "wingdings" >'&chr(254)&'< /font>'); stringVar MYARRAY1 := ' '+Replace (MYARRAY,"|" ,' < br> ); MYARRAY1;

  1. Drag and drop this field on the report > right-click the field > Format Field > Paragraph tab > Under "Text Interpretation" select "HTML Text".

Upvotes: 1

Related Questions