docs: public static String createCustomExpressionInvocationText(CustomExpression customExpression, String customExpName, boolean usePreviousFieldValues) {
          String stringExpression;
          if (customExpression instanceof DJSimpleExpression) {
              DJSimpleExpression varexp = (DJSimpleExpression) customExpression;
              String symbol;
              switch (varexp.getType()) {
                  case DJSimpleExpression.TYPE_FIELD:
                      symbol = "F";
                      break;
                  case DJSimpleExpression.TYPE_VARIABLE:
                      symbol = "V";
                      break;
                  case DJSimpleExpression.TYPE_PARAMATER:
                      symbol = "P";
                      break;
                  default:
                      throw new DJException("Invalid DJSimpleExpression, type must be FIELD, VARIABLE or PARAMETER");
              }
              stringExpression = "$" + symbol + "{" + varexp.getVariableName() + "}";
  
          } else {
              String fieldsMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getCurrentFields()";
              if (usePreviousFieldValues) {
                  fieldsMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getPreviousFields()";
              }
  
              String parametersMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getCurrentParams()";
              String variablesMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getCurrentVariables()";
  
              stringExpression = "((" + CustomExpression.class.getName() + ")$P{REPORT_PARAMETERS_MAP}.get(\"" + customExpName + "\"))."
                      + CustomExpression.EVAL_METHOD_NAME + "( " + fieldsMap + ", " + variablesMap + ", " + parametersMap + " )";
          }
  
          return stringExpression;
      }