Tobias Weik
|
| Posted: 02/07/2003, 3:13 PM |
|
Hi,
I have downloaded the "Creating a Report-like Grid" example and tried to
implement it for my needs in PHP (CCS 1.07), but I always get the
"group-row" shown for _every_ record 
I have changed the code to display the row based on a date, since I want
to group a couple of entries for each day:
07.02.2003
action1
action2
action3
08.02.2003
action1
action2
....
Here is my code:
== == ==
function evm_prg_seq_evm_BeforeShowRow() {
//evm_prg_seq_evm_BeforeShowRow @252-121C3ABE
//Custom Code @339-2A29BDB7
// -------------------------
global $evm_prg_seq_evm;
global $Tpl;
if (CCGetSession("program_date_row"))
{
if (strcmp(CCGetSession("program_date_row"),
CCFormatDate($evm_prg_seq_evm->program_date->Value,array("dd",".","mm",".","yyyy")))==0)
{
CCSetSession("program_date_row",
CCFormatDate($evm_prg_seq_evm->program_date->Value,array("dd",".","mm",".","yyyy")));
$Tpl->SetVar("program_date_row", "");
}
else
{
CCSetSession("program_date_row",
CCFormatDate($evm_prg_seq_evm->program_date->Value,array("dd",".","mm",".","yyyy")));
$Tpl->SetVar("program_date_row", "<tr><td
class=\"eventManagerFieldCaptionTD\" colspan=\"7\" rowspan=\"\">".
CCFormatDate($evm_prg_seq_evm->program_date->Value,array("dd",".","mm",".","yyyy"))
.."</td></tr>");
}
}
else
{
CCSetSession("program_date_row",
CCFormatDate($evm_prg_seq_evm->program_date->Value,array("dd",".","mm",".","yyyy")));
$Tpl->SetVar("program_date_row", "<tr><td
class=\"eventManagerFieldCaptionTD\" colspan=\"7\" rowspan=\"\">".
CCFormatDate($evm_prg_seq_evm->program_date->Value,array("dd",".","mm",".","yyyy"))
.."</td></tr>");
}
// -------------------------
//End Custom Code
} //Close evm_prg_seq_evm_BeforeShowRow @252-FCB6E20C
function evm_prg_seq_evm_BeforeShow() { //evm_prg_seq_evm_BeforeShow
@252-14CA9CBB
//Custom Code @340-2A29BDB7
// -------------------------
CCSetSession("program_date_row", "");
// -------------------------
//End Custom Code
} //Close evm_prg_seq_evm_BeforeShow @252-FCB6E20C
== == ==
The date is stored at the MySQL database as "yyyy-mm-dd", the date-field
"program_date" is hidden, since I only want to show the date at the row.
I checked almost everything: the session has the date formatted the
right way (when the page gets shown, the session holds the date from the
last record), so this cant be the problem...
Even when I try to setup the example, I get the same result, always
showing the category for _each_ record... there must be a bug somewhere
- but where?
Thanks for any help -
Tobias
|
|
|
 |
|