ReportDesign

Use this forum to report bugs and to check for bugfixes and new releases of OpenEMM

Moderator: moderator

e.mail.guru
Posts: 9
Joined: Tue Sep 01, 2020 8:19 am

ReportDesign

Post by e.mail.guru »

Hi there,

We no longer see the statistics after the mail has been sent, but we do see this error message:

The following items have errors:

ReportDesign (id = 1):
+ Invalid javascript expression: Wrapped org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [CREATE TABLE tmp_report_aggregation_-1_tbl (category VARCHAR(200), category_index INTEGER, targetgroup_id INTEGER, targetgroup VARCHAR(200), targetgroup_index INTEGER, value INTEGER, rate DOUBLE, rate_delivered DOUBLE)]; nested exception is java.sql.SQLSyntaxErrorException: Syntax error: Encountered "-" at line 1, column 37. (/report/method[@name="initialize"]#43)
ReportDesign (id = 1):
+ There are errors evaluating script "importPackage(Packages.com.agnitas.reporting.birt.external.dataset);
mailingSummaryDataSet = new Packages.com.agnitas.reporting.birt.external.dataset.MailingSummaryDataSet();
mailingSummaryData = mailingSummaryDataSet.getSummaryData(parseInt(reportContext.getGlobalVariable("tempTableID")));
currentrow = 0;

max = 0;
for (i = 0; i < mailingSummaryData.size(); i++) {
categoryIndex = mailingSummaryData.get(i).getCategoryindex();
value = mailingSummaryData.get(i).getCount();
if (categoryIndex == CommonKeys.REVENUE_INDEX) {
value = value / 100;
}

if (categoryIndex <= CommonKeys.REVENUE_INDEX && value > max) {
max = value;
}
}

reportContext.setGlobalVariable("maxValue", parseInt(max));
reportContext.setGlobalVariable("total_sent", parseInt(0));
reportContext.setGlobalVariable("total_delivered", parseInt(0));":
Fail to execute script in function __bm_OPEN(). Source:
------
" + importPackage(Packages.com.agnitas.reporting.birt.external.dataset);
mailingSummaryDataSet = new Packages.com.agnitas.reporting.birt.external.dataset.MailingSummaryDataSet();
mailingSummaryData = mailingSummaryDataSet.getSummaryData(parseInt(reportContext.getGlobalVariable("tempTableID")));
currentrow = 0;

max = 0;
for (i = 0; i < mailingSummaryData.size(); i++) {
categoryIndex = mailingSummaryData.get(i).getCategoryindex();
value = mailingSummaryData.get(i).getCount();
if (categoryIndex == CommonKeys.REVENUE_INDEX) {
value = value / 100;
}

if (categoryIndex <= CommonKeys.REVENUE_INDEX && value > max) {
max = value;
}
}

reportContext.setGlobalVariable("maxValue", parseInt(max));
reportContext.setGlobalVariable("total_sent", parseInt(0));
reportContext.setGlobalVariable("total_delivered", parseInt(0)); + "
-----
A BIRT exception occurred. See next exception for more information.
Cannot convert NaN to java.lang.Integer (/report/data-sets/script-data-set[@id="644"]/method[@name="open"]#3).
+ There are errors evaluating script "importPackage(Packages.com.agnitas.messages);
importPackage(Packages.com.agnitas.reporting.birt.external.dataset);

if( currentrow >= mailingSummaryData.size() ) {
return false;
}
currentRowData = mailingSummaryData.get(currentrow);

row["categoryKey"] = currentRowData.getCategory();
switch (currentRowData.getCategoryindex()) {
case CommonKeys.CLICKER_PC_AND_MOBILE_INDEX:
row["category"] = getTranslation("statistic.clicker.multiple");
break;
case CommonKeys.OPENERS_PC_AND_MOBILE_INDEX:
row["category"] = getTranslation("report.opens.pc.and.mobileWithNote");
break;
case CommonKeys.OPENERS_INVISIBLE_INDEX:
row["category"] = getTranslation("report.opens.invisible");
break;
case CommonKeys.OPENERS_MEASURED_INDEX:
row["category"] = getTranslation("report.opens.measured");
break;
default:
row["category"] = getTranslation(currentRowData.getCategory());
break;
}

row["category_index"] = currentRowData.getCategoryindex();

// do some i18n stuff
if( currentRowData.getTargetgroupindex() == 1) {
row["targetgroup"] = getTranslation("statistic.all_subscribers");
if (currentRowData.getCategoryindex() == CommonKeys.DELIVERED_EMAILS_INDEX) {
total_sent = parseInt(reportContext.getGlobalVariable("total_sent"));
reportContext.setGlobalVariable("total_sent", total_sent + parseInt(currentRowData.getCount()));
}
if (currentRowData.getCategoryindex() == CommonKeys.DELIVERED_EMAILS_DELIVERED_INDEX) {
total_delivered = parseInt(reportContext.getGlobalVariable("total_delivered"));
reportContext.setGlobalVariable("total_delivered", total_delivered + parseInt(currentRowData.getCount()));
}
}
else {
row["targetgroup"] = currentRowData.getTargetgroup();
}


row["targetgroup_index"] = currentRowData.getTargetgroupindex();
row["value"] = currentRowData.getCount();
row["rate"] = currentRowData.getRate();
if (row["rate"] == -1) {
row["rate"] = 0;
}
row["deliveredRate"] = currentRowData.getDeliveredRate();
if (row["deliveredRate"] == -1) {
row["deliveredRate"] = 0;
}

currentrow++;
return true;":
Fail to execute script in function __bm_FETCH(). Source:
------
" + importPackage(Packages.com.agnitas.messages);
importPackage(Packages.com.agnitas.reporting.birt.external.dataset);

if( currentrow >= mailingSummaryData.size() ) {
return false;
}
currentRowData = mailingSummaryData.get(currentrow);

row["categoryKey"] = currentRowData.getCategory();
switch (currentRowData.getCategoryindex()) {
case CommonKeys.CLICKER_PC_AND_MOBILE_INDEX:
row["category"] = getTranslation("statistic.clicker.multiple");
break;
case CommonKeys.OPENERS_PC_AND_MOBILE_INDEX:
row["category"] = getTranslation("report.opens.pc.and.mobileWithNote");
break;
case CommonKeys.OPENERS_INVISIBLE_INDEX:
row["category"] = getTranslation("report.opens.invisible");
break;
case CommonKeys.OPENERS_MEASURED_INDEX:
row["category"] = getTranslation("report.opens.measured");
break;
default:
row["category"] = getTranslation(currentRowData.getCategory());
break;
}

row["category_index"] = currentRowData.getCategoryindex();

// do some i18n stuff
if( currentRowData.getTargetgroupindex() == 1) {
row["targetgroup"] = getTranslation("statistic.all_subscribers");
if (currentRowData.getCategoryindex() == CommonKeys.DELIVERED_EMAILS_INDEX) {
total_sent = parseInt(reportContext.getGlobalVariable("total_sent"));
reportContext.setGlobalVariable("total_sent", total_sent + parseInt(currentRowData.getCount()));
}
if (currentRowData.getCategoryindex() == CommonKeys.DELIVERED_EMAILS_DELIVERED_INDEX) {
total_delivered = parseInt(reportContext.getGlobalVariable("total_delivered"));
reportContext.setGlobalVariable("total_delivered", total_delivered + parseInt(currentRowData.getCount()));
}
}
else {
row["targetgroup"] = currentRowData.getTargetgroup();
}


row["targetgroup_index"] = currentRowData.getTargetgroupindex();
row["value"] = currentRowData.getCount();
row["rate"] = currentRowData.getRate();
if (row["rate"] == -1) {
row["rate"] = 0;
}
row["deliveredRate"] = currentRowData.getDeliveredRate();
if (row["deliveredRate"] == -1) {
row["deliveredRate"] = 0;
}

currentrow++;
return true; + "
-----
A BIRT exception occurred. See next exception for more information.
ReferenceError: "mailingSummaryData" is not defined. (/report/data-sets/script-data-set[@id="644"]/method[@name="fetch"]#4).
+ Data Set script method "Fetch" returned null; expected a Boolean value.
+ There are errors evaluating script "importPackage(Packages.com.agnitas.messages);
importPackage(Packages.com.agnitas.reporting.birt.external.dataset);

if( currentrow >= mailingSummaryData.size() ) {
return false;
}
currentRowData = mailingSummaryData.get(currentrow);

row["categoryKey"] = currentRowData.getCategory();
switch (currentRowData.getCategoryindex()) {
case CommonKeys.CLICKER_PC_AND_MOBILE_INDEX:
row["category"] = getTranslation("statistic.clicker.multiple");
break;
case CommonKeys.OPENERS_PC_AND_MOBILE_INDEX:
row["category"] = getTranslation("report.opens.pc.and.mobileWithNote");
break;
case CommonKeys.OPENERS_INVISIBLE_INDEX:
row["category"] = getTranslation("report.opens.invisible");
break;
case CommonKeys.OPENERS_MEASURED_INDEX:
row["category"] = getTranslation("report.opens.measured");
break;
default:
row["category"] = getTranslation(currentRowData.getCategory());
break;
}

row["category_index"] = currentRowData.getCategoryindex();

// do some i18n stuff
if( currentRowData.getTargetgroupindex() == 1) {
row["targetgroup"] = getTranslation("statistic.all_subscribers");
if (currentRowData.getCategoryindex() == CommonKeys.DELIVERED_EMAILS_INDEX) {
total_sent = parseInt(reportContext.getGlobalVariable("total_sent"));
reportContext.setGlobalVariable("total_sent", total_sent + parseInt(currentRowData.getCount()));
}
if (currentRowData.getCategoryindex() == CommonKeys.DELIVERED_EMAILS_DELIVERED_INDEX) {
total_delivered = parseInt(reportContext.getGlobalVariable("total_delivered"));
reportContext.setGlobalVariable("total_delivered", total_delivered + parseInt(currentRowData.getCount()));
}
}
else {
row["targetgroup"] = currentRowData.getTargetgroup();
}


row["targetgroup_index"] = currentRowData.getTargetgroupindex();
row["value"] = currentRowData.getCount();
row["rate"] = currentRowData.getRate();
if (row["rate"] == -1) {
row["rate"] = 0;
}
row["deliveredRate"] = currentRowData.getDeliveredRate();
if (row["deliveredRate"] == -1) {
row["deliveredRate"] = 0;
}

currentrow++;
return true;":
Fail to execute script in function __bm_FETCH(). Source:
------
" + importPackage(Packages.com.agnitas.messages);
importPackage(Packages.com.agnitas.reporting.birt.external.dataset);

if( currentrow >= mailingSummaryData.size() ) {
return false;
}
currentRowData = mailingSummaryData.get(currentrow);

row["categoryKey"] = currentRowData.getCategory();
switch (currentRowData.getCategoryindex()) {
case CommonKeys.CLICKER_PC_AND_MOBILE_INDEX:
row["category"] = getTranslation("statistic.clicker.multiple");
break;
case CommonKeys.OPENERS_PC_AND_MOBILE_INDEX:
row["category"] = getTranslation("report.opens.pc.and.mobileWithNote");
break;
case CommonKeys.OPENERS_INVISIBLE_INDEX:
row["category"] = getTranslation("report.opens.invisible");
break;
case CommonKeys.OPENERS_MEASURED_INDEX:
row["category"] = getTranslation("report.opens.measured");
break;
default:
row["category"] = getTranslation(currentRowData.getCategory());
break;
}

row["category_index"] = currentRowData.getCategoryindex();

// do some i18n stuff
if( currentRowData.getTargetgroupindex() == 1) {
row["targetgroup"] = getTranslation("statistic.all_subscribers");
if (currentRowData.getCategoryindex() == CommonKeys.DELIVERED_EMAILS_INDEX) {
total_sent = parseInt(reportContext.getGlobalVariable("total_sent"));
reportContext.setGlobalVariable("total_sent", total_sent + parseInt(currentRowData.getCount()));
}
if (currentRowData.getCategoryindex() == CommonKeys.DELIVERED_EMAILS_DELIVERED_INDEX) {
total_delivered = parseInt(reportContext.getGlobalVariable("total_delivered"));
reportContext.setGlobalVariable("total_delivered", total_delivered + parseInt(currentRowData.getCount()));
}
}
else {
row["targetgroup"] = currentRowData.getTargetgroup();
}


row["targetgroup_index"] = currentRowData.getTargetgroupindex();
row["value"] = currentRowData.getCount();
row["rate"] = currentRowData.getRate();
if (row["rate"] == -1) {
row["rate"] = 0;
}
row["deliveredRate"] = currentRowData.getDeliveredRate();
if (row["deliveredRate"] == -1) {
row["deliveredRate"] = 0;
}

currentrow++;
return true; + "
-----
A BIRT exception occurred. See next exception for more information.
TypeError: Cannot call method "size" of null (/report/data-sets/script-data-set[@id="644"]/method[@name="fetch"]#4).
Chart NewChart11:
+ Wrapped java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at line 23 of chart script:''
Chart NewChart111:
+ Wrapped java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at line 28 of chart script:''
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: ReportDesign

Post by maschoff »

OpenEMM tries to create a temp table with a negative temp table ID (tmp_report_aggregation_-1_tbl). However a hypen in a table name is not allowed. Looks to me like OpenEMM ran out of positive temp table IDs. Could it be that your OpenEMM instance has a very long uptime? If so, please restart.
OpenEMM Maintainer
Post Reply