Java Doc for Report.java in  » Report » datavision-1.1.0 » jimm » datavision » 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 » datavision 1.1.0 » jimm.datavision 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   jimm.datavision.Report

All known Subclasses:   jimm.datavision.Subreport,
Report
public class Report implements Nameable,Writeable(Code)
A report holds data source information, accepts parameters from the user, runs a query, and uses a layout engine to format the output. It may contain many different sections, each of which can contain logic for surpressing itself.
author:
   Jim Menard, jimm@io.com


Field Summary
final protected static  doubleOUTPUT_DTD_VERSION
    
final public static  StringXML_ENCODING_ATTRIBUTE
     The string to write at the top of an XML file in the XML decl.
final public static  StringXML_JAVA_ENCODING
     The string to use when reading and writing XML files.
protected  CollectionaggregateFields
    
protected  booleanaskedForParameters
    
protected  Stringauthor
    
protected  booleancaseSensitiveDatabaseNames
     Flag for Database data sources.
protected  DataSourcedataSource
    
protected  StringdatabasePassword
    
protected  FielddefaultField
     This field holds default format, border, and bounds values for all fields.
protected  Stringdescription
    
protected  SectionAreadetails
    
protected  HashMapformulas
    
protected  ArrayListgroups
    
protected  LayoutEnginelayoutEngine
    
protected  Stringname
    
protected  SectionAreapageFooters
    
protected  SectionAreapageHeaders
    
protected  PaperFormatpaperFormat
    
protected  ParameterReaderparamReader
    
protected  TreeMapparameters
    
protected  booleanparametersHaveValues
    
protected  booleanparamsSetManually
    
protected  SectionAreareportFooters
    
protected  SectionAreareportHeaders
    
protected  DataCursorrset
    
protected  Scriptingscripting
    
protected  FormulastartFormula
    
protected  HashMapsubreports
    
protected  Stringtitle
    
protected  HashMapusercols
    

Constructor Summary
public  Report()
     Constructs an empty report.

Method Summary
public  voidadd(Object obj)
     Figure out what obj is and add it.
public  voidaddFormula(Formula f)
    
public  voidaddGroup(Group g)
    
public  voidaddParameter(Parameter p)
    
public  voidaddSubreport(Subreport sub)
    
public  voidaddUserColumn(UserColumn uc)
    
protected  voidaskForDataSourceFile()
     Asks the user for a data source file if necessary.
protected  voidaskForParameters()
     Asks the user for parameter values.
public  voidaskForPassword(Database db)
     Sets a database's user name and password.
public  booleancaseSensitiveDatabaseNames()
     Returns the value of the caseSensitiveDatabaseNames flag.
protected  voidcollectAggregateFields()
     Collects all aggregate fields and lets each one initialize itself.
protected  ListcollectUsedParameters()
     Returns a list of all the parameters actually used in the report.
public  ObjectcolumnValue(Selectable selectable)
     Returns the current value of the specified selectable.
public  booleancontains(Section s)
     Returns true if this report contains the specified section.
public  booleancontains(Field f)
     Returns true if the specified field exists within this report.
public  booleancontainsReferenceTo(Field f)
     Returns true if the specified field exists within this report either directly (as a field) or indirectly (as a formula used by a aggregate, parameter, user column, or another formula).
public  booleancontainsReferenceTo(Formula f)
     Returns true if the specified formula exists within this report either directly (as a formula field) or indirectly (as a formula used by a aggregate or by another formula).
public  booleancontainsReferenceTo(UserColumn uc)
     Returns true if the specified user column exists within this report either directly (as a user column field) or indirectly (inside a aggregate or formula).
