文件中的 BIRT 数据库连接详细信息

问题描述 投票:0回答:1

我想从外部连接配置文件指定数据库连接详细信息。

config.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<DataTools.ServerProfiles version="1.0">
    <profile autoconnect="No" desc="" id="d04355a1-7c01-11ef-878c-9abc7ec407b6" name="claim2me_db_profile" providerID="org.eclipse.birt.report.data.oda.jdbc">
        <baseproperties>
            <property name="odaUser" value="user"/>
            <property name="metadataBidiFormatStr" value="ILYNN"/>
            <property name="odaDriverClass" value="org.postgresql.Driver"/>
            <property name="odaJndiName" value=""/>
            <property name="odaPassword" value="pass"/>
            <property name="disabledMetadataBidiFormatStr" value=""/>
            <property name="contentBidiFormatStr" value="ILYNN"/>
            <property name="odaURL" value="jdbc:postgresql://localhost:5432/my-postgres-database"/>
            <property name="disabledContentBidiFormatStr" value=""/>
        </baseproperties>
    </profile>
</DataTools.ServerProfiles>

创建文件并让数据源指向该文件后,BIRT 报表设计器会不断将这些行保存在报表文件中。我怎样才能阻止它保存这些行?

报告.rptdesign

    <property name="odaDriverClass">org.postgresql.Driver</property>
    <property name="odaURL">jdbc:postgresql://localhost:5432/my-postgres-database</property>
    <property name="odaUser">use</property>

无法找到其他方法将连接详细信息保存在单独的文件中。互联网只给出不完整的答案。

birt
1个回答
0
投票

恐怕你不能。 唯一的解决方案是在部署文件或将其保存到 Git 存储库之前手动删除这些行。 当然,请务必测试报告在没有这些行的情况下是否有效。

© www.soinside.com 2019 - 2024. All rights reserved.