The report takes 4 parameters start and end row and start and end columns and applies a highlighrule based on these parameters. The highlight rule is in the beforeFactory script.
importPackage(Packages.org.eclipse.birt.report.model.api);
importPackage(Packages.org.eclipse.birt.report.model.api.elements);
importPackage(Packages.org.eclipse.birt.report.model.api.elements.structures);
var th = reportContext.getDesignHandle().findElement("mytable");
var max = th.getColumns().getCount();
var stc = params["startcolumn"].value
var enc = params["endcolumn"].value
if( enc > max-1 ){
enc=max-1;
}
for( jj=stc; jj<= enc; jj++ ){
var ch = th.getColumns().get(jj);
var hr = StructureFactory.createHighlightRule();
hr.setOperator(DesignChoiceConstants.MAP_OPERATOR_BETWEEN);
hr.setTestExpression("row.__rownum");
hr.setValue1("params["startrow"].value");
hr.setValue2("params["endrow"].value");
hr.setProperty(HighlightRule.BACKGROUND_COLOR_MEMBER, "green");
var ph = ch.getPropertyHandle(StyleHandle.HIGHLIGHT_RULES_PROP);
ph.addItem(hr);
}