|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.services.html.HtmlElement
com.jcorporate.expresso.services.html.ReportPage
A specialized HTML Element that implements a report. Reports have headers, possibly embedded reports, possibly page breaks, and various other embedded elements.
Reports also differ from other HTML components in that they can be written directly to files if required.
| Field Summary |
| Fields inherited from class com.jcorporate.expresso.services.html.HtmlElement |
attributes, contents, cSSClass, cSSID |
| Constructor Summary | |
ReportPage()
Constructor |
|
ReportPage(String newFileName,
String newTitle)
Constructor Create a report page for output to a file |
|
| Method Summary | |
void |
addLine(String newLine)
Add a new line to the report |
protected void |
addParam(String newCode,
String newDescrip,
String newType,
String newDefaultValue)
|
void |
addRow(String rowString)
Add a new row to the report's current table |
void |
addTimeStamp()
Add a date/time stamp to the report output |
void |
close()
Close the report, writing the final HTML. |
void |
display(HttpServletRequest req,
HttpServletResponse res,
String charset)
|
void |
display(PrintWriter out)
Display to the screen (browser) in the normal way |
protected void |
display(PrintWriter out,
int depth)
depth is ignored |
void |
endTable()
End the current table in the output stream of this report |
Table |
getCurrentTable()
Get the current table being used by the report |
protected String |
getDataContext()
Retrieve the data context for this report. |
String |
getDBName()
Retrieve the db name |
Vector |
getDefaultParams()
Return a Vector of default parameter objects |
String |
getDefaultValue(String parameterName)
Retrieve the default parameter value for the given parameter name |
protected Page |
getPage()
Return a reference to the current page |
String |
getParam(String paramCode)
Return the value of the named parameter |
List |
getParameterNames()
Retrieve a list of parameters that this report supports. |
Hashtable |
getParams()
Return the parameters for this report |
String |
getReportCode()
Retrieve the report code |
String |
getReportFileExtension()
Retrieve the recommended file extension for the report. |
String |
getReportMimeType()
Retrieve the report mime type. |
protected Map |
getReportParameters()
Protected "getter" function so derived classes can get the report parameters |
String |
getTitle()
Return the title of this report |
void |
populateDefaultValues()
Dummy implementation. |
void |
printReport(OutputStream os)
Print the Report Page. |
void |
save()
Save output to a file |
void |
setDataContext(String newDataContext)
Sets the data context for this report. |
void |
setDBName(String newDBName)
|
void |
setFileName(String newFileName)
Set the file name for output |
void |
setFileName(String newFileName,
String newTitle)
Set the filename and the title of this report |
void |
setParams(Hashtable newParams)
Set the parameters for this report to the given hashtable |
void |
setReportCode(String newCode)
The report code |
void |
setReportParameters(Map parameters)
Sets the report parameters |
void |
setTitle(String newTitle)
Set the title of this report |
void |
startTable(String caption,
String colHeaders)
Begin a new table in the report output stream |
| Methods inherited from class com.jcorporate.expresso.services.html.HtmlElement |
add, display, finalize, getAttribute, getContentCount, getCSSClass, getName, padWithTabs, setAttribute, setCSSClass, setCSSID, setDisplayed, setName, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ReportPage()
throws HtmlException
HtmlException - If superclass constructor fails
public ReportPage(String newFileName,
String newTitle)
throws HtmlException
newFileName - Filename for outputnewTitle - Title of the report
HtmlException - If the report page cannot be created| Method Detail |
public void setReportCode(String newCode)
setReportCode in interface ExpressoReportnewCode - java.lang.String
public void populateDefaultValues()
throws DBException
DBException - upon errorpublic String getReportCode()
public void addLine(String newLine)
throws HtmlException
newLine - Line to add to the report output
HtmlException - If the line cannot be added
protected void addParam(String newCode,
String newDescrip,
String newType,
String newDefaultValue)
throws HtmlException
newCode - the new parameter codenewDescrip - the new descriptionnewType - the java typenewDefaultValue - the default value
HtmlException - upon error
public void addRow(String rowString)
throws HtmlException
rowString - Pipe-seperated values, one for each column for the new row
in the table
HtmlException - A new row could not be added
public void addTimeStamp()
throws HtmlException
HtmlException - If the date/time stampt cannot be added
public void close()
throws HtmlException
HtmlException - If a problem occurrs saving the report
public void display(HttpServletRequest req,
HttpServletResponse res,
String charset)
throws HtmlException
HtmlException
public void display(PrintWriter out)
throws HtmlException
out - PrintWriter to send to client
HtmlException - If the report could not be written
protected void display(PrintWriter out,
int depth)
throws HtmlException
display in class HtmlElementdepth - the number of tabs to indentout - the output stream
HtmlException - upon error
public void endTable()
throws HtmlException
HtmlException - If the table could not be ended correctly
public Table getCurrentTable()
throws HtmlException
HtmlException - If the current table cannot be accessedpublic String getDBName()
public Vector getDefaultParams()
public String getDefaultValue(String parameterName)
getDefaultValue in interface ExpressoReportparameterName - the name of the parameter. Must be listed
in the list of parameter names
IllegalArgumentException - if the parameter name does not exist
in the report's parameter list.protected Page getPage()
public String getParam(String paramCode)
throws HtmlException
paramCode - of the parameter
HtmlException - if there is no such parameter
public Hashtable getParams()
throws HtmlException
HtmlException - If an error occurs retrieving the parameterspublic String getTitle()
getTitle in interface ExpressoReport
public void save()
throws HtmlException
HtmlException - If the output could not be writtenpublic void setDBName(String newDBName)
newDBName - new data context
public void setFileName(String newFileName)
throws HtmlException
newFileName - New output file name
HtmlException - If the parameter is invalid
public void setFileName(String newFileName,
String newTitle)
throws HtmlException
newFileName - Name of the output file to writenewTitle - Title of the report
HtmlException - If the parameters are not valid
public void setParams(Hashtable newParams)
throws HtmlException
newParams - New parameters hashtable
HtmlException - If these parameters cannot be setpublic void setTitle(String newTitle)
newTitle - New title of report
public void startTable(String caption,
String colHeaders)
throws HtmlException
caption - Caption for the tablecolHeaders - A pipe-seperated list of column headers
HtmlException - A new table could not be started
public void printReport(OutputStream os)
throws ReportException,
IOException
printReport in interface ExpressoReportos - The OutputStream to send to.
ReportException - upon error.
IOException - upon IO errorpublic void setReportParameters(Map parameters)
setReportParameters in interface ExpressoReportparameters - Map of parametersprotected Map getReportParameters()
public void setDataContext(String newDataContext)
setDataContext in interface ExpressoReportnewDataContext - the new data contextprotected String getDataContext()
public String getReportMimeType()
getReportMimeType in interface ExpressoReportMimeTypespublic String getReportFileExtension()
getReportFileExtension in interface ExpressoReportpublic List getParameterNames()
ReportServer won't
present them as options.
getParameterNames in interface ExpressoReport
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||