diff options
-rw-r--r-- | reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java index ba652f14c209..78ac17a7ba08 100644 --- a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java +++ b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java @@ -259,7 +259,17 @@ public class SDBCReportDataFactory implements DataSourceFactory if (!expression.startsWith(quote) && columns.hasByName(expression)) { - expression = quote + expression + quote; + XPropertySet column; + try + { + column = UnoRuntime.queryInterface(XPropertySet.class, columns.getByName(expression)); + expression = quote + column.getPropertyValue("TableName") + quote + "." + quote + expression + quote; + } + catch (Exception ex) + { + Logger.getLogger(SDBCReportDataFactory.class.getName()).log(Level.SEVERE, null, ex); + expression = quote + expression + quote; + } } expression = expression.trim(); // Trim away white spaces |