function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tdeptdep 

Nested Datatable on PDF VF page - Issue

Hoping someone has ran into this issue before, cant find anything when searching.

 

I am having an issue with outputting a VF page to PDF with a nested Datatable. Below is the nested datatable portion of the page, everything renders fine in html but gives the 'PDF generation failed. Check the page markup is valid' error. If I remove the inner datatable it will render in PDF.

 

Anyone know of any workarounds to make this output?

 

<apex:dataTable value="{!unitnames}" var="a" rendered="{!unitnames != null}" style="margin-left:20px;">
    
    <apex:column >
    
    <table style="margin-bottom:-2px;border:1px solid #000;border-spacing:0px;margin-top:15px;">
    <tr>
    <td style="height:25px;width:129px;background-color:#69be28;font-weight:bold;text-align:center;">{!a}</td>
    </tr>
    </table>
    
<apex:dataTable value="{!personnel}" var="p" style="border-bottom:1px solid #000;" > <apex:column headerValue="Name" headerClass="hcheaderleft" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Personnel_Name__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Office Title" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Office_Title__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Service Title" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}" > <apex:outputText value="{!p.Civil_Service_Title__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Job Classification" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Job_Classification__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> <apex:column headervalue="Status" headerClass="hcheader" rendered="{!p.City_Unit_Name__c == a}"> <apex:outputText value="{!p.Status__c}" rendered="{!p.City_Unit_Name__c == a}" /> </apex:column> </apex:dataTable> </apex:column> </apex:dataTable>

 Thanks in advance

Best Answer chosen by Admin (Salesforce Developers) 
tdeptdep

Figured out the issue.. Render on Apex:column is unliked by the PDF generation process.