public class Script extends java.lang.Object implements java.lang.Comparable<Script>
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);
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Script() |
Script(java.lang.String name) |
Script(java.lang.String name,
java.lang.String text) |
Modifier and Type | Method and Description |
---|---|
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) |
public static final java.lang.String SCRIPTED_VALUE_SET_TO_NULL
public static final java.lang.String[] CELLATTR
public static final java.lang.String[] TABLEATTR
public static final java.lang.String[] SECTIONATTR
public Script()
public Script(java.lang.String name)
public Script(java.lang.String name, java.lang.String text)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getText()
public void setText(java.lang.String text)
public void setScript(java.util.Vector[] vec)
public java.util.Vector getVariables()
public void setVariables(java.util.Vector variables)
public java.util.Vector getArrays()
public void setArrays(java.util.Vector arrays)
public java.util.Vector getStatements()
public void setStatements(java.util.Vector statements)
public boolean addVariable(quadbase.reportdesigner.report.Variable var)
public quadbase.reportdesigner.report.Variable getVariable(java.lang.String varName)
public boolean variableExists(java.lang.String varName)
public quadbase.reportdesigner.report.ArraySet getArraySet(java.lang.String arrayName)
public boolean addArraySet(quadbase.reportdesigner.report.ArraySet arraySet)
public boolean arrayExists(java.lang.String arrayName)
public void addStatement(quadbase.reportdesigner.report.ERStatement stmt)
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
java.lang.Exception
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
java.lang.Exception
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
java.lang.Exception
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
java.lang.Exception
public void write(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
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
java.lang.Exception
public void writeXML(java.io.Writer out) throws java.lang.Exception
java.lang.Exception
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
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
public void setThisDataType(int datatype)
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object