Filtering Data

Stimulsoft Reports.NET discussion
Post Reply
MikeC
Posts: 51
Joined: Mon Jun 07, 2010 3:36 pm

Filtering Data

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

Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Filtering Data

Post by Alex K. »

Hello,

Please see the sample report in attachment.

Thank you.
Attachments
711.SampleReport.mrt
(19.65 KiB) Downloaded 198 times
710.Recon.csv
(194 Bytes) Downloaded 187 times
709.Parcel.csv
(76 Bytes) Downloaded 172 times
MikeC
Posts: 51
Joined: Mon Jun 07, 2010 3:36 pm

Filtering Data

Post 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.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Filtering Data

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