public  booleancontainsReferenceTo(Parameter p)
     Returns true if the specified parameter exists within this report either directly (as a parameter field) or indirectly (as a parameter used by a aggregate or by another parameter or in the query's where clause).
public  intcountGroups()
    
public  SectionAreadetails()
    
public  Objecteval(String language, String evalString, String displayName)
     Evaluates an evalString using language and returns the results.
public  voidevaluateFormulasIn(Section s)
     Evalues the formulas in the specified section.
public  ColumnfindColumn(String id)
     Given an id (a column name), returns the column that has that id.
public  FieldfindField(Object id)
     Given an id, returns the field that has that id.
public  FormulafindFormula(Object id)
     Returns the formula with the specified id or null if one is not found.
public  FormulafindFormulaByName(String name)
     Returns the formula with the specified name or null if one is not found.
public  GroupfindGroup(Selectable selectable)
     Returns the group associated with the specified column, or null if there isn't one.
public  GroupfindGroup(Section section)
     Returns the group associated with the specified section, or null if there isn't one.
public  ParameterfindParameter(Object id)
     Returns the parameter with the specified id or null if one is not found.
public  ParameterfindParameterByName(String name)
     Returns the parameter with the specified name or null if one is not found.
public  SelectablefindSelectable(Object id, String type)
    
public  SubreportfindSubreport(Object id)
     Returns the subreport with the specified id or null if one is not found.
public  UserColumnfindUserColumn(Object id)
     Returns the user column with the specified id or null if one is not found.
public  UserColumnfindUserColumnByName(String name)
     Returns the user column with the specified name or null if one is not found.
public  SectionAreafooters()
    
public  Iteratorformulas()
    
public  LonggenerateNewFormulaId()
     Generates and returns a new unique formula id number.
protected  LonggenerateNewId(Iterator iter)
     Generates and returns a new unique id number.
public  LonggenerateNewParameterId()
     Generates and returns a new unique parameter id number.
public  LonggenerateNewSubreportId()
     Generates and returns a new unique user column id number.
public  LonggenerateNewUserColumnId()
     Generates and returns a new unique user column id number.
public  AbstractListgetAggregateFieldsFor(Field field)
     Collects all aggregate fields that are aggregating the specified field.
public  StringgetAuthor()
    
public  DataCursorgetCurrentRow()
     Returns the current row of data.
public  DataSourcegetDataSource()
    
public  FieldgetDefaultField()
     Returns the field that holds default format, border, and bounds values for all fields.
public  StringgetDescription()
    
protected  FramegetDesignFrame()
     Returns the Frame associated with the design window for this report; may be null.
public  SectiongetFirstSectionByArea(int area)
     Returns the first section in the list of the specified type.
public  StringgetName()
    
public  PaperFormatgetPaperFormat()
    
public  ObjectgetParameterValue(Object paramId)
     Returns the value of the specified parameter.
public  ScriptinggetScripting()
    
public  SectionAreagetSectionArea(int area)
     Returns the section area corresponding to area, but only if area is not group header or group footer.
public  ReportSectionLocgetSectionLocation(Section s)
     Returns a structure useful only by this report for re-inserting a section. This structure may later be passed to Report.reinsertSection .
public  FormulagetStartFormula()
     Returns the report's start formula; may be null.
public  StringgetTitle()
    
public  Iteratorgroups()
    
public  IteratorgroupsReversed()
     Returns an iterator over the groups in reverse order.
public  booleanhasDataSource()
    
public  booleanhasFields()
     Returns true if this report contains some field anywhere.
public  booleanhasGroups()
    
public  booleanhasParameterFields()
     Returns true if this report contains some parameter field anywhere.
public  SectionAreaheaders()
    
public  voidinitializeSections()
    
public  GroupinnermostGroup()
     Returns the last (innermost) group in the report, or null if there are no groups.
public  SectioninsertSectionBelow(Section goBelowThis)
     Creates and returns a new section below the specified one.
public  SectioninsertSectionBelow(Section section, Section goBelowThis)
     Inserts a (possibly newly created) section below the specified one.
public  booleanisInsideGroup(Section section)
     Returns true if the specified section is contained in any group.
public  booleanisOneOfAKind(Section s)
     Returns true if the specified section is the only section of its kind; that is, the only section in the collection in which it is contained.
public  booleanisUsedBySomeGroup(Selectable g)
     Returns true if the specified data source column is a group column.
public  SectionAreapageFooters()
    
public  SectionAreapageHeaders()
    
public  intpageNumber()
     Returns the current page number.
public  Iteratorparameters()
    
public  voidparametersSetManually(boolean val)
     Lets the caller tell the report to ask for parameters (val is false, the default value) or to not ask (val is true).
protected  voidprocessResultRow()
     Processes a single data source row.
public  voidread(File f)
     Reads an XML file and builds the contents of this report.
public  voidread(org.xml.sax.InputSource in)
     Reads an XML stream using a org.xml.sax.InputSource and builds the contents of this report.
public  voidreinsertSection(ReportSectionLoc loc)
     Reinserts a section based on the location information previously retrieved by a call to Report.getSectionLocation .
public  voidreloadColumns()
     Tells this report to reload all references to column objects.
public  voidremove(Object obj)
     Figure out what obj is and remove it.
public  voidremoveAllGroups()
    
public  voidremoveField(Field f)
    
public  voidremoveFormula(Formula f)
    
public  voidremoveGroup(Group g)
    
public  voidremoveParameter(Parameter p)
    
public  voidremoveSection(Section s)
     Removes the specified section.
public  voidremoveSubreport(Subreport sub)
    
public  voidremoveUserColumn(UserColumn uc)
    
protected  voidresetCachedValues()
     Tells each formula that it should re-evaluate.
public  introwNumber()
     Returns the current data row number.
public  voidrun()
     Spawns a new thread that runs the report, using the layout engine to generate output.
public  voidrunReport()
     Runs the data source's query and hands rows to the layout engine.
public  SectionsectionContaining(Field f)
     Returns the section containing the specified field, or null if the field is not in the report.
public  voidsetAuthor(String newAuthor)
    
public  voidsetCaseSensitiveDatabaseNames(boolean val)
     Sets the value of caseSensitiveDatabaseNames.
public  voidsetDataSource(DataSource newDataSource)
     Sets the data source.
public  voidsetDatabaseConnection(Connection conn)
     Sets the database connection.
public  voidsetDatabasePassword(String pwd)
     Sets the database password.
public  voidsetDescription(String newDescription)
    
public  voidsetLayoutEngine(LayoutEngine layoutEngine)
     Sets the layout engine to use.
public  voidsetName(String newName)
    
public  voidsetPaperFormat(PaperFormat newPaperFormat)
    
public  voidsetParameterXMLInput(File f)
     Remembers name of parameter XML file.
public  voidsetParameterXMLInput(InputSource in)
     Remembers an input source and reads parameter values from it later.
public  voidsetStartFormula(Formula newStartFormula)
    
public  voidsetTitle(String newTitle)
    
public  Iteratorsubreports()
    
protected  voidupdateAggregates()
     Updates each aggregate field.
protected  voidupdateGroupCounters()
     Lets each group update its line counter.
protected  voidupdateGroups()
     Updates each group's value based on the current value of the column each group uses.
public  IteratoruserColumns()
    
public  Objectvalue(String labelOrId)
     Returns the value of the object ( Column , Formula , Parameter , UserColumn , or SpecialField ) identified by labelOrId.
public  voidwithFieldsDo(FieldWalker f)
     Iterates over all fields in the report, passing the section to the specified FieldWalker.
public  voidwithSectionsDo(SectionWalker s)
     Iterates over all sections in the report, passing the section to the specified SectionWalker.
protected  voidwriteComment(XMLWriter out)
    
protected  voidwriteDescription(XMLWriter out)
    
public  voidwriteFile(String fileName)
     Writes the contents of this report as an XML file.
protected  voidwritePage(XMLWriter out)
    
protected  voidwriteReport(XMLWriter out)
    
protected  voidwriteStartFormula(XMLWriter out)
    
public  voidwriteXML(XMLWriter out)
     Writes the contents of this report as an XML file.
protected  voidwriteXMLDecl(XMLWriter out)
    

Field Detail
OUTPUT_DTD_VERSION
final protected static double OUTPUT_DTD_VERSION(Code)



XML_ENCODING_ATTRIBUTE
final public static String XML_ENCODING_ATTRIBUTE(Code)
The string to write at the top of an XML file in the XML decl.



XML_JAVA_ENCODING
final public static String XML_JAVA_ENCODING(Code)
The string to use when reading and writing XML files. Pass it to OutputStreamWriters and InputStreamReaders.



aggregateFields
protected Collection aggregateFields(Code)



askedForParameters
protected boolean askedForParameters(Code)



author
protected String author(Code)



caseSensitiveDatabaseNames
protected boolean caseSensitiveDatabaseNames(Code)
Flag for Database data sources.



dataSource
protected DataSource dataSource(Code)



databasePassword
protected String databasePassword(Code)



defaultField
protected Field defaultField(Code)
This field holds default format, border, and bounds values for all fields. For all format ivars, if the value of the ivar is null then the value is obtained from this default field's format.



description
protected String description(Code)



details
protected SectionArea details(Code)



formulas
protected HashMap formulas(Code)



groups
protected ArrayList groups(Code)



layoutEngine
protected LayoutEngine layoutEngine(Code)



name
protected String name(Code)



pageFooters
protected SectionArea pageFooters(Code)



pageHeaders
protected SectionArea pageHeaders(Code)



paperFormat
protected PaperFormat paperFormat(Code)



paramReader
protected ParameterReader paramReader(Code)



parameters
protected TreeMap parameters(Code)



parametersHaveValues
protected boolean parametersHaveValues(Code)



paramsSetManually
protected boolean paramsSetManually(Code)



reportFooters
protected SectionArea reportFooters(Code)



reportHeaders
protected SectionArea reportHeaders(Code)



rset
protected DataCursor rset(Code)



scripting
protected Scripting scripting(Code)



startFormula
protected Formula startFormula(Code)



subreports
protected HashMap subreports(Code)



title
protected String title(Code)



usercols
protected HashMap usercols(Code)




Constructor Detail
Report
public Report()(Code)
Constructs an empty report.




Method Detail
add
public void add(Object obj)(Code)
Figure out what obj is and add it.



addFormula
public void addFormula(Formula f)(Code)



addGroup
public void addGroup(Group g)(Code)



addParameter
public void addParameter(Parameter p)(Code)



addSubreport
public void addSubreport(Subreport sub)(Code)



addUserColumn
public void addUserColumn(UserColumn uc)(Code)



askForDataSourceFile
protected void askForDataSourceFile() throws UserCancellationException, FileNotFoundException(Code)
Asks the user for a data source file if necessary. If the user cancels, we throw a UserCancellationException.



askForParameters
protected void askForParameters() throws UserCancellationException(Code)
Asks the user for parameter values. If the user cancels, we throw a UserCancellationException.



askForPassword
public void askForPassword(Database db)(Code)
Sets a database's user name and password. Called from Database.initializeConnection . If we already have the password, give it to the database. If we don't, ask the user for both the user name (supplied to us) and the password and give them to the database.
Parameters:
  db - the database



caseSensitiveDatabaseNames
public boolean caseSensitiveDatabaseNames()(Code)
Returns the value of the caseSensitiveDatabaseNames flag. By default, this flag is true. true if all mixed-case names should be quoted whenappropriate



collectAggregateFields
protected void collectAggregateFields()(Code)
Collects all aggregate fields and lets each one initialize itself. Used once at the beginning of each run.



collectUsedParameters
protected List collectUsedParameters()(Code)
Returns a list of all the parameters actually used in the report. a list of parameters



columnValue
public Object columnValue(Selectable selectable)(Code)
Returns the current value of the specified selectable. Only defined when running a report. the string or Double value of the column



contains
public boolean contains(Section s)(Code)
Returns true if this report contains the specified section. true if this report contains the specified section



contains
public boolean contains(Field f)(Code)
Returns true if the specified field exists within this report.
Parameters:
  f - a field true if the specified field exists within thisreport



containsReferenceTo
public boolean containsReferenceTo(Field f)(Code)
Returns true if the specified field exists within this report either directly (as a field) or indirectly (as a formula used by a aggregate, parameter, user column, or another formula).
Parameters:
  f - a field true if the specified field exists within thisreport



containsReferenceTo
public boolean containsReferenceTo(Formula f)(Code)
Returns true if the specified formula exists within this report either directly (as a formula field) or indirectly (as a formula used by a aggregate or by another formula). This is not the same as answering the question, "Does this report contain this formula?" because we want to know if the visual portion of the report or some other formula accesses the specified formula.
Parameters:
  f - a formula true if the specified parameter exists within somevisual element of the report or within some formula



containsReferenceTo
public boolean containsReferenceTo(UserColumn uc)(Code)
Returns true if the specified user column exists within this report either directly (as a user column field) or indirectly (inside a aggregate or formula). This is not the same as answering the question, "Does this report contain this user column?" because we want to know if the visual portion of the report or some formula accesses the specified user column.
Parameters:
  uc - a user column true if the specified parameter exists within somevisual element of the report or within some formula



containsReferenceTo
public boolean containsReferenceTo(Parameter p)(Code)
Returns true if the specified parameter exists within this report either directly (as a parameter field) or indirectly (as a parameter used by a aggregate or by another parameter or in the query's where clause). This is not the same as answering the question, "Does this report contain this parameter?" because we want to know if the visual portion of the report or some formula accesses the specified parameter.
Parameters:
  p - a parameter true if the specified parameter exists within somevisual element of the report or within some formula or within thequery's where clause



countGroups
public int countGroups()(Code)



details
public SectionArea details()(Code)



eval
public Object eval(String language, String evalString, String displayName) throws BSFException(Code)
Evaluates an evalString using language and returns the results. Called by Formula.evaluate after it has created the evalString.
Parameters:
  language - the language to use
Parameters:
  evalString - the string to evaluate
Parameters:
  displayName - a name (for example, a formula name) to display witherror messages the result



evaluateFormulasIn
public void evaluateFormulasIn(Section s)(Code)
Evalues the formulas in the specified section. This is called by the layout engine just before the section gets output.
Parameters:
  s - a section



findColumn
public Column findColumn(String id)(Code)
Given an id (a column name), returns the column that has that id. If no column with the specified id exists, returns null. Calls DataSource.findColumn . a column, or null if no column with the specifiedid exists



findField
public Field findField(Object id)(Code)
Given an id, returns the field that has that id. If no field with the specified id exists, returns null. a field, or null if no field with the specifiedid exists



findFormula
public Formula findFormula(Object id)(Code)
Returns the formula with the specified id or null if one is not found.
Parameters:
  id - the formula id the formula with that id or null if one is not found



findFormulaByName
public Formula findFormulaByName(String name)(Code)
Returns the formula with the specified name or null if one is not found.
Parameters:
  name - the name string the formula with that name or null if one is not found



findGroup
public Group findGroup(Selectable selectable)(Code)
Returns the group associated with the specified column, or null if there isn't one.
Parameters:
  selectable - a selectable field the group associated with this column, or nullif there isn't one



findGroup
public Group findGroup(Section section)(Code)
Returns the group associated with the specified section, or null if there isn't one.
Parameters:
  section - a section the group associated with this section, or nullif there isn't one



findParameter
public Parameter findParameter(Object id)(Code)
Returns the parameter with the specified id or null if one is not found. Note: don't use this method if you need a parameter's value. That value is supplied by the user. Call Report.getParameterValue instead, which asks the user to supply the value.
Parameters:
  id - the parameter id the parameter with that id or null if one is not found



findParameterByName
public Parameter findParameterByName(String name)(Code)
Returns the parameter with the specified name or null if one is not found.
Parameters:
  name - the name string the parameter with that name or null if one is notfound



findSelectable
public Selectable findSelectable(Object id, String type)(Code)



findSubreport
public Subreport findSubreport(Object id)(Code)
Returns the subreport with the specified id or null if one is not found.
Parameters:
  id - the subreport id the subreport with that id or null if one is not found



findUserColumn
public UserColumn findUserColumn(Object id)(Code)
Returns the user column with the specified id or null if one is not found.
Parameters:
  id - the user column id the user column with that id or null if oneis not found



findUserColumnByName
public UserColumn findUserColumnByName(String name)(Code)
Returns the user column with the specified name or null if one is not found.
Parameters:
  name - the name string the user column with that name or null if oneis not found



footers
public SectionArea footers()(Code)



formulas
public Iterator formulas()(Code)



generateNewFormulaId
public Long generateNewFormulaId()(Code)
Generates and returns a new unique formula id number. a long id



generateNewId
protected Long generateNewId(Iterator iter)(Code)
Generates and returns a new unique id number. The number is one larger than the largest in a given list of Identity objects whose identifiers must be Long objects.
Parameters:
  iter - an iterator over a collection if Identityobjects whose identifiers must be Longs a Long



generateNewParameterId
public Long generateNewParameterId()(Code)
Generates and returns a new unique parameter id number. a long id



generateNewSubreportId
public Long generateNewSubreportId()(Code)
Generates and returns a new unique user column id number. a long id



generateNewUserColumnId
public Long generateNewUserColumnId()(Code)
Generates and returns a new unique user column id number. a long id



getAggregateFieldsFor
public AbstractList getAggregateFieldsFor(Field field)(Code)
Collects all aggregate fields that are aggregating the specified field. Used by the report design GUI.
Parameters:
  field - a field a list of aggregate fields



getAuthor
public String getAuthor()(Code)



getCurrentRow
public DataCursor getCurrentRow()(Code)
Returns the current row of data. Only defined when running a report.



getDataSource
public DataSource getDataSource()(Code)



getDefaultField
public Field getDefaultField()(Code)
Returns the field that holds default format, border, and bounds values for all fields. For all format ivars, if the value of the ivar is null then the value is obtained from this default field's format. If you need those values, clone them before using them. the default field



getDescription
public String getDescription()(Code)



getDesignFrame
protected Frame getDesignFrame()(Code)
Returns the Frame associated with the design window for this report; may be null. a Frame; may be null



getFirstSectionByArea
public Section getFirstSectionByArea(int area)(Code)
Returns the first section in the list of the specified type. If the type is GROUP_HEADER or GROUP_FOOTER, return (a) null if there are no groups in the report or (b) the first header or footer of the first group.

Used by jimm.datavision.gui.cmd.FieldClipping when trying to paste a field into either some other report or the same report if the original section is no longer in that report. a section; may be null




getName
public String getName()(Code)



getPaperFormat
public PaperFormat getPaperFormat()(Code)



getParameterValue
public Object getParameterValue(Object paramId)(Code)
Returns the value of the specified parameter. First time at the start of each report run, asks user for parameter values.
Parameters:
  paramId - a parameter id



getScripting
public Scripting getScripting()(Code)



getSectionArea
public SectionArea getSectionArea(int area)(Code)
Returns the section area corresponding to area, but only if area is not group header or group footer. Both of those possibly apply to multiple groups, so we can't tell which one is desired.
Parameters:
  area - one of the SectionArea.* constants the section area corresponding to area



getSectionLocation
public ReportSectionLoc getSectionLocation(Section s)(Code)
Returns a structure useful only by this report for re-inserting a section. This structure may later be passed to Report.reinsertSection . Used by jimm.datavision.gui.cmd.DeleteSectionCommand .

We assume that s is contained within some SectionArea .
Parameters:
  s - the section in question section location information




getStartFormula
public Formula getStartFormula()(Code)
Returns the report's start formula; may be null. the report's start formula; may be null



getTitle
public String getTitle()(Code)



groups
public Iterator groups()(Code)



groupsReversed
public Iterator groupsReversed()(Code)
Returns an iterator over the groups in reverse order. Useful when displaying group footers. an iterator over the groups, in reverse order



hasDataSource
public boolean hasDataSource()(Code)



hasFields
public boolean hasFields()(Code)
Returns true if this report contains some field anywhere. Useful when the GUI is enabling menu items, for example. true if this report contains some field anywhere



hasGroups
public boolean hasGroups()(Code)



hasParameterFields
public boolean hasParameterFields()(Code)
Returns true if this report contains some parameter field anywhere. This doesn't determine if any parameters have been created, but rather if any of the parameters are actually used in the report.

This method is not used by DataVision, but is useful for apps embedding DataVision that want to answer the question, "Do I have to read in a parameter XML file?" true if this report contains some parameter fieldanywhere




headers
public SectionArea headers()(Code)



initializeSections
public void initializeSections()(Code)



innermostGroup
public Group innermostGroup()(Code)
Returns the last (innermost) group in the report, or null if there are no groups. the last (innermost) group in the report, or nullif there are no groups.



insertSectionBelow
public Section insertSectionBelow(Section goBelowThis)(Code)
Creates and returns a new section below the specified one.
Parameters:
  goBelowThis - a section a new section



insertSectionBelow
public Section insertSectionBelow(Section section, Section goBelowThis)(Code)
Inserts a (possibly newly created) section below the specified one. Returns the inserted section.
Parameters:
  section - the section to insert
Parameters:
  goBelowThis - section goes below this one; a new section



isInsideGroup
public boolean isInsideGroup(Section section)(Code)
Returns true if the specified section is contained in any group. The section may be either a header or a footer section.
Parameters:
  section - a section true if the section is within some group



isOneOfAKind
public boolean isOneOfAKind(Section s)(Code)
Returns true if the specified section is the only section of its kind; that is, the only section in the collection in which it is contained.
Parameters:
  s - a report section true if this section is a loner



isUsedBySomeGroup
public boolean isUsedBySomeGroup(Selectable g)(Code)
Returns true if the specified data source column is a group column. true if the specified data source column is agroup column



pageFooters
public SectionArea pageFooters()(Code)



pageHeaders
public SectionArea pageHeaders()(Code)



pageNumber
public int pageNumber()(Code)
Returns the current page number. Asks the layout engine. Only defined when running a report. a page number



parameters
public Iterator parameters()(Code)



parametersSetManually
public void parametersSetManually(boolean val)(Code)
Lets the caller tell the report to ask for parameters (val is false, the default value) or to not ask (val is true). Call this method with val = true when you set the parameters in your Java code manually.



processResultRow
protected void processResultRow() throws java.sql.SQLException(Code)
Processes a single data source row. Note that the next method of the result set has already been called.



read
public void read(File f) throws Exception(Code)
Reads an XML file and builds the contents of this report. Uses a ReportReader.
Parameters:
  f - a report XML file



read
public void read(org.xml.sax.InputSource in) throws Exception(Code)
Reads an XML stream using a org.xml.sax.InputSource and builds the contents of this report. Uses a ReportReader. To specify a URL, use new InputSource("http://...").
Parameters:
  in - a reader
See Also:   ReportReader.read(org.xml.sax.InputSource)



reinsertSection
public void reinsertSection(ReportSectionLoc loc)(Code)
Reinserts a section based on the location information previously retrieved by a call to Report.getSectionLocation . Used by jimm.datavision.gui.cmd.DeleteSectionCommand .
Parameters:
  loc - a section locatction



reloadColumns
public void reloadColumns()(Code)
Tells this report to reload all references to column objects. Called by a database when it resets its connection.
See Also:   Database.reset



remove
public void remove(Object obj)(Code)
Figure out what obj is and remove it.



removeAllGroups
public void removeAllGroups()(Code)



removeField
public void removeField(Field f)(Code)



removeFormula
public void removeFormula(Formula f)(Code)



removeGroup
public void removeGroup(Group g)(Code)



removeParameter
public void removeParameter(Parameter p)(Code)



removeSection
public void removeSection(Section s)(Code)
Removes the specified section.
Parameters:
  s - a section



removeSubreport
public void removeSubreport(Subreport sub)(Code)



removeUserColumn
public void removeUserColumn(UserColumn uc)(Code)



resetCachedValues
protected void resetCachedValues()(Code)
Tells each formula that it should re-evaluate.



rowNumber
public int rowNumber()(Code)
Returns the current data row number. Only defined when running a report.



run
public void run()(Code)
Spawns a new thread that runs the report, using the layout engine to generate output. The new thread runs the method Report.runReport .

You may ask why this method is called run and it runs another method called runReport when the normal convention is for a thread to run a Runnable object that has a run method. The reason is purely historical. This method started non-threaded, and I don't want anyone else who relies on this method to have to change their code.
See Also:   Report.runReport




runReport
public void runReport()(Code)
Runs the data source's query and hands rows to the layout engine. This method is called from Report.run , which spawns a new thread in which this method is run. If you want to run a report, decide if you want it to run in a separate thread or not. If so, call run. If not, use this method.



sectionContaining
public Section sectionContaining(Field f)(Code)
Returns the section containing the specified field, or null if the field is not in the report.
Parameters:
  f - a field the section containing the specified field, or nullif the field is not in the report



setAuthor
public void setAuthor(String newAuthor)(Code)



setCaseSensitiveDatabaseNames
public void setCaseSensitiveDatabaseNames(boolean val)(Code)
Sets the value of caseSensitiveDatabaseNames. Normally, any database data sources' query objects quote all mixed-case names where appropriate.



setDataSource
public void setDataSource(DataSource newDataSource)(Code)
Sets the data source. Called by ReportReader.database , ReportReader.charSepSource , or user code.

If we already have a data source (for example, someone has called Report.setDatabaseConnection ), the existing data source will be stomped on. Both ReportReader.database and ReportReader.charSepSource call Report.hasDataSource to check first.
Parameters:
  newDataSource - a new data source




setDatabaseConnection
public void setDatabaseConnection(Connection conn) throws SQLException(Code)
Sets the database connection. If this is called before reading a report XML file, then this connection will be used instead of the connection information specified in the report.

Note: this connection will not be closed when the report finishes or even if the database object's connection is reset.
Parameters:
  conn - a database connection




setDatabasePassword
public void setDatabasePassword(String pwd)(Code)
Sets the database password.



setDescription
public void setDescription(String newDescription)(Code)



setLayoutEngine
public void setLayoutEngine(LayoutEngine layoutEngine)(Code)
Sets the layout engine to use.
Parameters:
  layoutEngine - a layout engine



setName
public void setName(String newName)(Code)



setPaperFormat
public void setPaperFormat(PaperFormat newPaperFormat)(Code)



setParameterXMLInput
public void setParameterXMLInput(File f)(Code)
Remembers name of parameter XML file.
Parameters:
  f - an XML file



setParameterXMLInput
public void setParameterXMLInput(InputSource in)(Code)
Remembers an input source and reads parameter values from it later. To speicfy a URL, use InputSource("http://...").
Parameters:
  in - the input source



setStartFormula
public void setStartFormula(Formula newStartFormula)(Code)



setTitle
public void setTitle(String newTitle)(Code)



subreports
public Iterator subreports()(Code)



updateAggregates
protected void updateAggregates()(Code)
Updates each aggregate field.



updateGroupCounters
protected void updateGroupCounters()(Code)
Lets each group update its line counter.



updateGroups
protected void updateGroups()(Code)
Updates each group's value based on the current value of the column each group uses.



userColumns
public Iterator userColumns()(Code)



value
public Object value(String labelOrId)(Code)
Returns the value of the object ( Column , Formula , Parameter , UserColumn , or SpecialField ) identified by labelOrId.
Parameters:
  labelOrId - the label or id of a



withFieldsDo
public void withFieldsDo(FieldWalker f)(Code)
Iterates over all fields in the report, passing the section to the specified FieldWalker.
Parameters:
  f - a field walker



withSectionsDo
public void withSectionsDo(SectionWalker s)(Code)
Iterates over all sections in the report, passing the section to the specified SectionWalker. The sections are visited in the order in which they will be displayed.
Parameters:
  s - a section walker



writeComment
protected void writeComment(XMLWriter out)(Code)



writeDescription
protected void writeDescription(XMLWriter out)(Code)



writeFile
public void writeFile(String fileName)(Code)
Writes the contents of this report as an XML file.
Parameters:
  fileName - a file name string



writePage
protected void writePage(XMLWriter out)(Code)



writeReport
protected void writeReport(XMLWriter out)(Code)



writeStartFormula
protected void writeStartFormula(XMLWriter out)(Code)



writeXML
public void writeXML(XMLWriter out)(Code)
Writes the contents of this report as an XML file.
Parameters:
  out - an indent writer



writeXMLDecl
protected void writeXMLDecl(XMLWriter out)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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