XmlDocument xmlDocument = null;
ReportExpenseData[] data1 = null;
// Checks if there is a conversion rate for each of the transactions of
// the report
String strConvRateErrorMsg = "";
OBError myMessage = null;
myMessage = new OBError();
if (vars.commandIn("DEFAULT") && strDateFrom.equals("") && strDateTo.equals("")
&& strcBpartnerId.equals("") && strPartner.equals("")) {
printPageDataSheet(response, vars, strDateFrom, strDateTo, strcBpartnerId, strPartner,
strProject, strExpense, strCurrencyId);
} else {
String strBaseCurrencyId = Utility.stringBaseCurrencyId(this, vars.getClient());
try {
data1 = ReportExpenseData.select(this, strCurrencyId, strBaseCurrencyId,
vars.getLanguage(), Utility.getContext(this, vars, "#User_Client", "ReportExpense"),
Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportExpense"), strDateFrom,
DateTimeData.nDaysAfter(this, strDateTo, "1"), strcBpartnerId, strPartner, strProject,
(strExpense.equals("time") ? "Y" : ""), (strExpense.equals("expense") ? "N" : ""));
} 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);