Bug 206106 If dataset filter refer to a report parameter, we should also retrieve the data from rptconfig first[0705]
Description: To be consistent with the Dataset parameter, if dataset filter refers to a report parameter, we should also retrive the value from rptconfig first[0705] Build number: 2.2.2.v20071012-0630 Steps to reproduce: 1, New a allow multiple select value parameter and new two static value: 161, 167. 1, New a CUSTOMER Dataset 2, New a dataset filter and the filter condition refer to a report parameter such as: Expression: row["CUSTOMERNUMBER"] Operator: In Value: params["p1"] 3, Drag the dataset into layout 4, Preview 5, Go back to layout and preview the dataset Expected result: 161 and 167 rows are in the preview results Actual result: Nothing displayed in layout because we do not retrieve the values from the rptconfig. Error log:
data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/api/script/DataAdapterTopLevelScope.java
import java.lang.reflect.InvocationTargetException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.birt.core.data.DataType;
import org.eclipse.birt.core.data.DataTypeUtil;
import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.core.script.CoreJavaScriptInitializer;
import org.eclipse.birt.report.model.api.ModuleHandle;
import org.eclipse.birt.report.model.api.ScalarParameterHandle;
import org.eclipse.birt.report.model.api.elements.DesignChoiceConstants;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ImporterTopLevel;
import org.mozilla.javascript.Scriptable;
/**
 * Top-level scope created by Data Adaptor. This scope provides implementation of some
 * report level script object (e.g., "params")
 */
public class DataAdapterTopLevelScope extends ImporterTopLevel
{
	private static final long serialVersionUID = 4230948829384l;
	
	private static final String PROP_PARAMS = "params";
	private static final String PROP_REPORTCONTEXT = "reportContext";
	private ModuleHandle designModule;
	private Scriptable paramsProp;
	private Object reportContextProp;