cancel
Showing results for 
Search instead for 
Did you mean: 

BO XI4.1 - DataProvider.getDataSource()

Former Member
0 Kudos

Hello,

In XI 4.1 the DataProvider.getDataSource is deprecated.

Can anyone tell me how can I replace the getDataSource to get the Name or ID of the universe for instance of a Webi document?

DataProviders lBoDps = lBoDoc.getDataProviders();

DataProvider lBoDp = lBoDps.getItem(0);

//** Get the Datasource (In fact the universe)

lBoDs = lBoDp.getDataSource();

(I can't use the lBoDs.getName() anymore)

Thnx

Accepted Solutions (1)

Accepted Solutions (1)

aasavaribhave
Advisor
Advisor
0 Kudos

Use the following code:


IInfoObjects oInfoObjects = oInfoStore.query("select * from ci_infoobjects where si_kind='webi' and si_instance=1 and si_name='<webi report name>'");
IWebi webiReport = (IWebi) oInfoObjects.get(0);
java.util.Set universeID = webiReport.getUniverses().;

universeID Set object contains SI_IDs of all the universes that the report\report instance is based on. The above uses Enterprise SDK and not rebean. The above works for Webi report, I haven't tested it for Webi instances, but as long as you are able to cast the instance to IWebi, I guess it should work.

Answers (3)

Answers (3)

Former Member
0 Kudos

Yes it works fine thnx. Now I get the datasource, however now I want to change the universe of the webi document and I cannot use this function dataProviders.changeUniverse(oldID, newID, true). Can you help me here to find an alternative?

Thnx again for your response

Edited by: Jean-Philippe Golay on Jan 19, 2012 10:20 AM

Former Member
0 Kudos

can you open the new issue in a new thread by explicitely explaining the issue?

Former Member
0 Kudos

Yes it works now thnx. However, now I want to change the universe for the webi document, but I get stuck with this function : ((DataProviders)lCurProvider).changeUniverse(lSourceId, lDestinationId, true);

Edited by: Jean-Philippe Golay on Jan 19, 2012 10:19 AM

Former Member
0 Kudos

Have you tried this:

IWebi mWebi;

mWebi =(IWebi) rWebi.get(0);

IWebiDocDataProviders myDocDPs = (IWebiDocDataProviders) mWebi.getDocumentDataProviders();

for(int k =0; k < myDocDPs.count();k++ )

{

System.out.println("Data source Name: " + myDocDPs.item(k).getDataSourceName().toString());

}

using the package: import com.businessobjects.sdk.plugin.desktop.webi.*;