private void PreExecuteSub()//16May2013
{
UIController = LifetimeService.Instance.Container.Resolve<IUIController>();
ds = UIController.GetActiveDocument();
////24Apr2014 If no dataset is open, we still need to run some commands from Syntax, those do not require Dataset
//so following 'if' is commented out
//if (ds == null)
//{
// canExecute = false;
// return;
//}
if (ds != null) //24Apr2014
Variables = new ObservableCollection<DataSourceVariable>(ds.Variables);
}