|
|
|
Re: Sub totals and Page Breaks [message #2395 is a reply to message #2394] |
Sun, 17 January 2010 03:19   |
AJM
Messages: 2382 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.
|
|
|
|
|
|
|
|
|
|
|
Re: Sub totals and Page Breaks [message #2404 is a reply to message #2392] |
Sun, 17 January 2010 12:19   |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
This is giving strange results. I am now seeing the entity id as NULL in some cases, an id in some cases and a value representation in others.
I will need to debug in detail to see what is happening where.
Hold this - just spotted your later post!
[Updated on: Sun, 17 January 2010 12:20] Report message to a moderator
|
|
|
|
|
|
|