|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjet.api.FormulaInfo
public class FormulaInfo
The class defines a JReport Formula object. Formulas are objects that are computed at runtime, which allow you to manipulate field data by performing calculations on it. They control the data that will be displayed, and can even create new data not directly available from the database. A formula is a symbolic statement of the manipulations that are to be performed on certain data before it is printed onto your report. For example, if your report contains an @Sales field and an @Cost field, and you want to create an @GrossProfit formula, you can designate its value as @Sales - @Cost. @GrossProfit is a simple formula that tells JReport to subtract the value of the @Cost field from the value of the @Sales field, and then to print the result. Formulas can be used to calculate numeric values, compare one value to another and select alternative actions based on the comparison. Also, they can be used to join multiple text strings into a single string. In general, formulas can be used to:
Notes:
| Constructor Summary | |
|---|---|
FormulaInfo()
Constructor. |
|
FormulaInfo(java.lang.String name,
java.lang.String desc,
java.lang.String expression)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getDescription()
Gets the formula's description. |
java.lang.String |
getExpression()
Gets the formula expression. |
java.lang.String |
getName()
Gets the formula's mapping name. |
void |
setDescription(java.lang.String desc)
Sets the formula's description. |
void |
setExpression(java.lang.String expression)
Sets the formula expression. |
void |
setName(java.lang.String name)
Sets the formula's mapping name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormulaInfo()
public FormulaInfo(java.lang.String name,
java.lang.String desc,
java.lang.String expression)
name - The mapping name of the formula.desc - The description of the formula.expression - The String format of the formula's expression.| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - Formula's mapping name.public java.lang.String getDescription()
public void setDescription(java.lang.String desc)
desc - Formula description text.public java.lang.String getExpression()
public void setExpression(java.lang.String expression)
expression - The formula's expression.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||