Search in sources :

Example 1 with JasperReportProperties

use of au.com.vaadinutils.jasper.ui.JasperReportProperties in project VaadinUtils by rlsutton1.

the class JasperReportScheduleLayout method changedReportProperties.

private void changedReportProperties(ReportEmailScheduleEntity entityItem, ReportParameter<?> bParam) {
    try {
        if (bParam instanceof ReportChooser) {
            ReportChooser chooser = (ReportChooser) bParam;
            JasperReportProperties props = entityItem.getJasperReportPropertiesClass().newInstance();
            JasperReportProperties newProps = chooser.getReportProperties(props);
            entityItem.setReportFilename(newProps.getReportFileName());
            entityItem.setTitle(newProps.getReportTitle());
            reportTitle.setReadOnly(false);
            reportTitle.setValue(newProps.getReportTitle());
            reportTitle.setReadOnly(true);
        }
    } catch (Exception e) {
        logger.error(e, e);
        throw new RuntimeException(e);
    }
}
Also used : JasperReportProperties(au.com.vaadinutils.jasper.ui.JasperReportProperties) ReportChooser(au.com.vaadinutils.jasper.parameter.ReportChooser) InvalidValueException(com.vaadin.data.Validator.InvalidValueException)

Aggregations

ReportChooser (au.com.vaadinutils.jasper.parameter.ReportChooser)1 JasperReportProperties (au.com.vaadinutils.jasper.ui.JasperReportProperties)1 InvalidValueException (com.vaadin.data.Validator.InvalidValueException)1