Page 1 of 1

Filtering Data

Posted: Fri Nov 19, 2010 2:03 pm
by MikeC
I need to do some filtering in one table based on the data in a second table.

The first table is called Parcel and it contains information about land parcels.
The second table is called Recon and it has value reconciliation data about each parcel (reasons why the value changed). Records in the Recon table have a reconcode from 90 to 99.

For each record in the Parcel table there can be anywhere from zero to 10 records in the Recon table.

I need to do filtering as follows:

1. If a parcel in the Parcel table has no recon codes in the recon table I DO NOT want it to be displayed.
2. If a parcel in the Parcel table has ONLY a recon code of 98 in the recon table I DO NOT want it to be displayed.
3. If a parcel in the Parcel table has more than one recon code, including 98, I DO want it to be displayed.

Thanks for your help.


Filtering Data

Posted: Mon Nov 22, 2010 7:12 am
by Alex K.
Hello,

Please see the sample report in attachment.

Thank you.

Filtering Data

Posted: Mon Nov 22, 2010 7:53 am
by MikeC
Aleksey wrote:Hello,

Please see the sample report in attachment.

Thank you.
That does me no good.

While I appreciate the effort, our version of Stimulsoft is embedded into an application. I don't have a way to open .mrt files, nor do I have a way to link report to any other data source.

Filtering Data

Posted: Tue Nov 23, 2010 4:36 am
by Alex K.
Hello,
MikeC wrote:1. If a parcel in the Parcel table has no recon codes in the recon table I DO NOT want it to be displayed.
Please set the "Print if Detail Empty" property of the Parcel DataBand to false.
MikeC wrote:2. If a parcel in the Parcel table has ONLY a recon code of 98 in the recon table I DO NOT want it to be displayed.
3. If a parcel in the Parcel table has more than one recon code, including 98, I DO want it to be displayed.
Please add variable CountCode98 and add the following code in next events:
- in After Print of Parcel band (master band)

Code: Select all

CountCode98 = 0;
- in empty band recon (first detail)

Code: Select all

if (Recon.Code == 98) 
{
	CountCode98++;
}
And in Condition of DataBand Recon (second detail) add the following expression:

Code: Select all

Count(DataBand3) == CountCode98
and uncheck "Component Enabled"


Thank you.