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();
}
Aggregations