ActiveReports 8 > ActiveReports User Guide > Concepts > Page Report Concepts > Data Visualizers > Icon Set |
The Icon Set data visualization allows you to use arguments to select an image from an image strip and display it either as a TextBox BackgroundImage, or as an Image Value. You can use the standard image strips included with ActiveReports, or create custom image strips.
Standard Image Strips
Name | Image |
---|---|
Checkbox | |
3TrafficLights | |
Arrows | |
Blank | |
Flags | |
GrayArrows | |
Quarters | |
Ratings | |
RedToBlack | |
Signs | |
Symbols1 | |
Symbols2 | |
TrafficLights |
To use these image strips, place code like the following in the BackgroundImage property of a TextBox report control, or in the Value property of an Image report control.
Note: When using icon sets, you must set the Source property to Database. |
You can use static values or any expression that evaluates to a Boolean value. For icon sets with fewer than five icons, set the unused values to False.
=IconSet("Flags", False, True, False, False, False)
Following the Icon Set argument, there are five Boolean arguments. The first argument to evaluate to True displays the corresponding image. Use data expressions that evaluate to a Boolean value to replace the literal values in the code above.
Example
This expression displays the first symbol (the green flag) on each row in which the Difference exceeds 10, displays the second symbol (the yellow flag) on each row in which the quantity is greater than 0, and displays the third symbol (the red flag) on each row in which the quantity is equal to or below 0. Notice that we provide literal False values in the fourth and fifth arguments, which have no images in this strip.
Paste in the BackgroundImage Value property of a Textbox |
Copy Code
|
---|---|
=IconSet("Flags",Fields!Difference.Value > 10,Fields!Difference.Value > 0,Fields!Difference.Value <= 0,False,False)
|
In several of the included image strips, the last spots are empty. When using the Checkbox, 3TrafficLights, Flags, RedToBlack, Signs, Symbols1, Symbols2, or TrafficLights image strip, it generally makes sense to set the Boolean values for all of the unused icon spaces to False.
The Blank image strip is included so that you can customize it. Drop down the section below for details.
Custom image strips
Custom image strips must conform to the following rules.
Here is the syntax for various types of custom images, followed by examples of each.
=IconSet(location of image strip, condition#1, condition#2, condition#3, condition#4, condition#5)
External image path example |
Copy Code
|
---|---|
=IconSet("C:\Images\customstrip.bmp", 4 > 9, 5 > 9, 10 > 9, False, False)
|
External image URL example |
Copy Code
|
---|---|
=IconSet("http://mysite.com/images/customstrip.gif", 4 > 9, 5 > 9, 10 > 9, False, False)
|
=IconSet("res:[Assembly Name]/Resource name", condition#1, condition#2, condition#3, condition#4, condition#5)
Assembly resource image example |
Copy Code
|
---|---|
=IconSet("res:ReportAssembly, Version=1.1.1.1./ReportAssembly.Resources.Images.CustomImage.png", 4 > 9, 5 > 9, 10 > 9, False, False)
|
=IconSet("embeddedImage:ImageName", condition#1, condition#2, condition#3, condition#4, condition#5)
Embedded image example |
Copy Code
|
---|---|
=IconSet("embeddedImage:Grades", Fields!Score.Value >=90, Fields!Score.Value >=80, Fields!Score.Value >=70, Fields!Score.Value >=60, True)
|
=IconSet("theme:ThemeImageName", condition#1, condition#2, condition#3, condition#4, condition#5)
Theme image example |
Copy Code
|
---|---|
=IconSet("theme:Grades", Fields!Score.Value >=90, Fields!Score.Value >=80, Fields!Score.Value >=70, Fields!Score.Value >=60, True)
|
Data Visualizers Dialog
To open the dialog, drop down the BackgroundImage property of a TextBox report control, or the Value property of an Image report control, and select <Data Visualizer...>. To build the data visualizer expression, select the appropriate values for each of the options in the dialog.