Search code examples
crystal-reportsbusiness-objectsbusiness-objects-sdk

How to update database configuration for Crystal Report with BusinessObjects Java SDK


I'm trying to update database configuration of a report using BO 4.2 SDK. Here is what I have tried.

query=Select SI_NAME,SI_ID From CI_INFOOBJECTS Where SI_PROGID = 'CrystalEnterprise.Report' 
                                 And SI_NAME= {report_name} And SI_PARENTID={parent_id};
IInfoObjects results = iStore.query(query);
IInfoObject report=(IInfoObject) results.get(0);

Both

IProperties parentLogonInfo = report.getProcessingInfo().properties().getProperties("SI_LOGON_INFO");

and

IProperties parentLogonInfo = report.getProcessingInfo().properties();

return null.

How should I update properties for report?


Solution

  • The specified query does not contain the SI_PROCESSINFO property. Therefore, you cannot retrieve it after the query is executed.

    Add the SI_PROCESSINFO property to your select clause and you will be able to access it after the query is executed.

    Select SI_NAME,SI_ID, SI_PROCESSINFO From CI_INFOOBJECTS Where SI_PROGID = 'CrystalEnterprise.Report' And SI_NAME= {report_name} And SI_PARENTID={parent_id}