Package org.jabusuite.core.reporting

Examples of org.jabusuite.core.reporting.ReportTemplate


        this.setPnEditJbsObject(new PnReportTemplateEdit());
    }

    @Override
    public void createJbsBaseObject() {
        this.setJbsBaseObject(new ReportTemplate());
    }
View Full Code Here


    }
     */
    public void showAddrListReport() {
        try {
            ReportTemplatesRemote reportTemplates = (ReportTemplatesRemote) ClientTools.getRemoteBean(ReportTemplatesRemote.class);
            ReportTemplate reportTemplate = reportTemplates.findReportTemplate(1);
            RptAddress rptAddress = new RptAddress(reportTemplate, ClientGlobals.getUser(), ClientGlobals.getCompany());
            rptAddress.createReport();
            getApplicationInstance().enqueueCommand(rptAddress.getReportPdfDownload(true));
        } catch (NamingException e) {
            logger.error("Error fetching report-template.", e);
View Full Code Here

        if (this.findReportTemplate(reportType, user, company)==null) {
            try {
                String tplContents = this.getStdReportTemplate(reportType);
                if (!tplContents.equals("")) {
                    logger.debug("Creating report-template "+reportType.getId()+" for company "+company.getId());
                    ReportTemplate reportTemplate = new ReportTemplate();
                    reportTemplate.setCompany(company);
                    reportTemplate.setOwner(user);
                    reportTemplate.setGroup(user.getMainGroup());
                    String name = company.getName1();
                    if ((name==null) || (name.trim().equals("")))
                        name=reportType.getId();
                    reportTemplate.setName(name);
                    reportTemplate.setContents(tplContents);
                    reportTemplate.setReadOther(true);
                    reportTemplate.setLastChangeUser(user);
                    reportTemplate.setReportType(reportType);
                    this.createDataset(reportTemplate,user,user.getMainGroup(),company);
                }
            } catch (Exception e) {
                logger.warn("Could not create standard-report-template",e);
            }
View Full Code Here

        super.createDataset(manager, reportTemplate, owner, owner, group, company);
    }

    public ReportTemplate findReportTemplate(long id) {
        logger.debug("Searching for report-template " + String.valueOf(id));
        ReportTemplate reportTemplate = manager.find(ReportTemplate.class, id);
        return reportTemplate;
    }
View Full Code Here

    /**
     *
     * @return A new template with the data from <code>mainReport</code> and the merged contents from <code>mainReport</code> and <code>templateToAdd</code>.
     */
    public ReportTemplate merge() {
        ReportTemplate reportTemplate = new ReportTemplate();
        reportTemplate.setName(this.getMainTemplate().getName());
        reportTemplate.setReportType(this.getMainTemplate().getReportType());
        reportTemplate.copyPermissionsFrom(this.getMainTemplate());
        reportTemplate.setContents(this.mergeContents());
        return reportTemplate;
    }
View Full Code Here

            return 2;
        }

        public Object getValueAt(int column, int row) {
            if (row < this.getJbsObjects().size()) {
                ReportTemplate reportTemplate = (ReportTemplate)this.getJbsObjects().get(row);

                switch (column) {
                    case 0:
                        if (reportTemplate.getName()!=null)
                            return reportTemplate.getName();
                        else
                            return "";
                    case 1:
                        if ((reportTemplate.getReportType()!=null) && (reportTemplate.getReportType().getId()!=null))
                            return reportTemplate.getReportType().getId();
                        else
                            return "";
                    default:
                        return "";
                }
View Full Code Here

        this.setCompany(company);
    }

    protected ReportTemplate findReportTemplate(ReportType reportType, JbsUser user, JbsCompany company) throws Exception {
        ReportTemplatesRemote reportTemplates = (ReportTemplatesRemote) ClientTools.getRemoteBean(ReportTemplatesRemote.class);
        ReportTemplate template = reportTemplates.findReportTemplate(reportType.getId(), user, company);
        if (template == null)
            throw new Exception("ReportTemplate.msgNotFound");
        return template;
    }
View Full Code Here

    protected ReportTypeSelect selReportType;
   

    public PnReportTemplateEdit() {
        super(DlgState.dsInsert);
        this.setReportTemplate(new ReportTemplate());
    }
View Full Code Here

TOP

Related Classes of org.jabusuite.core.reporting.ReportTemplate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.