Java Doc for JRVariable.java in  » Report » jasperreports-2.0.1 » net » sf » jasperreports » engine » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Report » jasperreports 2.0.1 » net.sf.jasperreports.engine 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.sf.jasperreports.engine.JRVariable

All known Subclasses:   net.sf.jasperreports.engine.fill.JRFillVariable,  net.sf.jasperreports.engine.base.JRBaseVariable,
JRVariable
public interface JRVariable (Code)
An interface for implementing classes that deal with report variables. This interface defines constants for names of built-in variables and for reset, increment and calculation types.

When declaring a report group, the engine will automatically create a count variable that will calculate the number of records that make up the current group (number of records processed between group ruptures). The name for this variable comes from the name of the group it corresponds to, suffixed with the "_COUNT" sequence. It can be used like any other report variable, in any report expression (even in the current group expression like you can see done in the "BreakGroup" of the jasper sample).
author:
   Teodor Danciu (teodord@users.sourceforge.net)
version:
   $Id: JRVariable.java 1311 2006-06-23 09:19:26Z teodord $



Field Summary
final public static  byteCALCULATION_AVERAGE
     The value is obtained by calculating the average for the series of values obtained by evaluating the variable's expression for each record in the data source.
final public static  byteCALCULATION_COUNT
     The value is calculated by counting the non-null values of the variable expression with every iteration in the data source.
final public static  byteCALCULATION_DISTINCT_COUNT
     The value is calculated by counting the distinct non-null values of the variable expression with every iteration in the data source.
final public static  byteCALCULATION_FIRST
     The variable keeps the first value and does not increment it on subsequent iterations.
final public static  byteCALCULATION_HIGHEST
     The value of the variable represents the highest in the series of values obtained by evaluating the variable's expression for each data source record.
final public static  byteCALCULATION_LOWEST
     The value of the variable represents the lowest in the series of values obtained by evaluating the variable's expression for each data source record.
final public static  byteCALCULATION_NOTHING
     The value is calculated by simply evaluating the variable expression.
final public static  byteCALCULATION_STANDARD_DEVIATION
     The value is obtained by calculating the standard deviation for the series of values returned by evaluating the variable's expression.

Just like for the variables that calculate the average, the engine creates and uses helper report variables for first obtaining the sum and the count that correspond to your current series of values.

final public static  byteCALCULATION_SUM
     The value is calculated by summing up the values returned by the variable's expression.
final public static  byteCALCULATION_SYSTEM
     The value is not calculated by JasperReports.
final public static  byteCALCULATION_VARIANCE
     The value is obtained by calculating the variance for the series of values returned by evaluating the variable's expression.
final public static  StringCOLUMN_COUNT
     This variable contains the number of records that were processed when generating the current column.
final public static  StringCOLUMN_NUMBER
     Built-in variable containing the current column number.
final public static  StringPAGE_COUNT
     Built-in variable containing the number of records that were processed when generating the current page.
final public static  StringPAGE_NUMBER
     Built-in variable containing the current page number.
final public static  StringREPORT_COUNT
     Built-in variable that contains the total number of records read from the datasource.
final public static  byteRESET_TYPE_COLUMN
     The variable is reinitialized at the beginning of each new column.
final public static  byteRESET_TYPE_GROUP
     The variable is reinitialized every time the group specified by the JRVariable.getResetGroup method breaks.
final public static  byteRESET_TYPE_NONE
     The variable will never be initialized using its initial value expression and will only contain values obtained by evaluating the variable's expression.
final public static  byteRESET_TYPE_PAGE
     The variable is reinitialized at the beginning of each new page.
final public static  byteRESET_TYPE_REPORT
     The variable is initialized only once, at the beginning of the report filling process, with the value returned by the variable's initial value expression.


Method Summary
public  bytegetCalculation()
     Returns the variable calculation type.
public  JRExpressiongetExpression()
     Returns the main expression for this variable.
