on 01-18-2012 9:31 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.*;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.