Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Change the number of rows a list transaction displays
Change the number of rows a list transaction displays [message #1672] Wed, 17 September 2008 23:29 Go to next message
jsmeaton is currently offline  jsmeaton
Messages: 9
Registered: May 2008
Junior Member
Hi Tony,

I want to be able to change the number of rows displayed for a list1 transaction (actually, all transactions but I'm focusing on that for now) based on a session variable that I've implemented.

I've tried placing the session switch within the list1 transaction but that doesn't seem to work. It still displays the default 10 rows.

The following is the code in the list1 transaction:

// get pagination details
$pagination['main']['numrows'] = $dbobject->getNumRows();
$pagination['main']['curpage'] = $dbobject->getPageNo();
$pagination['main']['lastpage'] = $dbobject->getLastPage();

//Set rows per page to huge amount to remove pagination from offline mode
if (isset($_SESSION['standalone'])) {
if ($_SESSION['standalone'] == true) {
$dbobject->setRowsPerPage(20000);
$pagination['main']['numrows'] = 20000;
$pagination['main']['curpage'] = 1;
$pagination['main']['lastpage'] = 1;
}
}


the "// get pagination details" and the following expressions are written by you. Everything under that is done by me. The setRowsPerPage is not doing what I need it to do. Should I be trying to do this in another section? Thanks for you help.
Re: Change the number of rows a list transaction displays [message #1673 is a reply to message #1672] Thu, 18 September 2008 04:48 Go to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
If you read http://www.tonymarston.net/php-mysql/dialog-types.html#navig ation-bar that the ability to change the page size of any 'list' screen is already built in to the framework. The default is 10 lines, but you can switch to 25, 50 or 100.

There are 2 reasons why I do not use a value greater than 100:

  • Anything above 100 lines per page would make the page too large for most users.
  • The amount of time taken for the XSL transformation to execute on that amount of data would exceed max_execution_time.

Your proposed limit of 20,000 lines per page is far too large, and I have no plans to either implement or support it.


Previous Topic: PDF - Report Title and Page Title
Next Topic: Transaction Pattern Advice
Goto Forum:
  


Current Time: Sat Apr 20 12:05:15 EDT 2024

Total time taken to generate the page: 0.00940 seconds