Page 1 of 1

Filter in Form

Posted: Thu Jun 29, 2006 6:25 am
by magicang
Hi,

i add a dialog form in my report, with the following coding :

if CheckBoxAdminSignOut.Checked then
data.FilterOn = True
data.Filter.Value = "dsEventTran.Status =""3"""

else
data.FilterOn = False
data.Filter.Value = ""

end if

dsEventTran.Connect()

But it cannot work. What it could be wrong ?

TQ ~~~~ :cry:

Filter in Form

Posted: Thu Jun 29, 2006 9:49 am
by Vital
Because report is compile before run you can't change filter.
But you can predefine filter for example:

Code: Select all

{dsEventTran.Status ="3"}
and set property FilterOn to false. After then in your code in form:

Code: Select all

data.FilterOn = CheckBoxAdminSignOut.Checked;
For also you can use variable or report object in filter expression

Example:

Code: Select all

{dsEventTran.Checked == CheckBoxAdminSignOut.Checked}
and you don't need use method Connect in this case

You can see also demo report Dialogs.SelectingRows in Demo.

Thanks.