Filter in Form

Stimulsoft Reports.NET discussion
Post Reply
magicang
Posts: 9
Joined: Tue Jun 27, 2006 10:21 pm

Filter in Form

Post 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:
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Filter in Form

Post 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.
Post Reply