Package org.compiere.print
Class DrillReportCtl
java.lang.Object
org.compiere.print.DrillReportCtl
Drill Report Controller
- Author:
- Igor Pojzl, Cloudempiere
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashMap<Integer,KeyNamePair[]> Drill Process Rule Mapprotected KeyNamePair[]Drill Process Map -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfillParameter(ProcessInfo pi, MProcessDrillRule processDrillRule) Fill Parameterprotected TimestampgetDateTimeParsed(int displayType, String value) Parse a text value using the format that matches the display type.Get Display ValueReturn Array of Drill Process RulesGet Drill Process ListgetDrillProcessProcessInfo(int AD_Process_DrillRule_ID, int AD_PrintFormat_ID) Get Drill Process Rules Print Format MapgetDrillProcessRulesPrintFormatMap(int AD_Process_DrillRule_ID) Get Drill Table KeyNamePairsprotected KeyNamePair[]getPrintFormats(int table_ID, int reportView_ID) Get Table NamegetValue()Get Valueprotected voidInitialize Print Formats for Table NamevoidInitialize Drill Table Mapprotected voidInitialize Drill Process Rules Map.protected voidInit Process Drill Rule Maps for WindowvoidlaunchTableDrillReport(int ad_PrintFormat_ID, String tableName) Launch Reportprotected ObjectparseVariable(MProcessDrillRulePara sPara, String variable) protected ProcessInfoprepareProcessInfo(MProcess process, MProcessDrillRule processDrillRule, int ad_PrintFormat_ID) Run Process or Reportprotected BigDecimaltoBigDecimal(Object value) protected TimestamptoTimestamp(int displayType, Object value) Convert a drill rule parameter value to a timestamp
-
Field Details
-
drillProcessList
Drill Process Map -
drillProcesRules
Drill Process Rule Map
-
-
Constructor Details
-
DrillReportCtl
public DrillReportCtl(String TableName, MQuery query, String ColumnName, Object Value, String displayValue, int WindowNo, int processID) - Parameters:
TableName-query-ColumnName-Value-displayValue-WindowNo-processID-
-
DrillReportCtl
protected DrillReportCtl()Constructor for subclasses that are not bound to a record. The subclass must callinitProcessDrillRuleMaps()at the end of its own constructor.
-
-
Method Details
-
getDrillTables
Get Drill Table KeyNamePairs -
getDrillProcesRules
Return Array of Drill Process Rules- Returns:
-
getDrillProcessRulesPrintFormatMap
- Parameters:
AD_Process_DrillRule_ID-- Returns:
-
getDisplayValue
Get Display Value- Returns:
-
getValue
Get Value- Returns:
-
initProcessDrillRuleMaps
protected void initProcessDrillRuleMaps()Init Process Drill Rule Maps for Window -
initProcessDrillRuleMap
protected void initProcessDrillRuleMap()Initialize Drill Process Rules Map. Subclasses override this to select other drill rules; it must setdrillProcessListanddrillProcesRules. -
initDrillTableMap
public void initDrillTableMap()Initialize Drill Table Map -
initDrillProcessRulePrintFormatMap
protected void initDrillProcessRulePrintFormatMap()Initialize Print Formats for Table Name -
getPrintFormats
-
launchTableDrillReport
Launch Report- Parameters:
ad_PrintFormat_ID- print formattableName-
-
getDrillProcessProcessInfo
public ProcessInfo getDrillProcessProcessInfo(int AD_Process_DrillRule_ID, int AD_PrintFormat_ID) throws Exception - Parameters:
AD_Process_DrillRule_ID-AD_PrintFormat_ID-- Returns:
- Throws:
Exception
-
prepareProcessInfo
protected ProcessInfo prepareProcessInfo(MProcess process, MProcessDrillRule processDrillRule, int ad_PrintFormat_ID) throws Exception Run Process or Report- Parameters:
process- process- Returns:
- summary
- Throws:
Exception
-
fillParameter
Fill Parameter- Parameters:
pi- process infoprocessDrillRule-
-
toTimestamp
Convert a drill rule parameter value to a timestamp- Parameters:
displayType- display type of the parameter (Date, Time or DateTime)value- Timestamp or text value- Returns:
- timestamp, or null if value is null or empty
-
getDateTimeParsed
Parse a text value using the format that matches the display type. The whole text must be a valid date/time. Falls back to a full JDBC timestamp (yyyy-mm-dd hh:mm:ss[.fffffffff], keeps the time and fractional seconds, except forDisplayType.Datewhere it is truncated to the day) and then to the JDBC date format (yyyy-mm-dd).- Parameters:
displayType-DisplayType.Date,DisplayType.Timeor any other date typevalue- text to parse- Returns:
- timestamp, or null if value is empty
- Throws:
IllegalArgumentException- if value matches none of the formats
-
toBigDecimal
-
parseVariable
-
getTableName
Get Table Name- Returns:
-
getDrillProcessList
Get Drill Process List- Returns:
-
getDrillProcessRulesPrintFormatMap
Get Drill Process Rules Print Format Map- Returns:
-