for (Enumeration itemsEnum = reportQuery.getItems().elements(); itemsEnum.hasMoreElements();) {
ReportItem item = (ReportItem)itemsEnum.nextElement();
Expression expression = item.getAttributeExpression();
String itemName = item.getName();
StringWriter writer = new StringWriter();
ExpressionJavaPrinter javaPrinter = new ExpressionJavaPrinter(builderString, writer, project.getDatasourceLogin().getPlatform());
if (expression != null) {
String functionString;
Expression baseExpression; //used in ReportQuery API, e.g. addCount(itemName, baseExpression)
String databaseString = null; //used in addFunctionItem()
if (expression.isQueryKeyExpression()) {