Skip to Content
author's profile photo Former Member
Former Member

BO XI4.1 - DataProvider.getDataSource()

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Jan 18, 2012 at 01:43 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2012 at 04:25 PM

    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.*;

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2012 at 09:02 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2012 at 09:13 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.