【BO-SDK】Update Database information for .rpt     (BOE SDK Java Applications @_1)
簡單修改BOE上資料庫連線引數,替代CMC的手動修改,此處不涉及LOV動態列表,非RAS-SDK操作。
【for Java】
[@more@]import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.crystaldecisions.sdk.plugin.desktop.common.IReportLogon;
import com.crystaldecisions.sdk.plugin.desktop.report.IReport;
public class Update_Database_Info {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String username = "Administrator";
String password = "****7";
String cmsName = "pvg*******:6400";
String authType = "secEnterprise";
String reportName = "Sales Dashboard";
IInfoObjects oInfoObjects=null;
IInfoObject oInfoObject=null;
IEnterpriseSession boEnterpriseSession;
try {
boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( username, password, cmsName, authType);
IInfoStore boInfoStore = (IInfoStore) boEnterpriseSession.getService("", "InfoStore");
oInfoObjects = (IInfoObjects) boInfoStore.query("Select * from CI_INFOOBJECTS Where SI_INSTANCE=0 And SI_NAME='" + reportName + "'");//確切為ID
//oInfoObjects = (IInfoObjects) boInfoStore.query("Select * from CI_INFOOBJECTS Where SI_INSTANCE=0 And SI_ID='13399'");
oInfoObject = (IInfoObject) oInfoObjects.get(0);
//cast the InfoObject as a Report Object
IReport oReport = (IReport)oInfoObject;
IReportLogon rptLogon = (IReportLogon) oReport.getReportLogons().get(0);
rptLogon.setOriginalDataSource(true);
//rptLogon.setOriginalDataSource(false);
rptLogon.setPromptOnDemandViewing(false);
rptLogon.setUserName("User***");
rptLogon.setPassword("Pass***");
//rptLogon.setCustomUserName("CusUser***");
//rptLogon.setCustomPassword("CusPass***");
boInfoStore.commit(oInfoObjects);
System.out.println(reportName + "'s logon information has been reset successfully.");
} catch (SDKException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24167472/viewspace-1037952/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【BO-SDK】SSO InfoView_1 (BOE SDK Java Applications @_2)ViewJavaAPP
- 【BO-SDK】-(RAS) Add summary to a group_@old_devlib_03dev
- 【BO-SDK】-(RAS) Unmanaged RAS Session get_@old_devlib_05Sessiondev
- 【BO-SDK】-(RAS) Adding a new parameter_@old_devlib_04dev
- Applications1APP
- CORS filter for Java applicationsCORSFilterJavaAPP
- Information On Installed Database Components and Schemas (Doc ID 472937.1)ORMDatabase
- Information On Installed Database Components and Schemas (文件 ID 472937.1)ORMDatabase
- goldengate 目的端同步無主鍵無索引表時的rpt日誌(做update操作)Go索引
- OGG-01453 Database login information not specified in parameter fileDatabaseORM
- Certification Information for Oracle Database on Linux x86-64 [ID 1304727.1]ORMOracleDatabaseLinux
- RPT8.1新特性
- Windows 8.1 Update 1上手Windows
- java EE 8u1 SDK 包和 java EE 8 API 文件包JavaAPI
- Abp框架之執行Update-Database 命令系列錯誤框架Database
- TNS-12535 Unable To Connect To Remote Database using certain ApplicationsREMDatabaseAIAPP
- Types of Oracle Database Users : Database Administrators (1)OracleDatabase
- 組播分發 SPT&RPT
- SqlServer——神奇程式碼1之UpdateSQLServer
- Multicore processing for client-side Java applicationsclientIDEJavaAPP
- Uncertainy and informationAIORM
- HOW TO INTEGRATE APPLICATIONS RELEASE 11 WITH CUSTOM APPLICATIONSAPP
- Database | 淺談Query Optimization (1)Database
- Java 封裝 SDK 以及使用Java封裝
- 2.10 java SDK的使用Java
- 微信Java SDK開發文件Java
- Applications 5APP
- 海康威視Java SDK拉流(一)初始化SDKJava
- FFMpeg SDK 開發手冊 1
- [SAP BO]BOE的 檔案許可權設定
- How to Tell if the I/O of the Database is Slow - 1Database
- Nacos系列:Nacos的Java SDK使用Java
- 【1】淘寶sdk裝修入門引言
- Dependencies of Applications (256)APP
- Graph Theory with ApplicationsGraph TheoryAPP
- [Information Security] What is WEPORM
- Oracle Lock Information QueriesOracleORM
- Windows Update與Microsoft UpdateWindowsROS