Get User Selection Boolean value from Dialog Form

Dear All,
I would like to know how to get the value of a checkbox on a Dialog form. I want to get a Boolean value True/False based on user checking the checkbox or not. What I did in different method of reports is as follows:
ClassDeclaration
DialogField dialogMonthlySubtotal;
boolean monthlySubtotal;
dialog
dialogMonthlySubtotal = dialog.addFieldValue(typeid(boolean), monthlySubtotal, “Monthly Subtotal”, “Monthly Subtotal”);
getFromDialog
monthlySubtotal = dialogMonthlySubtotal.value();
But checking the montlySubtotal checkbox on the dialog form I do not get the true/false value. Any help will be greatly appreciated.

Thanks.

Did you actually verify that the value isn’t set in getFromDialog()? Maybe it works there and the problem is that the value isn’t packed on client and unpacked on server, therefore it will always have the default value (false) on server.

The following thread may be useful for you: pack() and unpack().

Use dialog and getfromdialog method as below

class validatingRunbase extends RunBase
{
DialogField dialogMonthlySubtotal;
boolean monthlySubtotal;
DialogRunbase dialog;
}

protected Object dialog()
{
;
dialog = super();

dialogMonthlySubtotal = dialog.addFieldValue(typeid(boolean), monthlySubtotal, “Monthly Subtotal”, “Monthly Subtotal”);

return dialog;
}

public boolean getFromDialog()
{
;
monthlySubtotal = dialogMonthlySubtotal.value();
return super();
}

It will resolve ur issue.

Thanks & Regards,

Britto John Baskar.A