EspressReport 6.6

quadbase.reportdesigner.report
Class Script

java.lang.Object
  extended by quadbase.reportdesigner.report.Script
All Implemented Interfaces:
java.lang.Comparable<Script>

public class Script
extends java.lang.Object
implements java.lang.Comparable<Script>

This represents a script in the report. A typical use of this involves the following code:

 
      QbReport report = ...;
 Report rpt = report.getReportObj();
 String scriptCode = "VALUE=\"testscript\"";
 Script script = new Script("ScriptName", scriptCode);
      ByteArrayInputStream inputStream = 
         new ByteArrayInputStream(scriptCode.getBytes());
 NewScriptParser parser = new NewScriptParser(inputStream);
 script.setScript
         (parser.parse(rpt.formulas, rpt.getQueryParameters(), 
                       rpt.getFormulaParameters(), script.getName()));
 rpt.scripts.add(script);
 
 


Field Summary
static java.lang.String[] CELLATTR
           
static java.lang.String SCRIPTED_VALUE_SET_TO_NULL
           
static java.lang.String[] SECTIONATTR
           
static java.lang.String[] TABLEATTR
           
 
Constructor Summary
Script()
           
Script(java.lang.String name)
           
Script(java.lang.String name, java.lang.String text)
           
 
Method Summary
 boolean addArraySet(quadbase.reportdesigner.report.ArraySet arraySet)
           
 void addStatement(quadbase.reportdesigner.report.ERStatement stmt)
           
 boolean addVariable(quadbase.reportdesigner.report.Variable var)
           
 ReportCell applyScript(ReportTable table, int index, int page, int section, int totalPages, int totalSections, quadbase.reportdesigner.report.Report report, ReportCell cell, java.lang.Object dataobj, IFormat cellFormat)
           
 quadbase.reportdesigner.ReportElements.ReportTableElement applyScript(ReportTable table, int page, int section, int totalPages, int totalSections, quadbase.reportdesigner.report.Report report, quadbase.reportdesigner.ReportElements.ReportTableElement tableElt)
           
 boolean arrayExists(java.lang.String arrayName)
           
 int compareTo(Script o)
           
 boolean equals(java.lang.Object object)
           
 java.util.Vector getArrays()
           
 quadbase.reportdesigner.report.ArraySet getArraySet(java.lang.String arrayName)
           
 java.lang.String getName()
           
 java.util.Vector getStatements()
           
 java.lang.String getText()
           
 quadbase.reportdesigner.report.Variable getVariable(java.lang.String varName)
           
 java.util.Vector getVariables()
           
 void read(java.io.DataInput in, int version, java.util.Vector formulas, java.util.Vector queryParams, java.util.Vector formulaParams)
           
 void readXML(org.w3c.dom.Node node, int version, java.util.Vector formulas, java.util.Vector queryParams, java.util.Vector formulaParams)
           
 void setArrays(java.util.Vector arrays)
           
 void setName(java.lang.String name)
           
 void setScript(java.util.Vector[] vec)
           
 void setStatements(java.util.Vector statements)
           
 void setText(java.lang.String text)
           
 void setThisDataType(int datatype)
           
 void setVariables(java.util.Vector variables)
           
 ReportCell testApplyScript(ReportTable table, int index, int page, int section, int totalPages, int totalSections, quadbase.reportdesigner.report.Report report, ReportCell cell, java.lang.Object dataobj, IFormat cellFormat)
           
 quadbase.reportdesigner.ReportElements.ReportTableElement testApplyScript(ReportTable table, int page, int section, int totalPages, int totalSections, quadbase.reportdesigner.report.Report report, quadbase.reportdesigner.ReportElements.ReportTableElement tableElt)
           
 java.lang.String toString()
           
 boolean variableExists(java.lang.String varName)
           
 void write(java.io.DataOutput out)
           
 void writeXML(java.io.Writer out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SCRIPTED_VALUE_SET_TO_NULL

public static final java.lang.String SCRIPTED_VALUE_SET_TO_NULL
See Also:
Constant Field Values

CELLATTR

public static final java.lang.String[] CELLATTR

TABLEATTR

public static final java.lang.String[] TABLEATTR

SECTIONATTR

public static final java.lang.String[] SECTIONATTR
Constructor Detail

Script

public Script()

Script

public Script(java.lang.String name)

Script

public Script(java.lang.String name,
              java.lang.String text)
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

setScript

public void setScript(java.util.Vector[] vec)

getVariables

public java.util.Vector getVariables()

setVariables

public void setVariables(java.util.Vector variables)

getArrays

public java.util.Vector getArrays()

setArrays

public void setArrays(java.util.Vector arrays)

getStatements

public java.util.Vector getStatements()

setStatements

public void setStatements(java.util.Vector statements)

addVariable

public boolean addVariable(quadbase.reportdesigner.report.Variable var)

getVariable

public quadbase.reportdesigner.report.Variable getVariable(java.lang.String varName)

variableExists

public boolean variableExists(java.lang.String varName)

getArraySet

public quadbase.reportdesigner.report.ArraySet getArraySet(java.lang.String arrayName)

addArraySet

public boolean addArraySet(quadbase.reportdesigner.report.ArraySet arraySet)

arrayExists

public boolean arrayExists(java.lang.String arrayName)

addStatement

public void addStatement(quadbase.reportdesigner.report.ERStatement stmt)

applyScript

public ReportCell applyScript(ReportTable table,
                              int index,
                              int page,
                              int section,
                              int totalPages,
                              int totalSections,
                              quadbase.reportdesigner.report.Report report,
                              ReportCell cell,
                              java.lang.Object dataobj,
                              IFormat cellFormat)
                       throws java.lang.Exception
Throws:
java.lang.Exception

testApplyScript

public ReportCell testApplyScript(ReportTable table,
                                  int index,
                                  int page,
                                  int section,
                                  int totalPages,
                                  int totalSections,
                                  quadbase.reportdesigner.report.Report report,
                                  ReportCell cell,
                                  java.lang.Object dataobj,
                                  IFormat cellFormat)
                           throws java.lang.Exception
Throws:
java.lang.Exception

applyScript

public quadbase.reportdesigner.ReportElements.ReportTableElement applyScript(ReportTable table,
                                                                             int page,
                                                                             int section,
                                                                             int totalPages,
                                                                             int totalSections,
                                                                             quadbase.reportdesigner.report.Report report,
                                                                             quadbase.reportdesigner.ReportElements.ReportTableElement tableElt)
                                                                      throws java.lang.Exception
Throws:
java.lang.Exception

testApplyScript

public quadbase.reportdesigner.ReportElements.ReportTableElement testApplyScript(ReportTable table,
                                                                                 int page,
                                                                                 int section,
                                                                                 int totalPages,
                                                                                 int totalSections,
                                                                                 quadbase.reportdesigner.report.Report report,
                                                                                 quadbase.reportdesigner.ReportElements.ReportTableElement tableElt)
                                                                          throws java.lang.Exception
Throws:
java.lang.Exception

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Throws:
java.io.IOException

read

public void read(java.io.DataInput in,
                 int version,
                 java.util.Vector formulas,
                 java.util.Vector queryParams,
                 java.util.Vector formulaParams)
          throws java.lang.Exception
Throws:
java.lang.Exception

writeXML

public void writeXML(java.io.Writer out)
              throws java.lang.Exception
Throws:
java.lang.Exception

readXML

public void readXML(org.w3c.dom.Node node,
                    int version,
                    java.util.Vector formulas,
                    java.util.Vector queryParams,
                    java.util.Vector formulaParams)
             throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setThisDataType

public void setThisDataType(int datatype)

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(Script o)
Specified by:
compareTo in interface java.lang.Comparable<Script>

EspressReport 6.6