Search in sources :

Example 1 with SmjReportLogic

use of org.adempiere.excel.SmjReportLogic in project adempiere by adempiere.

the class SMJReportViewer method dynInit.

//renderReport
/**
			 * 	Dynamic Init
			 */
private void dynInit() {
    SmjReportLogic logic = new SmjReportLogic();
    data = logic.getDataReport(m_AD_PInstance_ID, trxName);
    generalTitle = logic.getGeneralTitle(reportId, trxName);
    clientName = logic.getOrgName(trxName);
    //				if (clientName.equals("") || clientName.length()<=0){
    //					clientName = logic.getClientName(trxName);
    //				}
    clientNIT = logic.getOrgNIT(trxName);
    periodName = logic.getPeriodName(p_C_Period_ID, trxName);
    currencyName = logic.getCurrency(trxName);
    codeFont = logic.getCodeFont(trxName, p_AD_PrintFont_ID);
    city = logic.getClientCity(trxName);
    //logo
    Properties prop = Env.getCtx();
    MOrgInfo oi = MOrgInfo.get(prop, Env.getAD_Org_ID(prop), null);
    logoId = oi.getLogo_ID();
    if (logoId <= 0) {
        MClientInfo ci = MClientInfo.get(prop);
        logoId = ci.getLogoReport_ID();
        if (logoId <= 0)
            logoId = ci.getLogo_ID();
    }
    SmjPdfReport pdf = new SmjPdfReport();
    baosPDF = pdf.generate(data, trxName, generalTitle, clientName, clientNIT, periodName, currencyName, m_columns, codeFont, city, logoId);
    filePdf = pdf.tofile(baosPDF.toByteArray(), generalTitle);
    revalidate();
}
Also used : SmjReportLogic(org.adempiere.excel.SmjReportLogic) SmjPdfReport(org.adempiere.pdf.SmjPdfReport) MOrgInfo(org.compiere.model.MOrgInfo) MClientInfo(org.compiere.model.MClientInfo) Properties(java.util.Properties)

Aggregations

Properties (java.util.Properties)1 SmjReportLogic (org.adempiere.excel.SmjReportLogic)1 SmjPdfReport (org.adempiere.pdf.SmjPdfReport)1 MClientInfo (org.compiere.model.MClientInfo)1 MOrgInfo (org.compiere.model.MOrgInfo)1