1
votes

How can i put a limit to generate a page. on the rave reports?

let say the user selected all data to print and it will generate a 1,000+ pages.

but i wanted to limit it to 100 pages only is that possible?

1
You limit the data so that there's only enough available to print 100 pages worth of output. You can do this by using better WHERE clauses, a TOP condition (or whatever similar option your database allows) or a FILTER condition if you're not using SQL. - Ken White
yes i did. but it just used in case scenario like user really wanted to view it thousands of pages. so i have to limit the page that can be generated or else it eats a lot of memory usage and causing the machine to crash. - XBasic3000
That's what I said. Use your query or a filter condition to only return a maximum number of rows, no matter what the user says or does. - Ken White

1 Answers

0
votes

Right now you have something like this on the Delphi side:

txtQuery := 'SELECT * FROM table WHERE date BETWEEN "2001-01-01" AND "2013-01-01"';
query.SQL.text := txtQuery; //This being the Component assigned to your TRvDataSetConnection
prjRave.execute;

You should add something like this to your txtQuery:

txtQuery := 'SELECT * FROM table WHERE date BETWEEN "2001-01-01" AND "2013-01-01" LIMIT 500';

That way, no matter how much data is requested by your user, you get a maximum of 500 rows on your Rave Report.