//ReportItems
for (ReportItem item : reportQuery.getItems()) {
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()) {