Page 1 of 1

How To Add Filters ???

Posted: Thu Jul 26, 2007 7:28 am
by jayakumargr
Hi,
I Have a Datasource Called "Family Description". It Consist Following Fields,

Family_id,Attribute_id,Attribute_name,Value,Filter_Filed.

Here, the Filter_field consist following XML Data:




13 Descriptions
Like
100
OR


40
Model
=
12
None


524
Prod Descriptions
=
wqe
AND


12
Short Description
Like
324
AND


71
Footnotes
<>
324
None




I want to Add those filters into "Family Description" Band.

Example:
if Attribute_id=13 then the value should be 100. if the value is not equal to 100 then the value should not be printed.
that is,
Family_Description.Band=true;
if(Attribute_id==13)
{
if(Value not like "100")
{
Family_Description.Band=false;

}
}

if(Attribute_id==40)
{
if(Value!="12")
{
Family_Description.Band=false;

}
}

I Want to Add this IF Loop Into Filter. How I Do That ???

Please Provide The Solutions....

Thanks in Advance,
Jayakumar

How To Add Filters ???

Posted: Thu Jul 26, 2007 2:28 pm
by Vital
You can use BeforePrintEvent of databand. Please use following code:

Code: Select all

Family_Description.Band=true;
if(Attribute_id==13)
{
  if(Value not like "100")//Instead Value you need use datasource and column, for example: Customers.Name
  {
    Family_Description.Band=false;
  }
}

if(Attribute_id==40)
{
  if(Value!="12")
  { 
     Family_Description.Band=false;
  }
}
Thank you.