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

Home » RADICORE » How To » Sub totals and Page Breaks
Re: Sub totals and Page Breaks [message #2395 is a reply to message #2394] Sun, 17 January 2010 03:19 Go to previous messageGo to previous message
AJM is currently offline  AJM
Messages: 2352
Registered: April 2006
Location: Surrey, UK
Senior Member
I have played around with some test data in the EXAMPLE subsystem to see if I can achieve the result you desire. The only way I could do this was to modify the _cm_ListView_print_after() method to include a second argument for $next_row. My 'before' and 'after' methods are as follows:
    // ****************************************************************************
    function _cm_ListView_print_before ($prev_row, $curr_row)
    // allow extra rows to be created in List View
    {
        $output = array();

        if (!empty($prev_row)) {
            // row has changed
            if (substr($prev_row['last_name'], 0, 1) != substr($curr_row['last_name'], 0, 1)) {
                // first character of last name has changed
            	$this->pdf->AddPage();
            } // if
        } // if

        return $output;

    } // _cm_ListView_print_before

    // ****************************************************************************
    function _cm_ListView_print_after ($curr_row, $next_row)
    // allow extra rows to be created in List View
    {
        $output = array();

        if (substr($next_row['last_name'], 0, 1) != substr($curr_row['last_name'], 0, 1)) {
            // first character of last name has changed
            $output[0]['pers_type_desc'] = 'after ' .$curr_row['person_id'];
        } // if

        return $output;

    } // _cm_ListView_print_after

Attached are the framework scripts which I have modified. Try them out and let me know if they solve your problem.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: $fieldarray problem
Next Topic: PDF Footer
Goto Forum:
  


Current Time: Mon Jul 22 16:13:32 EDT 2024

Total time taken to generate the page: 0.01066 seconds