summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-07-08 16:14:22 +0200
committerOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-07-08 16:14:22 +0200
commit9bd142499eb4254cbb413caaad31105da3b95eea (patch)
tree4df45398929fd7bc8e019080ce6d85600d4cdbd5 /reportbuilder
parent50fbc78991abce50a5dfa3e933f0adb6e0a75fc5 (diff)
dba33g: #i110535# add order with realname and table name
Diffstat (limited to 'reportbuilder')
-rw-r--r--reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java12
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