Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: Set "Use same database logon as when report is run" from SDK

$
0
0

You can use the below snippet as a prototype which shows how you can get the nested properties and set values for the same.

 

IInfoObject oInfoObject=(IInfoObject)oInfoObjects.get(0);

IProperties props=(IProperties)oInfoObject.properties();

IProperties reportLogonProps=(IProperties)props.getProperties("SI_LOGON_INFO");

if(reportLogonProps != null)

   {

   IProperty numOfLogon=(IProperty)reportLogonProps.getProperty("SI_NUM_LOGONS");

  

   if(numOfLogon != null)

   {

   String numOfLogonValue=numOfLogon.getValue().toString();

    Integer outputFile=new Integer(numOfLogonValue);

    for(int j=1 ; j<=outputFile.intValue() ; j++)

    {

    IProperties logonProperties= reportLogonProps.getProperties("SI_LOGON"+j);

    IProperty logonModeProperty=logonProperties.getProperty("SI_LOGON_MODE");

    logonModeProperty.setValue("1");

    }

    }

   }

infostore.commit(oInfoObjects);

 

Thnaks,

Prithvi


Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>