on 01-14-2016 10:58 AM
Hi,
I want to change the date of SI_UPDATE_TS based on each ReportId using Java SDK.
I tried the below code,date is not updating.Please anyone give me the correct code to update the date.
IEnterpriseSession enterprisesession=null;
IInfoStore infostore;
IInfoObjects boInfoObjects=null;
String destDate="1/11/16 11:40:30 PM";
enterprisesession =CrystalEnterprise.getSessionMgr().logon(username,Password,cmsname,authType);
infostore=(IInfoStore)enterprisesession.getService("","Infostore");
int max_id=0;
int docID=670223;
boInfoObjects=(IInfoObjects)infostore.query("Select * from ci_infoobjects where si_kind='WEBI' and si_id="+docID+" ORDER BY SI_ID ASC");
for(Iterator boCount=boInfoObjects.iterator();boCount.hasNext())
IInfoObject boObject=(IInfoObject)boCount.next();
boObject.properties().setProperty("SI_UPDATE_TS",destDate);
System.out.Println("Update date:"+boObject.properties().getProperty("SI_UPDATE_TS").getValue());
max_id=boObject.getID();
infoStore.commit(boInfoObjects);
System.Out.Println("Completed');
Regards,
Kavitha S
Only way I know of to do this is to export the objects to a BIAR file, rename the file to .zip, unzip it, extract BusinessObjects.xml, change the date/time for the object, re-zip it, rename it back to BIAR, and finally import the BIAR.
Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The SI_UPDATE_TS property bag holds the time when the object was last updated. Therefore I do not understand the purpose of updating this property.
However, if through your code, you update the property bag, then while performing a commit on the infoobject, the operation would mean an update to the infoobject, thus this property would take the current system time rather than the time you are setting.
Hope I was clear.
Thanks,
Prithvi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.