View Filter Ax Form

Hola buenos días, estoy desarrollando un formulario con AX Form el tema  es que el data sources que uso para llenar la información del Form es una Vista, soy nuevo en este entorno,  necesito poder utilizar filtros para filtrar la vista y a su vez el grid que tiene el formulario

El form tiene la siguiente estructura:

Estaba utilizando el siguiente código para filtrar la vista: pero mefunciona

Adjunto código completo de la clase de la vista 

[Form]
public class WHSWaveTableLForm extends FormRun
{
WHSWaveTableLView WHSWaveTableLViewp;
QueryBuildDataSource qbdsWHSWaveTableLView;
Query queryWHSWaveTableLView;
QueryRun qRun;

[DataSource]
class WHSWaveTableLView
{
display real PesoCarga(WHSWaveTableLView _WHSWaveTableLView)
{
return (_WHSWaveTableLView.QtyWork *_WHSWaveTableLView.Weight);
}

display real VolumenCarga(WHSWaveTableLView _WHSWaveTableLView)
{
return (_WHSWaveTableLView.QtyWork * _WHSWaveTableLView.Depth * _WHSWaveTableLView.Height * _WHSWaveTableLView.Width);
}

/// <summary>
/////
///// </summary>
public void init()
{
super();
queryWHSWaveTableLView = new Query();

qbdsWHSWaveTableLView = queryWHSWaveTableLView.addDataSource(tablenum(WHSWaveTableLView));
qRun = new QueryRun(queryWHSWaveTableLView);
qRun.next();

}

/// <summary>
///
/// </summary>
public void executeQuery()
{

qbdsWHSWaveTableLView.clearRange(fieldNum(WHSWaveTableLView,InventLocationId ));
if(InventLocationFilter.valueStr())
{
qbdsWHSWaveTableLView.addRange(fieldnum(WHSWaveTableLView,InventLocationId )).value(queryValue(InventLocationFilter.valueStr()));
}
if(FromDateFilter.dateValue() && ToDateFilter.dateValue())
{
qbdsWHSWaveTableLView.addRange(fieldnum(WHSWaveTableLView,ReleasedUTCDateTime )).value(sysQuery::range(FromDateFilter.dateValue(), ToDateFilter.dateValue()));
}
super();
}

}

[Control("String")]
class InventLocationFilter
{
/// <summary>
///
/// </summary>
/// <returns></returns>
public boolean modified()
{
boolean ret;

ret = super();
startLengthyOperation();
WHSWaveTableLView_ds.executeQuery();
WHSWaveTableLView_ds.refresh();
WHSWaveTableLView_ds.reread();
endLengthyOperation();
return ret;
}

}

[Control("Date")]
class FromDateFilter
{
/// <summary>
///
/// </summary>
/// <returns></returns>
public boolean modified()
{
boolean ret;

ret = super();
startLengthyOperation();
WHSWaveTableLView_ds.executeQuery();
WHSWaveTableLView_ds.refresh();
WHSWaveTableLView_ds.reread();
endLengthyOperation();
return ret;
}

}

[Control("Date")]
class ToDateFilter
{
/// <summary>
///
/// </summary>
/// <returns></returns>
public boolean modified()
{
boolean ret;

ret = super();
startLengthyOperation();
WHSWaveTableLView_ds.executeQuery();
WHSWaveTableLView_ds.refresh();
WHSWaveTableLView_ds.reread();
endLengthyOperation();
return ret;
}

}

}

Related
Recommended