public  JRGroupgetIncrementGroup()
     Returns the group whose break triggers the variable increment.
public  bytegetIncrementType()
     Returns the variable increment type.
public  ClassgetIncrementerFactoryClass()
     Returns the class of the incrementer factory used for choosing the right incrementer for the variable value.
public  StringgetIncrementerFactoryClassName()
     Returns the string name of the variable value class.
public  JRExpressiongetInitialValueExpression()
     Returns the initial value expression for this variable.
public  StringgetName()
     Returns the name of the variable.
public  JRGroupgetResetGroup()
     Returns the group whose break triggers the variable reset.
public  bytegetResetType()
     Returns the variable reset type.
public  ClassgetValueClass()
     Returns the class of the variable value.
public  StringgetValueClassName()
     Returns the string name of the variable value class.
public  booleanisSystemDefined()
     Returns true if the variable calculation type is system defined.

Field Detail
CALCULATION_AVERAGE
final public static byte CALCULATION_AVERAGE(Code)
The value is obtained by calculating the average for the series of values obtained by evaluating the variable's expression for each record in the data source. Both the main expression and initial expression must have numeric type.

In order to calculate the average, the engine creates behind the scenes a helper report variable that calculates the sum of the values and uses it to calculate the average for those values. This helper sum variable gets its name from the corresponding average variable suffixed with "_SUM" sequence. This helper variable can be used in other report expressions just like any normal variable.




CALCULATION_COUNT
final public static byte CALCULATION_COUNT(Code)
The value is calculated by counting the non-null values of the variable expression with every iteration in the data source. The count variable must be numeric, but the variable expression needs not, since its value is not important. On the other hand, the initial value expression must be numeric since it will be the count variable initial value.



CALCULATION_DISTINCT_COUNT
final public static byte CALCULATION_DISTINCT_COUNT(Code)
The value is calculated by counting the distinct non-null values of the variable expression with every iteration in the data source. The count variable must be numeric, but the variable expression needs not, since its value is not important. On the other hand, the initial value expression must be numeric since it will be the count variable initial value.



CALCULATION_FIRST
final public static byte CALCULATION_FIRST(Code)
The variable keeps the first value and does not increment it on subsequent iterations.



CALCULATION_HIGHEST
final public static byte CALCULATION_HIGHEST(Code)
The value of the variable represents the highest in the series of values obtained by evaluating the variable's expression for each data source record.



CALCULATION_LOWEST
final public static byte CALCULATION_LOWEST(Code)
The value of the variable represents the lowest in the series of values obtained by evaluating the variable's expression for each data source record.



CALCULATION_NOTHING
final public static byte CALCULATION_NOTHING(Code)
The value is calculated by simply evaluating the variable expression.



CALCULATION_STANDARD_DEVIATION
final public static byte CALCULATION_STANDARD_DEVIATION(Code)
The value is obtained by calculating the standard deviation for the series of values returned by evaluating the variable's expression.

Just like for the variables that calculate the average, the engine creates and uses helper report variables for first obtaining the sum and the count that correspond to your current series of values. The name for those helper variables that are created behind the scenes is obtained by suffixing the user variable with the "_SUM" or "_COUNT" suffix and they can be used in other report expressions like any other report variable.

For variables that calculate the standard deviation, there is always a helper variable present, that first calculates the variance for the series of values and it has the "_VARIANCE" suffix added to its name.




CALCULATION_SUM
final public static byte CALCULATION_SUM(Code)
The value is calculated by summing up the values returned by the variable's expression. Both the main expression and initial expression must have numeric type.



CALCULATION_SYSTEM
final public static byte CALCULATION_SYSTEM(Code)
The value is not calculated by JasperReports. The user must calculate the value of the variable, almost certainly using the scriptlets functionality. For this type of calculation, the only thing the engine does is to conserve the value users have calculated, from one iteration in the data source to the next.



CALCULATION_VARIANCE
final public static byte CALCULATION_VARIANCE(Code)
The value is obtained by calculating the variance for the series of values returned by evaluating the variable's expression.



