Page 1 of 1

Show only the first 10 rows with a filter

Posted: Thu May 19, 2011 3:05 pm
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

Show only the first 10 rows with a filter

Posted: Fri May 20, 2011 5:51 am
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.

Show only the first 10 rows with a filter

Posted: Mon May 23, 2011 7:26 pm
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.


Show only the first 10 rows with a filter

Posted: Tue May 24, 2011 2:04 am
by Alex K.
Hello,

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

Thank you.

Show only the first 10 rows with a filter

Posted: Tue May 24, 2011 8:23 pm
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