public abstract class BaseJavaReport
extends com.labvantage.sapphire.BaseCustom
implements com.labvantage.sapphire.report.ReportConstants
DISPLAY_TYPE_CSV, DISPLAY_TYPE_DOC, DISPLAY_TYPE_DOCX, DISPLAY_TYPE_HTML, DISPLAY_TYPE_PDF, DISPLAY_TYPE_RTF, DISPLAY_TYPE_XLS, DISPLAY_TYPE_XLSX, REPORTTYPE_BO, REPORTTYPE_EMBEDDEDJASPER, REPORTTYPE_JASPER, REPORTTYPE_JAVA, REPORTTYPE_NWA, REPORTTYPE_TALEND
Constructor and Description |
---|
BaseJavaReport() |
Modifier and Type | Method and Description |
---|---|
void |
adjustPrintOptions(PrintReportOptions options)
Prior to sending the output file to a printer, you can override this method to adjust the print options if needed.
|
boolean |
canPrint() |
protected java.lang.ClassLoader |
getClassLoader() |
abstract java.lang.String |
getLogicalFileName(java.lang.String defaultFileName)
Return the logical name of the file.
|
java.lang.String |
getMimeType(java.lang.String filename)
LabVantage will try to assign a mimi-type for known filetypes.
|
java.lang.String[] |
getReportParameters() |
protected XSSFWorkbook |
getXSSFWorkBookFromDataSet(java.lang.String sheetTitle,
DataSet ds,
java.util.List<java.lang.String> titles,
java.util.List<java.lang.String> columnIds,
boolean autoSizeColumns)
Utility function to quickly create a POI workbook from a DataSet.
|
abstract void |
init(java.lang.String reportid,
java.lang.String reportVersionid,
java.util.HashMap paramsMap,
ConnectionInfo connectionInfo)
In this oiverride you can retain this information needed downstream, such as the report parameters
|
abstract void |
runReport(java.io.OutputStream outputStream)
Send the contents of the report to this output stream to be sent to a browser or to a file
|
void |
sendToPrinter(java.lang.String printerName,
java.io.File file,
PrintReportOptions options)
LabVantage knows how to print various file types, include excel, word, pdf, text and images.
|
void |
setClassLoader(java.lang.ClassLoader classLoader) |
getAccessorErrorIds, getAccessorErrorMsgs, getActionProcessor, getConfigurationProcessor, getConnectionid, getConnectionId, getConnectionProcessor, getDAMProcessor, getDepartmentList, getHttpProcessor, getQueryProcessor, getRakFile, getSDCProcessor, getSDIProcessor, getSequenceProcessor, getTranslationProcessor, setConnectionId, setLanguage, setRakFile
public java.lang.String[] getReportParameters()
public void setClassLoader(java.lang.ClassLoader classLoader)
protected java.lang.ClassLoader getClassLoader()
public abstract void init(java.lang.String reportid, java.lang.String reportVersionid, java.util.HashMap paramsMap, ConnectionInfo connectionInfo) throws SapphireException
reportid
- reportVersionid
- paramsMap
- connectionInfo
- SapphireException
public abstract java.lang.String getLogicalFileName(java.lang.String defaultFileName)
defaultFileName
- public abstract void runReport(java.io.OutputStream outputStream) throws SapphireException
outputStream
- SapphireException
public java.lang.String getMimeType(java.lang.String filename)
filename
- public void adjustPrintOptions(PrintReportOptions options)
options
- public void sendToPrinter(java.lang.String printerName, java.io.File file, PrintReportOptions options)
printerName
- file
- options
- protected XSSFWorkbook getXSSFWorkBookFromDataSet(java.lang.String sheetTitle, DataSet ds, java.util.List<java.lang.String> titles, java.util.List<java.lang.String> columnIds, boolean autoSizeColumns)
sheetTitle
- Name of the sheetds
- Dataset to be transformedtitles
- Optional list of titles to each column to be displayed in the first row. If provided, the number of titles must match the nubmer of columns to export. Note that any column in the dataset prefixed with "_" will be ignored.columnIds
- Optional list of columns to export. Note that any column in the dataset prefixed with "_" will be ignoredautoSizeColumns
- After the data has been loaded, this option allows the width of the spreadsheet columns to be auto-sizedpublic boolean canPrint()