COLUMN_COUNT
final public static String COLUMN_COUNT(Code)
This variable contains the number of records that were processed when generating the current column.



COLUMN_NUMBER
final public static String COLUMN_NUMBER(Code)
Built-in variable containing the current column number.



PAGE_COUNT
final public static String PAGE_COUNT(Code)
Built-in variable containing the number of records that were processed when generating the current page.



PAGE_NUMBER
final public static String PAGE_NUMBER(Code)
Built-in variable containing the current page number. At the end of the report filling process, it will contain the total number of pages for the resulting document.



REPORT_COUNT
final public static String REPORT_COUNT(Code)
Built-in variable that contains the total number of records read from the datasource. After finishing iterating throught the datasource, it will contain the total number of records that were processed.



RESET_TYPE_COLUMN
final public static byte RESET_TYPE_COLUMN(Code)
The variable is reinitialized at the beginning of each new column.



RESET_TYPE_GROUP
final public static byte RESET_TYPE_GROUP(Code)
The variable is reinitialized every time the group specified by the JRVariable.getResetGroup method breaks.



RESET_TYPE_NONE
final public static byte RESET_TYPE_NONE(Code)
The variable will never be initialized using its initial value expression and will only contain values obtained by evaluating the variable's expression.



RESET_TYPE_PAGE
final public static byte RESET_TYPE_PAGE(Code)
The variable is reinitialized at the beginning of each new page.



RESET_TYPE_REPORT
final public static byte RESET_TYPE_REPORT(Code)
The variable is initialized only once, at the beginning of the report filling process, with the value returned by the variable's initial value expression.





Method Detail
getCalculation
public byte getCalculation()(Code)
Returns the variable calculation type. This value must be one of the calculation constants declared in this class.



getExpression
public JRExpression getExpression()(Code)
Returns the main expression for this variable. The expression must be numeric for certain calculation types. a JRExpression instance containing the expression.



getIncrementGroup
public JRGroup getIncrementGroup()(Code)
Returns the group whose break triggers the variable increment. Only used when JRVariable.getIncrementType returns JRVariable.RESET_TYPE_GROUP .



getIncrementType
public byte getIncrementType()(Code)
Returns the variable increment type. This value must be one of the reset type constants declared in this class, since the increment type uses the same constants as the reset type.



getIncrementerFactoryClass
public Class getIncrementerFactoryClass()(Code)
Returns the class of the incrementer factory used for choosing the right incrementer for the variable value. the Class instance of the incrementer factory
See Also:   net.sf.jasperreports.engine.fill.JRIncrementer
See Also:   net.sf.jasperreports.engine.fill.JRIncrementerFactory



getIncrementerFactoryClassName
public String getIncrementerFactoryClassName()(Code)
Returns the string name of the variable value class.



getInitialValueExpression
public JRExpression getInitialValueExpression()(Code)
Returns the initial value expression for this variable. The expression must be numeric for certain calculation types. a JRExpression instance containing the initial expression.



getName
public String getName()(Code)
Returns the name of the variable. Since all variables are stored in a map, the variable names are the keys in the map. a string containing the variable name



getResetGroup
public JRGroup getResetGroup()(Code)
Returns the group whose break triggers the variable reset. Only used when JRVariable.getResetType returns JRVariable.RESET_TYPE_GROUP .



getResetType
public byte getResetType()(Code)
Returns the variable reset type. This value must be one of the reset type constants declared in this class.



getValueClass
public Class getValueClass()(Code)
Returns the class of the variable value. Any class is allowed as long as it is in the classpath at compile and run time. a Class instance representing the variable value class



getValueClassName
public String getValueClassName()(Code)
Returns the string name of the variable value class.



isSystemDefined
public boolean isSystemDefined()(Code)
Returns true if the variable calculation type is system defined.
See Also:   JRVariable.CALCULATION_SYSTEM



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.