This topic is locked
[SOLVED]

 Print Page, hide only field with 0 .

6/16/2012 11:09:00 PM
PHPRunner General questions
M
maxcolo author

how can I hide entire row in press page of an alone selected recors, the filed prod1 if 0 ( zero)?

And to visualize only those with 1.

Thanks endless to everybody

Max

J
Jane 6/20/2012

Max,
I suppose you're talking about how to hide row on the printer-friendly page if value of the field is 0.

For this purpose edit HTML code of the printer-friendly page on the Visual Editortab. Switch to HTML mode, find these lines:

<TR class="runner-row style1">

<TD class=runner-cl></TD>

<TD class="runner-cc runner-cc1">FieldName

</TD>

<TD class="runner-cc runner-cc2 {$FieldName_class}"

{$FieldName_style}>

{$FieldName_value}</TD>

<TD class=runner-cr></TD></TR>



and edit it in the following way:

{BEGIN FieldName_customshow} <TR class="runner-row style1">

<TD class=runner-cl></TD>

<TD class="runner-cc runner-cc1">FieldName

</TD>

<TD class="runner-cc runner-cc2 {$FieldName_class}"

{$FieldName_style}>

{$FieldName_value}</TD>

<TD class=runner-cr></TD></TR>{END FieldName_customshow}


Then use Print page: After record processed event to check field value and assign corresponding value for FieldName_customshowvariable:

if ($data["FieldName"])

$record["FieldName_customshow"] = true;

else

$record["FieldName_customshow"] = false;
M
maxcolo author 6/22/2012

Great Jane,

it work perfectly

Grazie mille