i-net Clear Reports

What does the forecolor and the backcolor on an report element?

All values for colors (border-, fore- and backcolor) use the ABGR color model which represents the colors with 32bit integer numbers. That means that the first 8bits are used for the alpha component, the second 8bits for the blue component, the third 8bits for the green component and last 8bits for the red component read from right to left (i.e. soft red 0x007F7FFF, red 0x000000FF or RDC.COLOR_RED or 255). In class “RDC” constants are defined for the common 16 colors, see API doc.

Section and Area

A section or an area supports background color only. Background color is the color the whole area or section is filled with. You can set the background color with the methods “setBackColor” or “setBackColorFormula” in class “com.inet.report.Area” or “com.inet.report.Section” if you want to set the color depending on runtime-values. The use of a formula to set the background color can result in different background colors for each Area or Section.

Field Element

A field element supports two kinds of colors, one for the border and one for the background.

  1. border colorTo set the border color will result in a colored border around the embedded labels, if border is enabled. Set the border color with inherited method “setForeColor” (from “com.inet.report.Element”) or with method “setForeColorFormula”, if you want to change the border color at runtime with a formula.
  2. background colorTo set the background color of a field element use methods “setBackColor” and “setBackColorFormula” inherited from “com.inet.report.Element”.

Note: The color of the embedded static or dynamic labels can only be set using methods in “com.inet.report.TextPart” and “com.inet.report.FieldPart”, see next item.

Text, Paragraph, TextPart, FieldPart

A Text is a container for paragraphs, which is why it only supports border color and background color. You can set these with methods “setForeColor” and “setBackColor” or “setForeColorFormula” and “setBackColorFormula”.

A paragraph supports no color, it is a container for text parts and field parts.

The TextPart and the FieldPart elements represents the text of the labels, so you have to change the font color of labels here. Use methods “setFontColor” and “setFontColorFormula” in “com.inet.report.TextPart” and “com.inet.report.FieldPart”.

Line and Box

Lines support only one color - the border color. To set the border color use the methods “setForeColor” and “setForeColorFormula” inherited from “com.inet.report.Element”.

Boxes supports two kinds of color - the border color (see Line) and the background color. You can set the background color with methods “setBackColor” and “setBackColorFormula”.

Sub report

Sub reports support three kinds of color properties. We have to distinguish sub reports with on demand and sub reports without.

  1. Sub report with on demand The border color property draws a line around the sub report in the specified color. The background color property fills the rectangle shown instead of the sub report with the specified color. The font color property draws the labeling text in the specified color. Use methods “setBackColor”, “setForeColor” and “setFontColor” or “setBackColorFormula”, “setForeColorFormula” and “setFontColorFormula”.
  2. Subreport without on demandThe border color property draws the border of the subreport in the specified color. The background color property draws the background of the whole subreport in the specified color. The font color property has no effects. Use methods “setBackColor” and “setForeColor” or “setBackColorFormula” and “setForeColorFormula”.

Database Picture

A database picture supports the background color property and the border color property. You can set the properties with methods “setBackColor” and “setBackColorFormula” and with “setForeColor” and “setForeColorFormula”.

Chart

The color of a chart is determined by the chart style property which you can set with the method “setStyle” in class “com.inet.report.Chart”.

Cross tab

You can set the color properties of each single field and text element of the cross table. Setting a style for the whole table is not supported by RDC, but you can set the background color for each column and row with method “setBackColor” inherited from “com.inet.report.Element” and the colors of the FieldElements in cross table with methods of class “FieldElement”.


i-net software strives to provide accurate product documentation. Please give us your feedback using the form below.
NOTE: This form is for documentation feedback only. For technical assistance, please send an email to clearreports@inetsoftware.de.

 

© Copyright 1996 - 2012, i-net software; All Rights Reserved.