You need to sign in to do that
Don't have an account?
imma
"Syntax error" when I try to display just the variable != NULL with the condition IF
Hello everybody,
I have a custom object 'Stagiaire__c' having few fields:Name,CNE,e-mail,date_de_naissance,Téléphone
I want to create a PDF documents whish display just the fields are not NULL
if for exemple,"CNE == null" , <p> CNE: </p> will not display in my PDF
Here is my code:
<apex:page standardController="Stagiaire__c" renderas="pdf" showheader="false" applyhtmltag="false" >
<apex:pageBlock title="Fiche Stagiaire">
<apex:pageblockTable value="{!Stagiaire__c}" var="s">
<apex:outputpanel rendered="{!IF(ISBLANK(s.Name),false,true)}">
<p>Nom & Prénom: </p> <apex:column value="{!s.Name}"/>
</apex:outputpanel>
<apex:outputpanel rendered="{!IF(ISBLANK(s.CNE__c),false,true)}">
<p>CNE:</p> <apex:column value="{!s.CNE__c}"/>
</apex:outputpanel>
<apex:outputpanel rendered="{!IF(ISBLANK(s.Téléphone__c),false,true)}">
<p>Téléphone! </p> <apex:column value="{!s.Téléphone__c}"/>
</apex:outputpanel>
<apex:outputpanel rendered="{!IF(ISBLANK(s.e-mail__c),false,true)}">
<p>E-mail: </p> <apex:column value="{!s.e-mail__c}"/>
</apex:outputpanel>
</apex:pageblockTable>
</apex:pageblock>
</apex:page>
But I get this error : syntax error !!!! please help meeee !!!!
I have a custom object 'Stagiaire__c' having few fields:Name,CNE,e-mail,date_de_naissance,Téléphone
I want to create a PDF documents whish display just the fields are not NULL
if for exemple,"CNE == null" , <p> CNE: </p> will not display in my PDF
Here is my code:
<apex:page standardController="Stagiaire__c" renderas="pdf" showheader="false" applyhtmltag="false" >
<apex:pageBlock title="Fiche Stagiaire">
<apex:pageblockTable value="{!Stagiaire__c}" var="s">
<apex:outputpanel rendered="{!IF(ISBLANK(s.Name),false,true)}">
<p>Nom & Prénom: </p> <apex:column value="{!s.Name}"/>
</apex:outputpanel>
<apex:outputpanel rendered="{!IF(ISBLANK(s.CNE__c),false,true)}">
<p>CNE:</p> <apex:column value="{!s.CNE__c}"/>
</apex:outputpanel>
<apex:outputpanel rendered="{!IF(ISBLANK(s.Téléphone__c),false,true)}">
<p>Téléphone! </p> <apex:column value="{!s.Téléphone__c}"/>
</apex:outputpanel>
<apex:outputpanel rendered="{!IF(ISBLANK(s.e-mail__c),false,true)}">
<p>E-mail: </p> <apex:column value="{!s.e-mail__c}"/>
</apex:outputpanel>
</apex:pageblockTable>
</apex:pageblock>
</apex:page>
But I get this error : syntax error !!!! please help meeee !!!!
You can try with below code
I get this error :
Error: <apex:column> must be the direct child of either <apex:dataTable> or <apex:pageBlockTable>