Skip to Content
0
Former Member
Nov 27, 2008 at 12:05 PM

XI R2 Webi Ranking with the SDK

20 Views

Hi all,

Using the default universe eFashion I get an java.lang.UnsupportedOperationException.

The code is very simple (attached to the message).

private static void addRankCondition(DocumentInstance iDocInstance, Podium iPodium, int iSize,
		String iFilteredDimension, String iBasedOnMeasure) {
	DataProviders lDataProviders = iDocInstance.getDataProviders();
	DataProvider lDataProvider = lDataProviders.getItem(0);
	DataSource lDataSource = lDataProvider.getDataSource();
	if (!lDataSource.isRankConditionSupported()) {
		throw new AuiException("Data source does not support ranking.");
	}
	DataSourceObject lFilteredDimension = lDataSource.getClasses().getChildByName(iFilteredDimension);
	DataSourceObject lBasedOnMeasure = lDataSource.getClasses().getChildByName (iBasedOnMeasure);
	Query q = lDataProvider.getQuery();
	ConditionContainer lConditionCont = q.createCondition(LogicalOperator.AND);
	lConditionCont.createRankCondition(iPodium, iSize, lBasedOnMeasure, lFilteredDimension);
	lDataProvider.runQuery();
}

- Is there any example on the Ranking feature?

- Is there any documentation on the possible restrictions?

Please keep in mind that I am using XI R2 and not 3.0. The code doesn't work with document using eFashion eventough it works on Infoview.

Thanks a lot for any input.

David