Bug 117644 Set inside nested table's filter to use outer table's column with two tables usi
Description: Set inside nested table's filter to use outer table's column with two tables using different data source will cause exception Steps to reproduce: 1.create a new report 2.create datasource1 from sample database,datasource2 with jdbc database type 3.create ds1 from datasource1 and ds2 from datasource2 4.insert a table(table1) and bind it to ds1 5.insert a table(table2) to table1's detail row and bind it to ds2 6.select the table2 and select filter tab in property editor 7.select ds1's column as filter's expression 8.click the value1 drop down list and click select value Expected result: values are listed Actual result: Birt Exception: Let me simplify it as following example. Below is a report. column1 (Table) column2 (Nested Table) If we add a filter in nested table, it has an expression rows[0]["column1"] which indicates we want to use outer table column data as filter condition. Next, we choose value1, and click <select value>, an error dialog will pop up. The cause is in selecting value, DtE will try to get all rows[0]["column1"] value and provider them to user. But in designing time, only nested table info is passed to DtE, and then DtE can not get outer table data. In running time, there is no problem if user set a static value by not using select value.
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/SelectValueDialog.java
import org.eclipse.birt.data.engine.api.querydefn.BaseTransform;
import org.eclipse.birt.data.engine.api.querydefn.GroupDefinition;
import org.eclipse.birt.data.engine.api.querydefn.ScriptExpression;
import org.eclipse.birt.report.designer.internal.ui.dialogs.BaseDialog;
import org.eclipse.birt.report.designer.internal.ui.util.DataSetManager;
import org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler;
import org.eclipse.birt.report.designer.nls.Messages;
import org.eclipse.birt.report.model.api.DataSetHandle;
import org.eclipse.birt.report.model.api.ParamBindingHandle;
import org.eclipse.birt.report.model.api.elements.DesignChoiceConstants;
import org.eclipse.birt.report.model.api.util.ParameterValidationUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
/**
 * This dialog takes an expression and a data set and shows a list of unique
 * values for selection from the data set. It allows both multiple and single
 * selection. The default is single selection.
 * 
 * @version $Revision: 1.13 $ $Date: 2005/07/06 09:14:31 $
 */
public class SelectValueDialog extends BaseDialog