Show only the first 10 rows with a filter

Stimulsoft Reports.WEB discussion
Post Reply
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

Show only the first 10 rows with a filter

Post by jay@bplogix.com »

I have an input table like this (with about 100 rows of input data for instance)
NAME AMOUNT
tom 100
sue 200
jay 150
etc.
I would like to show a list of the first 5 names and amounts when the AMOUNT is > 100 (I want to place the filter and sort in the databand). The AMOUNT > 100 is easy in the filter ... but when I add Line 100 that occur withing the first 5 rows of input data.

I know I can create a "Data from other Data Source" and add the Line < 5 to that .... but that seems harder than it should be.

Is there a simple way to only display 5 rows of data in the DataBand (when the DataBand has other filter data)?

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

Show only the first 10 rows with a filter

Post by Alex K. »

Hello,

You can set the filter "AMOUNT > 100" and condition "Line > 5" with "Component is Enabled" set to false on DataBand component.

Thank you.
erikbrandvig
Posts: 25
Joined: Tue Apr 26, 2011 1:01 pm
Location: Vista, CA

Show only the first 10 rows with a filter

Post by erikbrandvig »

We are confused.

There is no "Component is Enabled" property in the DataBand properties. There is an "Enabled" switch under the Behavior section, but that simply turns the databand off and no results are displayed.

Image

This is the issue:

if you have two filters engaged on a single databand, the "Line" expression does not represent the lines in the result of the databand. It represents the line numbers from the source of the data.

if you have only one of these filters, either will work correctly.

if you put both filters on, and change the expression filter to "Line <= 1000", you start to see results, because it is looking at the wrong Line number.

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

Show only the first 10 rows with a filter

Post by Alex K. »

Hello,

Expression "Line <= 3" not in filter. This expression put in Conditions.
Please see the sample report in attachment.

Thank you.
Attachments
1027.SimpleList.mrt
(29.08 KiB) Downloaded 554 times
erikbrandvig
Posts: 25
Joined: Tue Apr 26, 2011 1:01 pm
Location: Vista, CA

Show only the first 10 rows with a filter

Post by erikbrandvig »

while this works in the stand alone exe,

this does not work in the reports.web product.

using the "Conditions" in the "Appearance" section of the Databand properties creates completely inconsistent results.

no condition: 4 results

Line = 1 : 3 results

Line = 1 : CS0019 error
Post Reply