开发者

How to give style in Crystal Report?

i have a database column.(SQL column)

warning 1) Lütfen dikkatli olunuz.

warning 1) Please be careful.

warning 2) Lütfen detay yazınız

warning 2) Please write detail info.

i want to see it in Crstal Report like that:

wa开发者_如何学Pythonrning 1) Lütfen dikkatli olunuz.

warning 1) Please be careful.

warning 2) Lütfen detay yazınız

warning 2) Please write detail info.


I'm assuming each line is the entire record from the DB? So "warning 1) Please be careful" is the value.

I'm also assuming that every non-english phrase has a corresponding translation immediately afterwards (perhaps you have ordered it that way)

My understanding is that you want the warnings to be bolded, you want the non-english phrase to be bolded, and you want the english phrase to remain normal.

If so, you can split the string into two parts: one for the warning #, the other for the statement.

The first formula will take the first two items in the split result. Place this in the details section, right-click --> format field. Then go to font tab --> style box and choose bold.

The second formula will take the rest of the string. This will be a little trickier, because you will need to specify a condition formula for the style, but it isn't too hard. From your example, I will assume every odd numbered record should be bolded. So you can right-click on the formula object, format field --> font tab --> click on the X-2 next to "style" and then type in

if (recordnumber mod 2 <> 0) then
crBold

Every other line should be bolded now. Note that this only works if the assumptions above are satisfied.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