开发者

How to show different icons in Crystal reports depending on the field value?

开发者 https://www.devze.com 2023-01-01 09:48 出处:网络
We are using Crystal Report 12 in one of our projects. Currently I need to create report template which should show different icons开发者_开发知识库 based on the some field value.

We are using Crystal Report 12 in one of our projects. Currently I need to create report template which should show different icons开发者_开发知识库 based on the some field value. That field contains a number, storing some kind of status and I have several icons corresponding some statuses.

At the moment I can't figure out how to implement such a thing in Crystal Reports designer.

Could someone please help me?


Showing and hiding graphical objects in CR based on a formula is almost exactly like showing and hiding text labels based on certain criteria.

First, you need to add each icon to your report detail section by choosing the Insert menu, and then select Picture...

Once all your icons are inserted, you will need to edit the suppression formula by right-clicking on each icon and choosing Format Graphic. On the first tab of the Format Editor, you have a Suppress option just like you do for other report objects. Click on the formula button next to Suppress to add a suppression formula to the icon describing when it should be shown or hidden.


I was also searching for the similar solution and this helped me. These steps works.

To display a particular picture, based on a column value, right click on picture> Format Graphic> Suppress (do not check) And write formula, for example ColorCode= '110'

(Based on column name ColorCode if column value is '110' I am displaying the picture)

0

精彩评论

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

关注公众号