com.java4less.rreport
Class RArraySource

java.lang.Object
  |
  +--com.java4less.rreport.RArraySource
All Implemented Interfaces:
RSource

public class RArraySource
extends java.lang.Object
implements RSource

Uses an array as data source for an area. See also RSource.

exampleOrder.java. Uses the report definition file Order.rep. It uses an array as data source for the report. runExampleOrder.bat


Constructor Summary
RArraySource(java.lang.String[] names, java.lang.Object[][] val)
          The first array contains the names of the fields, the second the values.
 
Method Summary
 java.lang.String[] getFromFields()
          field names in the linked RSource used for the relationship (this is normally the primary key in a table or record).
 RSource getLinkSource()
          linked RSource (if the RSource supports nested RSources).
 java.lang.String[] getToFields()
          field names in this RSource used for the relationship (this is normally a foreign key).
 void rsource_end()
          finalizes data source.
 java.lang.Object rsource_getData(java.lang.String FieldName)
          get value for field.
 boolean rsource_nextRecord()
          get next row in array.
 boolean rsource_start()
          set array to read first row.
 void setData(java.lang.String[] names, java.lang.Object[][] val)
          set new array for the source
 void setFromFields(java.lang.String[] s)
          field names in the linked RSource used for the relationship (this is normally the primary key).
 void setLinkSource(RSource l)
          linked RSource (if the RSource supports nested RSources).
 void setParameter(java.lang.String param, java.lang.String value)
          parameters are not implemented in RArraySource.
 void setToFields(java.lang.String[] s)
          field names in this RSource used for the relationship (this is normally a foreign key).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RArraySource

public RArraySource(java.lang.String[] names,
                    java.lang.Object[][] val)
The first array contains the names of the fields, the second the values.
Method Detail

setData

public void setData(java.lang.String[] names,
                    java.lang.Object[][] val)
set new array for the source

rsource_getData

public java.lang.Object rsource_getData(java.lang.String FieldName)
get value for field.
Specified by:
rsource_getData in interface RSource

rsource_nextRecord

public boolean rsource_nextRecord()
get next row in array.
Specified by:
rsource_nextRecord in interface RSource

rsource_start

public boolean rsource_start()
set array to read first row.
Specified by:
rsource_start in interface RSource

rsource_end

public void rsource_end()
finalizes data source. Empty method.
Specified by:
rsource_end in interface RSource

getLinkSource

public RSource getLinkSource()
linked RSource (if the RSource supports nested RSources).
Specified by:
getLinkSource in interface RSource

setLinkSource

public void setLinkSource(RSource l)
linked RSource (if the RSource supports nested RSources).
Specified by:
setLinkSource in interface RSource

getFromFields

public java.lang.String[] getFromFields()
field names in the linked RSource used for the relationship (this is normally the primary key in a table or record).
Specified by:
getFromFields in interface RSource

getToFields

public java.lang.String[] getToFields()
field names in this RSource used for the relationship (this is normally a foreign key).
Specified by:
getToFields in interface RSource

setFromFields

public void setFromFields(java.lang.String[] s)
field names in the linked RSource used for the relationship (this is normally the primary key).
Specified by:
setFromFields in interface RSource

setToFields

public void setToFields(java.lang.String[] s)
field names in this RSource used for the relationship (this is normally a foreign key).
Specified by:
setToFields in interface RSource

setParameter

public void setParameter(java.lang.String param,
                         java.lang.String value)
parameters are not implemented in RArraySource. This is an empty method.
Specified by:
setParameter in interface RSource