Klasse ProblemFinder
java.lang.Object
com.inet.problemfinder.ProblemFinder
This is the i-net Clear Reports Problem Finder.
The Problem Finder is a debug tool. It checks i-net Clear Reports reports for design flaws.
Use
To check an Engine, use the Method
This Method needs the
For a complete check the type should be
The
The
The
With
The Problem Finder is a debug tool. It checks i-net Clear Reports reports for design flaws.
Use
getInstance() to get ProblemFinder instance for checking reports.To check an Engine, use the Method
check(Engine, int).This Method needs the
Engine to check and a specific type which defines the kind of checks that will be run. For a complete check the type should be
CHECK_ALL.The
ProblemFinder provides two Methods to get the result. The
getWarningList() returns a list of ProblemFinderWarnings found in the given main Engine.The
getSubreportWarningMap() returns a Map over all Subreport-Engines with their own list of ProblemFinderWarnings.With
clearAll() the list and the map will be empty.
Attention: The ProblemFinderWarning AutoFix-Actions manipulate the Engine, use it carefully or back up your reports
if you plan on replacing your report files.
ProblemFinder problemFinder = ProblemFinder.getInstance();
Engine mainEngine = new Engine( Engine.NO_EXPORT );
URL source = this.getClass().getResource( "myReport.rpt" );
mainEngine.setReportFile( source );
problemFinder.check( mainEngine, ProblemFinder.CHECK_ALL );
List<ProblemFinderWarning> warningListMain = problemFinder.getWarningList();
for( ProblemFinderWarning warning : warningListMain ) {
System.out.println(warning.getMessage());
// ..do something else
}
HashMap<Engine, List<ProblemFinderWarning>> warningMap = problemFinder.getSubreportWarningMap();
for( Engine subEngine : warningMap.keySet() ) {
List<ProblemFinderWarning> warningListSub = warningMap.get( subEngine );
for( ProblemFinderWarning warning : warningListSub ) {
System.out.println(warning.getMessage());
// ..do something else
}
}
- Seit:
- 11.0
- Siehe auch:
-
Feldübersicht
FelderModifikator und TypFeldBeschreibungstatic final intCHECK_ALLtype to check allstatic final intCHECK_ELEMENTtype to checkElementsstatic final intCHECK_FIELD_FORMULAtype to checkFormulaFieldsstatic final intCHECK_FIELD_PROMPTtype to checkPromptFieldsstatic final intCHECK_FIELD_SQLtype to checkSQLFieldsstatic final intCHECK_FIELD_SUMMARYtype to checkSummaryFieldsstatic final intCHECK_FIELDStype to check allFieldsstatic final intCHECK_PROPERTYFORMULAtype to check propertyFormulaFieldsstatic final intCHECK_REPORTtype to check property executed reportsstatic final intCHECK_SECTIONtype to checkSections -
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidaddRules(ProblemFinderRule rule) Add a new rules to the problem finder from a plugin.booleanStart aEngine-check by a given type.voidclearAll()Removes all of theProblemFinderWarnings from the warnings list and the subreport warnings map.static ProblemFinderReturns theProblemFindersingleton instance.Returns a list ofProblemFinderWarnings found in the given main Engine.voidsetUserProperties(Properties userProperties) Sets user properties for the engine to check.
-
Felddetails
-
CHECK_FIELD_FORMULA
public static final int CHECK_FIELD_FORMULACHECK_FIELD_FORMULAtype to checkFormulaFields- Siehe auch:
-
CHECK_FIELD_SQL
-
CHECK_FIELD_SUMMARY
public static final int CHECK_FIELD_SUMMARYCHECK_FIELD_SUMMARYtype to checkSummaryFields- Siehe auch:
-
CHECK_FIELD_PROMPT
public static final int CHECK_FIELD_PROMPTCHECK_FIELD_PROMPTtype to checkPromptFields- Siehe auch:
-
CHECK_FIELDS
-
CHECK_ELEMENT
-
CHECK_SECTION
-
CHECK_PROPERTYFORMULA
public static final int CHECK_PROPERTYFORMULACHECK_PROPERTYFORMULAtype to check propertyFormulaFields- Siehe auch:
-
CHECK_REPORT
public static final int CHECK_REPORTCHECK_REPORTtype to check property executed reports- Siehe auch:
-
CHECK_ALL
public static final int CHECK_ALLCHECK_ALLtype to check all- Siehe auch:
-
-
Methodendetails
-
getInstance
Returns theProblemFindersingleton instance.- Gibt zurück:
- the static ProblemFinder instance.
- Seit:
- 11.0
-
addRules
Add a new rules to the problem finder from a plugin.- Parameter:
rule- the new rules to be add- Seit:
- 20.10
-
setUserProperties
Sets user properties for the engine to check. The properties could have for example prompt values that the engine needs to render.- Parameter:
userProperties- the properties for the engine to set- Seit:
- 20.10
-
clearAll
public void clearAll()Removes all of theProblemFinderWarnings from the warnings list and the subreport warnings map. The list and the map will be empty after this call returns.- Seit:
- 11.0
-
check
-
getWarningList
Returns a list ofProblemFinderWarnings found in the given main Engine.- Gibt zurück:
- The main
ProblemFinderWarninglist with the current warnings. - Seit:
- 11.0
-
getSubreportWarningMap
- Gibt zurück:
- The
ProblemFinderWarninglist of the current warnings for each Subreport-Engine. - Seit:
- 11.0
-