Kaydet (Commit) 8aa99f59 authored tarafından Ocke Janssen [oj]'s avatar Ocke Janssen [oj]

check already quoted expression

üst b9407754
......@@ -210,7 +210,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
final Boolean escapeProcessing = (Boolean) parameters.get(ESCAPE_PROCESSING);
final String filter = (String) parameters.get(UNO_FILTER);
final Integer maxRows = (Integer) parameters.get("MaxRows");
RowSetProperties rowSetProps = new RowSetProperties(escapeProcessing, commandType, command, filter, maxRows);
final RowSetProperties rowSetProps = new RowSetProperties(escapeProcessing, commandType, command, filter, maxRows);
final Object[] p = createRowSet(rowSetProps, parameters);
final XRowSet rowSet = (XRowSet) p[0];
......@@ -260,7 +260,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
final Object[] pair = (Object[]) groupExpressions.get(i);
String expression = (String) pair[0];
if (columns.hasByName(expression))
if (!expression.startsWith(quote) && columns.hasByName(expression))
{
expression = quote + expression + quote;
}
......
......@@ -257,6 +257,11 @@ public class PentahoReportJob implements ReportJob
if (parameters.length > 0)
{
String name = parameters[0].toString();
if (parameters[0] instanceof ContextLookup)
{
final ContextLookup context = (ContextLookup) parameters[0];
name = context.getName();
}
for (int j = 0; j < reportFunctions.length; j++)
{
if (reportFunctions[j] instanceof FormulaExpression)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment