简体   繁体   English

Pentaho Report Designer为什么要向报表的数据库连接添加名为“ ce”的参数?

[英]Why is Pentaho Report Designer adding parameter named “ce” to Database Connection of the report?

I am forced to use Pentaho Report Designer 5.4 and have following problem: Every time i try to make changes to Database Connection of the report, inside Options section designer adds parameter "ce" without any value - even if i previously deleted it (please see images below). 我被迫使用Pentaho Report Designer 5.4,并遇到以下问题:每当我尝试更改报表的数据库连接时,在Options部分中,designer都会添加不带任何值的参数“ ce”-即使我以前删除了它(请参阅下图)。 When i open .prpt file and look inside sql-ds.xml, connection url looks as follows: "jdbc:sqlserver://192.168.1.194:1433;databaseName=statdb;integratedSecurity=false;ce" 当我打开.prpt文件并查看sql-ds.xml时,连接URL如下所示: "jdbc:sqlserver://192.168.1.194:1433;databaseName=statdb;integratedSecurity=false;ce"

problem is that my report was not loading at all. 问题是我的报告根本没有加载。 I looked into report log and found following lines: 我查看了报告日志,发现以下几行:

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection string contains a badly formed name or value.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190) ~[sqljdbc4.jar!/:na]
    at com.microsoft.sqlserver.jdbc.Util.parseUrl(Util.java:445) ~[sqljdbc4.jar!/:na]
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.parseAndMergeProperties(SQLServerDriver.java:1026) ~[sqljdbc4.jar!/:na]
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1008) ~[sqljdbc4.jar!/:na]

I assume that appending parameter "ce" is causing the problem. 我认为附加参数“ ce”会引起问题。 I have 2 questions: 我有两个问题:

  1. Why is Pentaho Report Designer adding parameter named "ce" to Database Connection of the report? Pentaho Report Designer为什么要向报表的数据库连接添加名为“ ce”的参数?

  2. Is Connection url in right format? 连接网址格式正确吗? Is parameter "ce" appended correctly? 参数“ ce”是否正确附加?

    在此处输入图片说明 在此处输入图片说明

This is 'instance name' defined such fashion. 这就是以这种方式定义的“实例名称”。 In your case option is blank since as I see on UI Instance name is also blank. 在您的情况下,选项为空,因为正如我在UI上看到的那样,实例名称也为空。

This is a bug most probably - 'ce' automatically added when connection edited. 这很可能是一个错误-编辑连接时会自动添加“ ce”。 If you don't want database editor attempts to tweak you connection string such fashion - use 'Generic database' connection. 如果您不希望数据库编辑器尝试以这种方式调整连接字符串,请使用“通用数据库”连接。 You will have to specify full java class name and connection jdbc connection string. 您将必须指定完整的Java类名称和连接jdbc连接字符串。 Also you have to have this jdbc driver on classpath and it can workaround most of such 'edit connection' issues. 另外,您还必须在类路径上安装此jdbc驱动程序,并且它可以解决大多数此类“编辑连接”问题。

Full guide can be found jdbc sqlserver dirver class 完整的指南可以找到jdbc sqlserver dirver类

在此处输入图片说明

Run this query and get your instance name , and assign that value to the ce property in the Options tab and there you go :) 运行此查询并获取您的实例名称 ,然后将该值分配给“ 选项”选项卡中ce属性,然后就可以了:)

SELECT HOST_NAME() AS HostName, SUSER_NAME() LoggedInUser,SERVERPROPERTY('MachineName') AS [ServerName],
                     SERVERPROPERTY('ServerName') AS [ServerInstanceName],
            SERVERPROPERTY('InstanceName') AS [Instance],
            SERVERPROPERTY('Edition') AS [Edition],
            SERVERPROPERTY('ProductVersion') AS [ProductVersion],
                     Left(@@Version, Charindex('-', @@version) - 2) As VersionName

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM