2015-01-06 9 views
1

친애하는 CSS/세일즈 포스의 전문가,반복 헤더

나는 페이지 - 즉시 많은 테이블에서 파생 된 헤더 (헤더로) 모든 페이지에 인쇄 할 필요가있는 솔루션을 찾고 있어요 중단이 적용됩니다. 첫 페이지에서 헤더를 따로 인쇄 할 수 없습니다. 또한 데이터 테이블 값이 다른 페이지로 분할되지 않도록해야합니다. 도와주세요.

아래 코드를 참조하십시오.

제발 저를 도와주세요!

<table style="border-collapse: collapse;-fs-table-paginate: paginate;" width="100%"> 
 
    <thead> 
 
    <tr> 
 
     <th style="border-left: 1px solid #000000;font-size:9px;">{!mapQuotationVariables[iSerial_No].Arabic__c} 
 
     <br/>{!mapQuotationVariables[iSerial_No].English__c}</th> 
 
     <th style="font-size:9px;">{!mapQuotationVariables[iItem_Code_Desc].Arabic__c} 
 
     <br/>{!mapQuotationVariables[iItem_Code_Desc].English__c}</th> 
 
     <th style="font-size:9px;">{!mapQuotationVariables[iQuantity].Arabic__c} 
 
     <br/>{!mapQuotationVariables[iQuantity].English__c}</th> 
 
     <th style="font-size:9px;">{!mapQuotationVariables[iUnit].Arabic__c} 
 
     <br/>{!mapQuotationVariables[iUnit].English__c}</th> 
 
     <th style="font-size:9px;">{!mapQuotationVariables[iUnit_Price].Arabic__c} 
 
     <br/>{!mapQuotationVariables[iUnit_Price].English__c}</th> 
 

 

 
     <apex:outputPanel rendered="{!IsCustomerQuote}"> 
 
     <th>{!mapQuotationVariables[iDiscount].Arabic__c} 
 
      <br/>{!mapQuotationVariables[iDiscount].English__c}</th> 
 
     </apex:outputPanel> 
 
     <th style="border-right: 1px solid #000000;">{!mapQuotationVariables[iItem_total].Arabic__c} 
 
     <br/>{!mapQuotationVariables[iItem_total].English__c}</th> 
 
    </tr> 
 
    </thead> 
 
    <tbody> 
 
    <apex:variable var="sr" value="{!1}" /> 
 
    <apex:repeat value="{!lstQuoteLineItem}" var="qLine"> 
 
     <tr> 
 
     <td style="border-style: solid;vertical-align: top;">{!sr}</td> 
 
     <td style="border-style: solid;"> 
 

 
      <table width="100%" style="border-collapse: collapse;font-size: 8px;"> 
 
      <tr style="height:4px;"> 
 
       <td width="33%" style="text-align:left;padding:0px;"> 
 
       {!qLine.PricebookEntry.Product2.ProductCode} 
 
       </td> 
 
       <td width="33%" style="text-align:right;padding:0px;"> 
 
       {!qLine.PricebookEntry.Product2.Manufacturer__r.Name} 
 
       </td> 
 
       <td width="33%" style="text-align:right;padding:0px;"> 
 
       {!qLine.PricebookEntry.Product2.Manufacturer__r.Country__c} 
 
       </td> 
 

 
      </tr> 
 

 
      <tr width="100%" style="height:3px;"> 
 
       <td colspan="3" style="text-align:left;padding:2px;"> 
 
       {!qLine.PricebookEntry.Product2.Name} 
 
       </td> 
 
      </tr> 
 
      <tr width="100%" style="height:3px;"> 
 
       <td colspan="3" style="text-align:left;padding:2px;"> 
 
       {!qLine.PricebookEntry.Product2.Arabic_Product_Name__c} 
 
       </td> 
 
      </tr> 
 
      <tr width="100%" style="height:3px;"> 
 
       <td colspan="3" style="text-align:left;padding:2px;"> 
 
       <apex:outputText value="{!qLine.PricebookEntry.Product2.Product_Description_Split__c}" escape="false" /> 
 
       <!--<output><apex:outputText value="{!qLine.PricebookEntry.Product2.Product_Description_Split__c}"/></output>--> 
 
       </td> 
 
      </tr> 
 

 
      </table> 
 

 
     </td> 
 
     <td style="border-style: solid;vertical-align: top;"> 
 
      <apex:outputText value="{0, number,###,##0}"> 
 
      <apex:param value="{!qLine.Quantity}" /> 
 
      </apex:outputText> 
 
     </td> 
 
     <td style="border-style: solid;vertical-align: top;">{!qLine.PricebookEntry.Product2.Unit__c}</td> 
 
     <td style="border-style: solid;vertical-align: top;"> 
 
      {!Quote.CurrencyISOCode} &nbsp; 
 
      <apex:outputText value="{0, number,###,##0}" rendered="{!!IsCustomerQuote}"> 
 
      <apex:param value="{!qLine.Customer_List_Price__c}" /> 
 
      </apex:outputText> 
 

 
      <apex:outputText value="{0, number,###,##0}" rendered="{!IsCustomerQuote}"> 
 
      <apex:param value="{!qLine.Customer_List_Price__c}" /> 
 
      </apex:outputText> 
 

 
     </td> 
 

 
     <apex:outputPanel rendered="{!IsCustomerQuote}"> 
 
      <td style="border-style: solid;vertical-align: top;"> 
 
      {!Quote.CurrencyISOCode} &nbsp; 
 
      <apex:outputText value="{0, number,###,##0}" rendered="{!IsCustomerQuote}"> 
 
       <apex:param value="{!qLine.Customer_Discount_Amount__c}" /> 
 
      </apex:outputText> 
 
      </td> 
 
     </apex:outputPanel> 
 

 
     <td style="border-style: solid;vertical-align: top;"> 
 
      {!Quote.CurrencyISOCode} &nbsp; 
 
      <apex:outputText value="{0, number,###,##0}" rendered="{!!IsCustomerQuote}"> 
 
      <apex:param value="{!qLine.Customer_List_Price_Total__c}" /> 
 
      </apex:outputText> 
 

 
      <apex:outputText value="{0, number,###,##0}" rendered="{!IsCustomerQuote}"> 
 
      <apex:param value="{!qLine.Customer_List_Price_Total__c - qLine.Customer_Discount_Amount__c}" /> 
 
      </apex:outputText> 
 

 
     </td> 
 
     <apex:variable var="sr" value="{!sr + 1}" /> 
 
     <div style="page-break-before:always;" /> 
 

 

 

 
     </tr> 
 
    </apex:repeat> 
 
    </tbody> 
 

 
</table>

감사

,
라자

답변

0
@media print { table {page-break-inside: avoid;} } 

페이지의 끝에 데이터 셀 인 분할을 방지하기 위해 위의 CSS 스타일을 추가합니다.


table {-fs-table-paginate: paginate;} 

는 각 페이지에 헤더를 반복 위의 CSS 스타일을 추가합니다.