Skip to main content



      Home
Home » Archived » BIRT » limit the number of rows used for constructing a chartt?
limit the number of rows used for constructing a chartt? [message #98954] Tue, 13 December 2005 20:13 Go to next message
Eclipse UserFriend
I have a dataset which includes data which is sorted by date. I am
displaying this data in a chart (just a basic bar/line chart). I want
to limit the number of rows used in the construction of chart to say the
20 most recent.

Can anyone enlighten me as to how I can do that? I presume there is
some way I can apply a filter at either the chart of dataset level to
restrict the number of rows in this manner, but it isn't obvious to me
how to accomplish that.

Thanks in advance!
Re: limit the number of rows used for constructing a chartt? [message #99072 is a reply to message #98954] Wed, 14 December 2005 10:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mlorenz.nc.rr.com

Haven't done it, but seems like you could just reply "false" after the
number of rows you want (e.g. by using a count that you increment each
time) in the "fetch" JavaScript for your data set.

HTH, Mark
Re: limit the number of rows used for constructing a chartt? [message #99134 is a reply to message #99072] Wed, 14 December 2005 13:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kj.kwjames.com

Add a filter on the chart's 'Select Data' screen like this:
row[0] Less Than 5

Replace 5 with the number of rows you want.
Re: limit the number of rows used for constructing a chartt? [message #99149 is a reply to message #99134] Wed, 14 December 2005 13:42 Go to previous messageGo to next message
Eclipse UserFriend
Kevin James wrote:
> Add a filter on the chart's 'Select Data' screen like this:
> row[0] Less Than 5
>
> Replace 5 with the number of rows you want.
>
That sounds like what I was looking for. I'll give it a try.
Re: limit the number of rows used for constructing a chartt? [message #99821 is a reply to message #99134] Thu, 15 December 2005 13:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pcasey.earthlink.net

Is there a practical way to collection all the *other* rows into a
catch-all "other" column? e.g. if I have 20 rows, I'd really like a graph
with columns 1..5 and a sixth "other" column that contains rows 6..infinity?
I couldn't figure out a way to do it with filters, but I admit I didn't
spend more than a half an hour looking into it.

-- Pa

"Kevin James" <kj@kwjames.com> wrote in message
news:4c0aad19e47ba7a5cc0b8147ea48e72d$1@www.eclipse.org...
> Add a filter on the chart's 'Select Data' screen like this:
> row[0] Less Than 5
>
> Replace 5 with the number of rows you want.
>
Re: limit the number of rows used for constructing a chartt? [message #101047 is a reply to message #98954] Wed, 21 December 2005 06:32 Go to previous message
Eclipse UserFriend
Hello James,

why you don't limit the No. of rows in the database query instead afterwards
in the BIRT report?

Something like this (mySQL):

SELECT a, b, c FROM mytable WHERE ... ORDER BY date DESC LIMIT 20;

The records will be sorted by the field 'date' descending and limited to 20
records, even if there are more records.

Limiting the No. of rows by the database server directly leads into more
efficiency in speed.
Because the database server then sends only 20 records (as requested) to the
client.
If you don't limit the No. of rows by the database server, then e.g.
hundreds or thousand rows are transmitted from the server to the client
which takes time. After recievieng this huge amount of rows you have to make
all rows unvisible execpt the first 20.
So why transmitting more lines over the network and make them unvisible
afterwards if it is possible to tell the server sending only 20 records?

Hope that helps!
Previous Topic:Bar chart with 7 categories and 4 values
Next Topic:HOW TO
Goto Forum:
  


Current Time: Thu May 08 20:10:37 EDT 2025

Powered by FUDForum. Page generated in 0.09116 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top