public void main(PurchId _purchId)
{
PurchTable purchtable;
VSSClassControlPedidos controller = new VSSClassControlPedidos();
Args args2 = new Args();
;
controller.parmReportName(ssrsReportStr(VSSReportControlPedidos2, VSSPrecisionDesignPed2));
controller.parmReportContract().parmRdlContract().parmLanguageId("@SYS306440");
controller.parmArgs(args2);
controller.parmPurchId(_purchId); //Filtrar sin necesidad del cuadro de diálogo (añadimos parámetro en class declaration)
//controller.preRunModifyContract();
controller.runToScreen(); //Abrir directamente sin pasar por ventana de diálogo
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void clicked()
{
Args args;
str purch;
VSSClassControlPedidos controller = new VSSClassControlPedidos();
;
args = new Args();
purch = args.parm(PurchTable.PurchId);
controller.main(purch);
super();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
protected void preRunModifyContract()
{
Query reportQuery;
if(purchId)
{
reportQuery = this.getFirstQuery();
//a la query que ya tiene el informe por defecto, le añadimos un parámetro
SrsReportHelper::addParameterValueRangeToQuery(
reportQuery, tableNum(PurchTable),
fieldNum(PurchTable, PurchId), SysQuery::value(purchId)/*purchId*/);
}
//super();
}