public interface UiReportRunner
Modifier and Type | Method and Description |
---|---|
FluentUiReportRunner |
byReportCode(java.lang.String reportCode)
Creates an instance of
FluentUiReportRunner for a report with specified code. |
FluentUiReportRunner |
byReportEntity(Report report)
Creates an instance of
FluentUiReportRunner for specified report. |
void |
runAndShow(UiReportRunContext context)
Runs the report based on the information from the
UiReportRunContext and shows the result. |
void |
runMultipleReports(UiReportRunContext context,
java.lang.String multiParamAlias,
java.util.Collection multiParamValue)
Runs a report for each object from the specified collection.
|
void runAndShow(UiReportRunContext context)
UiReportRunContext
and shows the result. The run context may be created
manually using the constructor or using the FluentUiReportRunner
.context
- the object that contains all information required to run the report from UIvoid runMultipleReports(UiReportRunContext context, java.lang.String multiParamAlias, java.util.Collection multiParamValue)
UiReportRunContext context = new UiReportRunContext(report) .setOutputType(ReportOutputType.PDF); uiReportRunner.runMultipleReports(context, "name", namesList);The report will be executed for each string from the "namesList" collection.
context
- the object that contains all information required to run the report from UImultiParamAlias
- alias of the parameter for which a value from the collection is used for report executionmultiParamValue
- collection of valuesFluentUiReportRunner byReportCode(java.lang.String reportCode)
FluentUiReportRunner
for a report with specified code.
UiReportRunContext context = uiReportRunner.byReportCode("orders-report") .withTemplateCode("order-template") .withOutputNamePattern("Orders") .withParametersDialogShowMode(ParametersDialogShowMode.IF_REQUIRED) .inBackground(screen) .buildContext(); uiReportRunner.byReportCode("orders-report") .addParam("orders", ordersList) .withParametersDialogShowMode(ParametersDialogShowMode.NO) .runAndShow(); uiReportRunner.byReportCode("orders-report") .addParam("orders", ordersList) .withParametersDialogShowMode(ParametersDialogShowMode.YES) .runAndShow(); uiReportRunner.byReportCode("customer-orders-report") .addParam("minOrdersDate", date) .withOutputType(ReportOutputType.PDF) .withTemplateCode(""orders-template"") .runMultipleReports("customer", customersList);
reportCode
- report codeFluentUiReportRunner
FluentUiReportRunner byReportEntity(Report report)
FluentUiReportRunner
for specified report.
UiReportRunContext context = uiReportRunner.byReportEntity(report) .withTemplateCode("order-template") .withOutputNamePattern("Orders") .withParametersDialogShowMode(ParametersDialogShowMode.IF_REQUIRED) .inBackground(screen) .buildContext(); uiReportRunner.byReportEntity(report) .addParam("orders", ordersList) .withParametersDialogShowMode(ParametersDialogShowMode.NO) .runAndShow(); uiReportRunner.byReportEntity(report) .withTemplate(template) .addParam("orders", ordersList) .withParametersDialogShowMode(ParametersDialogShowMode.YES) .runAndShow(); uiReportRunner.byReportEntity(report) .addParam("minOrdersDate", date) .withOutputType(ReportOutputType.PDF) .withTemplateCode(""orders-template"") .runMultipleReports("customer", customersList);
report
- report entityFluentUiReportRunner