Examples of ReportTemplate


Examples of org.jabusuite.core.reporting.ReportTemplate

        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

Examples of org.jabusuite.core.reporting.ReportTemplate

    /**
     *
     * @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

Examples of org.jabusuite.core.reporting.ReportTemplate

            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

Examples of org.jabusuite.core.reporting.ReportTemplate

        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

Examples of org.jabusuite.core.reporting.ReportTemplate

    protected ReportTypeSelect selReportType;
   

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

Examples of pl.net.bluesoft.rnd.pt.ext.report.model.ReportTemplate

    public static JasperReport getReport(String reportName) {
        JasperReport jasperReport = null;
/*        ClassLoader previousLoader = null;
        Thread t = Thread.currentThread();*/
        try {
            ReportTemplate template = new ReportDAO().loadByName(reportName);
            if (template == null)
                throw new Exception("Report template does not exist for name: ".concat(reportName));
            ProcessToolContext ctx = ProcessToolContext.Util.getThreadProcessToolContext();
            ByteArrayInputStream contentInputStream = new ByteArrayInputStream(Base64.decodeBase64(
                    (new String(template.getContent())).getBytes("UTF-8")));
//            previousLoader = t.getContextClassLoader();
//            ClassLoader newClassLoader = ctx.getRegistry().getModelAwareClassLoader(
//                    JasperReportingUtil.class.getClassLoader());
//            t.setContextClassLoader(newClassLoader);
            jasperReport = JasperCompileManager.compileReport(contentInputStream);
View Full Code Here

Examples of pl.net.bluesoft.rnd.pt.ext.report.model.ReportTemplate

    }
  }

  protected byte[] buildReport(ProcessInstance processInstance) throws ReportException {
    // LOAD TEMPLATE
    ReportTemplate template = new ReportDAO().loadByName(reportName);
    if (template == null)
      throw new ReportException("Report template does not exist!");
    // COMPILE REPORT
    JasperReport jasperReport = null;
    ProcessToolContext ctx = ProcessToolContext.Util.getThreadProcessToolContext();
    try {
      ByteArrayInputStream contentInputStream = getContentInputStream(template.getContent());
      Thread t = Thread.currentThread();
      ClassLoader previousLoader = t.getContextClassLoader();
      try {
        ClassLoader newClassLoader = ctx.getRegistry().getModelAwareClassLoader(getClass().getClassLoader());
        t.setContextClassLoader(newClassLoader);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.