// Get the DataProvider.
ExpressDataProvider dp = getExpressDataProvider();
// Create NumberParameter objects for the starting and ending values
// of the range.
NumberParameter startParam = new NumberParameter(dp, 1);
NumberParameter endParam = new NumberParameter(dp, 6);
// Create parameterized Source objects.
NumberSource startParamSrc = dp.createParameterizedSource(startParam);
NumberSource endParamSrc = dp.createParameterizedSource(endParam);
// Specify a set of positions of the products dimension using the
// parameterized Source objects.
Source paramProdSelInterval = prodHier.interval(startParamSrc,
endParamSrc);
// Get the short description attribute for the Product dimension and
// get the Source for the attribute.
MdmAttribute mdmProdShortDescr =
mdmProdDim.getShortValueDescriptionAttribute();
Source prodShortDescr = mdmProdShortDescr.getSource();
// Join the selected products to the short descriptions.
Source paramProdSelIntervalShortDescr =
prodShortDescr.join(paramProdSelInterval);
// Join units to selected values from three of the dimensions.
// These join shortcuts hide the output.
// Join the parameterized Source, also.
NumberSource result = (NumberSource)
units.join(chanHier,
"CHANNEL_PRIMARY_AW::CHANNEL_AW::4")
.join(timeHier, "CALENDAR_YEAR_AW::YEAR_AW::4")
.join(shipHier,
"SHIPMENTS_AW::TOTAL_CUSTOMER_AW::1")
.join(paramProdSelIntervalShortDescr);
// Prepare and commit the current transaction.
prepareAndCommit();
// Create a Cursor.
CursorManagerSpecification cMngrSpec =
dp.createCursorManagerSpecification(result);
SpecifiedCursorManager spCMngr = dp.createCursorManager(cMngrSpec);
Cursor resultCursor = spCMngr.createCursor();
// Display the results.
getContext().displayCursor(resultCursor);
//Reset the Cursor position to 1.
resultCursor.setPosition(1);
//Change the value of the parameterized Source.
startParam.setValue(7);
endParam.setValue(12);
// Using the same Cursor, display the results again.
println();
getContext().displayCursor(resultCursor);
}