geurtsen
2/27/2006 5:01:00 AM
Hello,
Maybe someone can help me. I want to reach the next. 2 variants of the
report InventOnHand. To know which report has to be called I added a question
on the form. Via the class InventReport_OnHand I tried to manager that the
right report is choosen. With help of the debugger I saw that the method
LastValueElementName took the right report. But still the original report is
executed. Below are the modifications marked with MOD00001.
public class InventReport_OnHand extends InventReport_DimParm
{
DialogGroup dialogSetupGroup;
DialogField dialogIncludeService;
NoYes includeService;
// START: MOD00001
DialogField dialogOnlyLowStock;
NoYes onlyLowStock;
// END: MOD000001
// START: 2363 SP4
#define.CurrentVersion(3)
#LOCALMACRO.CurrentList
includeService,
// START: MOD00001
onlyLowStock
// END: MOD00001
#ENDMACRO
// END: 2363 SP4
}
public Object dialog()
{
;
dialog = super();
dialog.addGroup("@SYS2163");
dialogIncludeService = dialog.addFieldValue(Typeid(NoYes),
includeService, "@SYS66068");
// START: MOD00001
dialogOnlyLowStock = dialog.addFieldValue(Typeid(NoYes),
onlyLowStock, "Alleen laag voorraad nivo");
// END: MOD00001
return dialog;
}
// 2363 SP4
public boolean getFromDialog()
{;
includeService = dialogIncludeService.value();
// START: MOD00001
onlyLowStock = dialogOnlyLowStock.value();
// END: MOD00001
return super();
}
public identifiername LastValueElementName()
{
//START: MOD00001
if (!OnlyLowStock)
//END: MOD00001
return reportStr(InventOnHand);
//START: MOD00001
else
return reportStr(InventOnHandOnlyLowStock);
//END: MOD00001
}