Datenwerke ReportServer,无法添加自定义数据源 (Caché)

Datenwerke ReportServer, trouble adding custom Data Source (Caché)

我正在使用 Datenwerke ReportServer。我正在尝试通过 DJBC 使用 Caché 源。 Here is a blog post from them on adding additional databases。不幸的是,我并不完全理解它。我在正确的位置有 JDBC 文件,我已经为下面的 Caché 创建了一个 groovy 脚本。这个问题与它所做的奇怪的查询包装器有关。我可以通过 ReportServer UI 成功测试数据源,但是当我尝试执行一个简单的查询时,出现以下错误:

Error

Query could not be prepared: Error preparing statement for executing the report query : SELECT * FROM (SELECT * FROM (SELECT TOP 10 * FROM HS_IHE_ATNA_Repository.Aggregation) wrappedQry) limitQry LIMIT 50 OFFSET 0 /* token: 6aab148a-927b-45d5-9dfd-724788e139ca / / currentuser: 3 */

cache.groovy

package databasehelper;

import net.datenwerke.rs.scripting.service.scripting.scriptservices.GlobalsWrapper;
import net.datenwerke.rs.base.service.dbhelper.DatabaseHelper
import net.datenwerke.rs.base.service.dbhelper.hooks.DatabaseHelperProviderHook
import net.datenwerke.rs.base.service.dbhelper.queries.Query
import net.datenwerke.rs.base.service.dbhelper.querybuilder.ColumnNamingService
import net.datenwerke.rs.base.service.dbhelper.querybuilder.QueryBuilder

class Cache extends DatabaseHelper {

    public static final String DB_NAME = "Cache";
    public static final String DB_DRIVER = "com.intersys.jdbc.CacheDriver";
    public static final String DB_DESCRIPTOR = "DBHelper_Cache";

    @Override
    public String getDescriptor() {
        return DB_DESCRIPTOR;
    }

    @Override
    public String getDriver() {
        return DB_DRIVER;
    }

    @Override
    public String getName() {
        return DB_NAME;
    }

    @Override
    public String createDummyQuery() {
    return 'SELECT * FROM HS_IHE_ATNA_Repository.Aggregation'
    }

}


def HOOK_NAME = "DATASOURCE_HELPER_Cache"

def callback =  [
            provideDatabaseHelpers : {
                return Collections.singletonList(new Cache());
            }
        ] as DatabaseHelperProviderHook;

GLOBALS.services.callbackRegistry.attachHook(HOOK_NAME, DatabaseHelperProviderHook.class, callback)

在这里发帖似乎不太可能,尤其是

通知生成的查询:

SELECT * FROM (SELECT * FROM 
(SELECT TOP 10 * FROM HS_IHE_ATNA_Repository.Aggregation) 
wrappedQry) limitQry LIMIT 50 OFFSET 0

Caché SQL 不支持 LIMITOFFSET

%VIDTOP 可以在 Caché SQL 中使用,而不是 LIMIT / OFFSEThttp://docs.intersystems.com/cache20152/csp/docbook/DocBook.UI.Page.cls?KEY=GSQL_views#GSQL_C13474