Package quadbase.reportdesigner.report
Class Script
java.lang.Object
quadbase.reportdesigner.report.Script
- All Implemented Interfaces:
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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddArraySet(quadbase.reportdesigner.report.ArraySet arraySet) voidaddStatement(quadbase.reportdesigner.report.ERStatement stmt) booleanaddVariable(quadbase.reportdesigner.report.Variable var) applyScript(ReportTable table, int index, int page, int section, int totalPages, int totalSections, quadbase.reportdesigner.report.Report report, ReportCell cell, Object dataobj, IFormat cellFormat) quadbase.reportdesigner.ReportElements.ReportTableElementapplyScript(ReportTable table, int page, int section, int totalPages, int totalSections, quadbase.reportdesigner.report.Report report, quadbase.reportdesigner.ReportElements.ReportTableElement tableElt) booleanarrayExists(String arrayName) intbooleanquadbase.reportdesigner.report.ArraySetgetArraySet(String arrayName) getName()getText()quadbase.reportdesigner.report.VariablegetVariable(String varName) voidvoidvoidvoidvoidvoidsetStatements(Vector statements) voidvoidsetThisDataType(int datatype) voidsetVariables(Vector variables) testApplyScript(ReportTable table, int index, int page, int section, int totalPages, int totalSections, quadbase.reportdesigner.report.Report report, ReportCell cell, Object dataobj, IFormat cellFormat) quadbase.reportdesigner.ReportElements.ReportTableElementtestApplyScript(ReportTable table, int page, int section, int totalPages, int totalSections, quadbase.reportdesigner.report.Report report, quadbase.reportdesigner.ReportElements.ReportTableElement tableElt) toString()booleanvariableExists(String varName) voidwrite(DataOutput out) void
-
Field Details
-
SCRIPTED_VALUE_SET_TO_NULL
- See Also:
-
CELLATTR
-
TABLEATTR
-
SECTIONATTR
-
-
Constructor Details
-
Script
public Script() -
Script
-
Script
-
-
Method Details
-
getName
-
setName
-
getText
-
setText
-
setScript
-
getVariables
-
setVariables
-
getArrays
-
setArrays
-
getStatements
-
setStatements
-
addVariable
public boolean addVariable(quadbase.reportdesigner.report.Variable var) -
getVariable
-
variableExists
-
getArraySet
-
addArraySet
public boolean addArraySet(quadbase.reportdesigner.report.ArraySet arraySet) -
arrayExists
-
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, Object dataobj, IFormat cellFormat) throws Exception - Throws:
Exception
-
testApplyScript
public ReportCell testApplyScript(ReportTable table, int index, int page, int section, int totalPages, int totalSections, quadbase.reportdesigner.report.Report report, ReportCell cell, Object dataobj, IFormat cellFormat) throws Exception - Throws:
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 Exception - Throws:
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 Exception - Throws:
Exception
-
write
- Throws:
IOException
-
read
public void read(DataInput in, int version, Vector formulas, Vector queryParams, Vector formulaParams) throws Exception - Throws:
Exception
-
writeXML
- Throws:
Exception
-
readXML
public void readXML(Node node, int version, Vector formulas, Vector queryParams, Vector formulaParams) throws Exception - Throws:
Exception
-
toString
-
setThisDataType
public void setThisDataType(int datatype) -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<Script>
-