strOrderby = strHaving + strOrderby;
// Checks if there is a conversion rate for each of the transactions of
// the report
String strConvRateErrorMsg = "";
OBError myMessage = null;
myMessage = new OBError();
if (strComparative.equals("Y")) {
try {
data = ReportPurchaseDimensionalAnalysesJRData.select(this, strCurrencyId, strTextShow[0],
strTextShow[1], strTextShow[2], strTextShow[3], strTextShow[4], Tree.getMembers(this,
TreeData.getTreeOrg(this, vars.getClient()), strOrg), Utility.getContext(this,
vars, "#User_Client", "ReportPurchaseDimensionalAnalysesJR"), strDateFrom,
DateTimeData.nDaysAfter(this, strDateTo, "1"), strPartnerGroup, strcBpartnerId,
strProductCategory, strmProductId, strDateFromRef, DateTimeData.nDaysAfter(this,
strDateToRef, "1"), strOrderby);
} catch (ServletException ex) {
myMessage = Utility.translateError(this, vars, vars.getLanguage(), ex.getMessage());
}
} else { // no comparative report using JasperReports
try {
data = ReportPurchaseDimensionalAnalysesJRData.selectNoComparative(this, strCurrencyId,
strTextShow[0], strTextShow[1], strTextShow[2], strTextShow[3], strTextShow[4], Tree
.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg), Utility
.getContext(this, vars, "#User_Client", "ReportPurchaseDimensionalAnalysesJR"),
strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), strPartnerGroup,
strcBpartnerId, strProductCategory, strmProductId, strOrderby);
} catch (ServletException ex) {
myMessage = Utility.translateError(this, vars, vars.getLanguage(), ex.getMessage());
}
}
strConvRateErrorMsg = myMessage.getMessage();
// If a conversion rate is missing for a certain transaction, an error
// message window pops-up.
if (!strConvRateErrorMsg.equals("") && strConvRateErrorMsg != null) {
advisePopUp(request, response, "ERROR", Utility.messageBD(this, "NoConversionRateHeader",
vars.getLanguage()), strConvRateErrorMsg);