BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Want to sponsor BOB? 
Want to sponsor BOB? (Opens a new window)  

General Notice: Upcoming Events: PGHBOUG: Apr 4.

Change XI 3.1 DeskI FullClient Refresh on Open via SDK


 
Search this topic... | Search SDK (VBA/ASP/JSP)... | Search Box
Register or Login to Post    Forum Index -> SDK (VBA/ASP/JSP)  Previous TopicPrint TopicNext Topic
Author Message
ntruhan
Forum Member
Forum Member



Joined: 14 Jul 2015

Posts: 5



PostPosted: Thu Jan 31, 2019 2:10 pm 
Post subject: Change XI 3.1 DeskI FullClient Refresh on Open via SDK

Hello,
Yes, this is a DeskI client in 2019. Doing a mass migration from 3.1 to 4.2 for a client and there are hundreds of reports coming out of the woodwork. Of course some of these have refresh on open and some have invalid local providers we can't use now. So one task is to turn off the refresh piece. Now yes, I could open each report in DeskI and goto Tools-> Options -> Save and uncheck the Refresh on open, but there are quite a few. So I am trying the old 3.1 SDK to do this.

I can connect to the system, load the FullClient Reports and iterate through them. I have a helper class that does all the queries, etc..

Code:

final String qry = "Select top 100000 * from CI_INFOOBJECTS where SI_KIND = 'FullClient' AND SI_INSTANCE = 0";
   
IInfoObjects objs = qh.run(qry);
for (int i = 0; i < objs.size(); i++) {
  IFullClient rpt = (IFullClient) objs.get(i);

   if (rpt != null) {
     if (rpt.getRefreshOnOpen()) {
         rpt.setRefreshOnOpen(false);
         rpt.save();
      }
   }
}

...

Now this actually iterates through, checks a flag in the query, supposedly sets the flag and saves. I can see the date updated on the report in the CMC after the save. And if I query on a report by its name in the AdminTools, I see the SI_ISREFRESHONOPEN is set to false if it was true, so that updates. BUT if I open a report in DeskI that was changed, the report itself didn't actually change and going to Tools-> Options -> Save still shows the Refresh Document When Opening Flag checked. banghead.gif

Has anyone done this before in SDK?
Thanks,
Nathan
Code:
Back to top
joepeters
Forum Fanatic
Forum Fanatic



Joined: 29 Aug 2002

Posts: 6488
Location: Connecticut, USA


flag
PostPosted: Thu Jan 31, 2019 2:50 pm 
Post subject: Re: Change XI 3.1 DeskI FullClient Refresh on Open via SDK

You are using the BI Platform SDK. This does enable access to objects in the CMS, but for document types (DeskI, WebI, CR, Universes, etc.) you only have access to the object metadata. So you can see (and change) things like parent folder, owner, etc., but you cannot see or change stuff that's stored in the document itself -- this would include the query definition, report structure, variables, options, and more. SOME of the document properties are copied into the CMS object upon save -- this includes the Refresh On Open property that you found. But, since this is a copy of the property in the CMS, modifying it will not actually do anything.

In order to modify the ROO property in the DeskI documents, you will need to use the DeskI COM library. This might not be as hard as it sounds. The DeskI application includes a VBA editor. You will just need to write a script to open a document from the CMS, do a "Save As" without ROO, and re-publish.

(I don't have DeskI installed here, but I'm pretty sure the ROO property is set during Save As. It might be a document property, but it's in there somehwere).
Back to top
ntruhan
Forum Member
Forum Member



Joined: 14 Jul 2015

Posts: 5



PostPosted: Mon Feb 04, 2019 1:34 pm 
Post subject: Re: Change XI 3.1 DeskI FullClient Refresh on Open via SDK

So I cobbled something together in VBA that opens the report and can remove the flag. However, one issue I have is that the report will auto-refresh the first time it opens and if there are prompts it can get stuck waiting for prompts until you switch over and cancel out of them to continue.

I tried to use the OpenFromEnterprise function to do this and it does open the report and I can use the SaveToEnterprise to republish the report.

The only way I can see to do it is to to retrieve the file using a oInfoObject.Files.Item(1).CopyTo ... Then opening the local copy using:
Application.Documents.Open(FileName, True, False, "","")

This provided a NoAutomaticRefresh flag which I set to true. So it will retrieve them all and open them; however, for each of them it doesn't seem to pull in the correct value for Automatic Refresh, it is always False, so I never can set the value properly.

Is there a hidden or alternate way to pull this so I don't get stuck on reports doing a OpenFromEnterprise?

Thanks,
Nathan
Back to top
joepeters
Forum Fanatic
Forum Fanatic



Joined: 29 Aug 2002

Posts: 6488
Location: Connecticut, USA


flag
PostPosted: Mon Feb 04, 2019 2:19 pm 
Post subject: Re: Change XI 3.1 DeskI FullClient Refresh on Open via SDK

Just a guess, but what if you open it (with NoAutomaticRefresh set to true), then just Save?
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> SDK (VBA/ASP/JSP)  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0310 seconds using 17 queries. (SQL 0.0031 Parse 0.0009 Other 0.0270)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo