---
title: "从BIRT报表文件中获取其使用数据源的数据库连接信息"
author: "boogie"
date: "2007-03-19T11:02:10Z"
tags: ["Java"]
slug: "birt"
draft: false
lastmod: "2007-03-19T11:02:10Z"
id: 60853
url: "https://boogie.iteye.com/blog/60853"
---

java 代码

 

1. design = engine.openReportDesign("test.rptdesign");
2. ReportDesignHandle report = (ReportDesignHandle) design.getDesignHandle( );
3. OdaDataSourceHandle dataSourceHandle = (OdaDataSourceHandle)
4. report.findDataSource( "Data Source Name" );
5. //odaDriverClass
6. //odaPassword
7. //odaUser
8. String odaurl = dataSourceHandle.getStringProperty( "odaURL" );