Make sure you have already returned FALSE in “Page_Exporting” server event in order to run your code in that “Row_Export” server event.Please read “Server Events and Client Scripts” topic from PHPMaker Help menu for more info and example.
Thanks.
I do have FALSE set in “Page_Exporting” but the use of any if/then clause in “Row_Export” gives this error:
Parse error: syntax error, unexpected ‘if’ (T_IF)
$brugernavn=$this->pf_brugernavn->ViewValue;
$pos1 = strpos($brugernavn, '-');
$ExportThisRow=1
if ($pos1 === false) { // Error on this line
$ExportThisRow=0
}
if $ExportThisRow=1 {
$this->ExportDoc->Text .= "my content: " . $this->pf_medlemsnummer->ViewValue ;
}
Secondly what am I supposed to build for export.
Ideally I would like to use something like this, since I would like to export the whole row if it meets the criteria above:
if $ExportThisRow=1 {
$this->ExportDoc->Text .= $rs ;
}
Double check your code. This part:
$ExportThisRow=1should be:
$ExportThisRow=1;This part also:
$ExportThisRow=0should be:
$ExportThisRow=0;This part:
if $ExportThisRow=1 {should be:
if ($ExportThisRow==1) {
Thanks.
So basic :-(But revised code below now giver this error:
Parse error: syntax error, unexpected ‘$ExportThisRow’ (T_VARIABLE), expecting
$brugernavn=$this->pf_brugernavn->ViewValue;
$pos1 = strpos($brugernavn, '-');
$ExportThisRow=1;
if ($pos1 === false) { // Error on this line
$ExportThisRow=0;
}
if ($this->pf_udmeldt->ViewValue <> null) {
$ExportThisRow=0;
}
if $ExportThisRow==1 { <<<<< Error here
$this->ExportDoc->Text .= "my content: " . $this->pf_medlemsnummer->ViewValue ;
}
Hi,Thanks. Error is gone now but I get nothing in the Excel file.
Removing all if/then logic and having this code only, also produces a blank Excel file:$this->ExportDoc->Text .= "my content: " . $this->pf_medlemsnummer->ViewValue ;??Cheers
/Poul