How can I get table_name , report_name and universe_name from SDK?

1.5k views Asked by At

I want to get table_name , report_name and universe_name from SDK,

It it possible with Java SDK?

I can get query like this:

IInfoObjects infoObjectsUniverse2; 
IInfoStore iStore2;
 

IEnterpriseSession es2=null;
try {
    es2 = CrystalEnterprise.getSessionMgr().logon( user, password, CMSName, cmsAuthType);

//session.setAttribute( "enterpriseSession", es );
iStore2 = (IInfoStore)es2.getService("", "InfoStore");
 

IInfoObjects getuniv;
String queryUniverse = "SELECT  * FROM ci_appobjects WHERE SI_Kind='DSL.MetaDataFile' and SI_SPECIFIC_KIND = 'DSL.Universe'";
getuniv = iStore2.query(queryUniverse);
1

There are 1 answers

0
craig On

You can retrieve the WI report's name (SI_NAME) and its associated universes (SI_UNIVERSE,SI_DSL_UNIVERSE) from the repository:

SELECT si_id, si_name, si_universe, si_dsl_universe FROM ci_infoobjects WHERE si_kind='Webi' and si_instance=0 

Both the SI_UNIVERSE and SI_DSL_UNIVERSE properties are collections of IDs that you'll need to serialize and include in a second query to get the details about the universes:

SELECT * FROM ci_appobjects WHERE si_id IN ([serialized list of IDs])

If you just want a list of the UNV or UNX universes, use this query:

SELECT * FROM ci_appobjects WHERE si_kind IN ('Universe','DSL.Universe')

You'll need to use one of the Universe SDKs to access the universe's collection of tables and such.

You could also try the RESTful Raylight SDK, but good luck finding the documentation--all the links that I've seen are orphans.