Page 1 of 1

Hide Column on Condition when exporting to PDF

Posted: Fri Aug 22, 2014 3:13 pm
by wungaz

I have managed to hide columns on the list page, but when exporting to PDF it shows the columns.
How can I hide Columns and change column names when exporting to PDF?


Re: Hide Column on Condition when exporting to PDF

Posted: Fri Aug 22, 2014 6:11 pm
by danielc

Put this code in Page_Load server event for your list page:
if ($this->Export == "pdf") {
$this-><yourhidefield>->Exportable = FALSE;
$this-><yournewcaptionfield>->setFldCaption("newcaption");
}


Re: Hide Column on Condition when exporting to PDF

Posted: Wed Aug 27, 2014 10:04 pm
by wungaz

The Exportable=FALSE working fine but its failing to change the Field caption using: $this->Mark3->setFldCaption("Dee");


Re: Hide Column on Condition when exporting to PDF

Posted: Wed Aug 27, 2014 10:17 pm
by wungaz

Oooh I figured out that you must enable: Export Field Caption in the Advanced Settings...Thanks Daniel