public class BBJasperDesign extends Object
There is also a CALL interface using ::bbjasperdesigner.bbj::generateReport with the following ENTER parameters: p_report! : (out) The generated JasperReport Object p_baseTemplate$: (in) Template file path used to generate the JRXML file p_jrxmlFile$ : (in) Name of the JRXML file to be generated (defaults to 'SampleDesign.jrxml') p_reportName$ : (in) The name of the report (defaults to 'SampleDesign') p_colMapVec! : (in) Vector of column hashmaps, each containing the column's attributes (NAME, LABEL, LENGTH, TYPE, MASK, JUSTIFICATION, EXPRESSION) p_templateType$: (in) Type of template, where P = Portrait tabular, L = Landscape tabular, C = Columnar, defaulting to 'P'
Modifier and Type | Field and Description |
---|---|
JasperDesign |
JasperDesign! |
Constructor and Description |
---|
BBJasperDesign(BBJasperTemplate p_template!)
Constructs a BBJasperDesign object with a given BBJasperTemplate
|
BBJasperDesign(BBJasperTemplate p_template!,
BBjString p_connectString$,
BBjString p_query$)
Constructs a BBJasperDesign object with a given BBJasperTemplate, connect string and SQL query
|
BBJasperDesign(BBJasperTemplate p_template!,
BBjString p_connectString$,
BBjString p_query$,
BBjVector p_fields!)
Constructs a BBJasperDesign object with a given BBJasperTemplate, connect string, SQL query and fields vector
|
Modifier and Type | Method and Description |
---|---|
void |
addColumn(BBjString column_name$)
Adds a column given just its name
|
void |
addColumn(BBjString column$,
BBjString label$,
BBjNumber length,
BBjString type$,
BBjString mask$,
BBjString justification$,
BBjString expression$)
Adds a column with all of its attributes
|
void |
addGroup(BBjString column_name$)
Adds a group given just its column name (ie.
|
BBJasperReport |
createReport(BBjString p_reportName$,
BBjString p_reportFile$)
Creates and returns a BBJasperReport using no SQL result set
|
BBJasperReport |
createReport(BBjString p_reportName$,
BBjString p_reportFile$,
ResultSet p_rs!)
Creates and returns a BBJasperReport using an SQL result set
|
JRDesignStaticText |
findStaticTextElement(JRElementGroup parent!,
String exp!)
Finds a static text element in the passed element group
|
JRDesignTextField |
findTextFieldElement(JRElementGroup band!,
String exp!)
Finds a text field element in the passed element group
|
BBjVector |
getBands()
Returns all the bands in the JasperDesign object
|
BBjVector |
getColumns()
Returns the columns
|
BBjString |
getConnectString()
Returns the connect string
|
BBjVector |
getElements(JRElementGroup group!)
Returns all the design elements in the passed element group
|
BBjVector |
getGroups()
Returns the groups
|
JasperDesign |
getJasperDesign()
Returns the JasperDesign object
|
BBjString |
getQuery()
Returns the SQL query string
|
BBjString |
getQueryLanguage()
Returns the query language string, e.g.
|
BBjString |
getReportFile()
Returns the report file path
|
BBjString |
getReportName()
Returns the report name
|
BBjString |
getTable()
Returns the table name
|
BBJasperTemplate |
getTemplate()
Returns the BBJasperTemplate object
|
static void |
runDemo()
Run a demo of BBJasperDesign with user selected parameters
|
static void |
runDemo2()
Run a demo of BBJasperDesign with fixed fields and a memory record set
|
static void |
runDemo3()
Run a free-form demo of BBJasperDesign using hard-coded layout and the ChileCompany database
|
void |
setColumnAttributes(BBjString column$,
BBjString label$,
BBjNumber length,
BBjString type$,
BBjString mask$,
BBjString justification$,
BBjString expression$)
Sets all of a column's attributes
|
void |
setColumnExpression(BBjString column$,
BBjString expression$)
Sets a column's expression
|
void |
setColumnJustification(BBjString column$,
BBjString justification$)
Sets a column's justification
|
void |
setColumnLabel(BBjString column$,
BBjString label$)
Sets a column's label
|
void |
setColumnLength(BBjString column$,
BBjNumber length)
Sets a column's output length
|
void |
setColumnMask(BBjString column$,
BBjString mask$)
Sets a column's output mask
|
void |
setColumnType(BBjString column$,
BBjString type$)
Sets a column's type
|
public BBJasperDesign(BBJasperTemplate p_template!)
p_template!
- BBJasperTemplate objectpublic BBJasperDesign(BBJasperTemplate p_template!, BBjString p_connectString$, BBjString p_query$)
p_template!
- BBJasperTemplate objectp_connectString$
- Database connection stringp_query$
- SQL query stringpublic BBJasperDesign(BBJasperTemplate p_template!, BBjString p_connectString$, BBjString p_query$, BBjVector p_fields!)
p_template!
- BBJasperTemplate objectp_connectString$
- Database connection stringp_query$
- SQL query stringp_fields!
- Fields vectorpublic static void runDemo()
public static void runDemo2()
public static void runDemo3()
public void addColumn(BBjString column_name$)
column_name$
- Column namepublic void addColumn(BBjString column$, BBjString label$, BBjNumber length, BBjString type$, BBjString mask$, BBjString justification$, BBjString expression$)
column$
- Column namelabel$
- Label text (optional, defaults to column name)length
- Output length in pixels (optional, defaults to field length * 8)type$
- Data type (optional, template field type or "DATE", defaults to "C")mask$
- Output mask (optional, defaults to "best guess" Java pattern based on type)justification$
- (optional "R", "L", "C", defaults to �L� for types �C� and �O�, �C� for type �DATE�, else �R�)expression$
- (optional JRDesignExpression, defaults to "$F{" + name$ + "}")public void addGroup(BBjString column_name$)
column_name$
- Column namepublic void setColumnLabel(BBjString column$, BBjString label$)
column$
- Column namelabel$
- Label textpublic void setColumnLength(BBjString column$, BBjNumber length)
column$
- Column namelength
- Output length in pixelspublic void setColumnType(BBjString column$, BBjString type$)
column$
- Column nametype$
- Type (one-character template type or "DATE")public void setColumnMask(BBjString column$, BBjString mask$)
column$
- Column namemask$
- Output maskpublic void setColumnJustification(BBjString column$, BBjString justification$)
column$
- Column namejustification$
- Justification ("R", "L" or "C")public void setColumnExpression(BBjString column$, BBjString expression$)
column$
- Column nameexpression$
- JRDesignExpression expression stringpublic void setColumnAttributes(BBjString column$, BBjString label$, BBjNumber length, BBjString type$, BBjString mask$, BBjString justification$, BBjString expression$)
column$
- Column namelabel$
- Label textlength
- Output length in pixelstype$
- Data typemask$
- Output maskjustification$
- expression$
- public BBJasperReport createReport(BBjString p_reportName$, BBjString p_reportFile$)
p_reportName$
- Report namep_reportFile$
- Report file pathpublic BBJasperReport createReport(BBjString p_reportName$, BBjString p_reportFile$, ResultSet p_rs!)
p_reportName$
- Report namep_reportFile$
- Report file pathp_rs!
- SQL result set objectpublic JRDesignStaticText findStaticTextElement(JRElementGroup parent!, String exp!)
parent!
- Parent JRElementGroupexp!
- Search expression stringpublic JRDesignTextField findTextFieldElement(JRElementGroup band!, String exp!)
band!
- JRElementGroup bandexp!
- Search expression stringpublic BBjVector getBands()
public BBjVector getElements(JRElementGroup group!)
group!
- JRElementGroup grouppublic JasperDesign getJasperDesign()
public BBJasperTemplate getTemplate()
public BBjString getConnectString()
public BBjString getQuery()
public BBjString getQueryLanguage()
public BBjVector getColumns()
public BBjVector getGroups()
public BBjString getReportFile()
public BBjString getReportName()
public BBjString getTable()