You need to sign in to do that
Don't have an account?
Lukas R.
Page break after
Hi,
Im trying to generate letter using the VF page for campaign members who are contacts and have status 'Letter to Send' (see code below). It is generated properly however when I set the result page to print, it includes the blank pages for all campaign members who dont have this status as well and I would like to avoid this. In other words if I have 40 campaign members and only 2 of them with status 'Letter to Send' I need just two pages to be sent for printing the hard copy but it generates 38 more blank pages as result. Im not really good at coding, can somebody help me out? Many thanks
Im trying to generate letter using the VF page for campaign members who are contacts and have status 'Letter to Send' (see code below). It is generated properly however when I set the result page to print, it includes the blank pages for all campaign members who dont have this status as well and I would like to avoid this. In other words if I have 40 campaign members and only 2 of them with status 'Letter to Send' I need just two pages to be sent for printing the hard copy but it generates 38 more blank pages as result. Im not really good at coding, can somebody help me out? Many thanks
<apex:page standardController="Campaign" showHeader="false" applyBodyTag="false"> <apex:repeat value="{!Campaign.CampaignMembers}" var="line"> <div style="page-break-after:always;"> <apex:outputText value="{!line.contact.Osloveni__c} {!line.contact.Vokativ__c}," rendered="{!line.Status='Letter to Send'}" escape="false"/><br/> <apex:outputText value="{!Campaign.Letter__c}" rendered="{!line.Status='Letter to Send'}" escape="false"/><br/> <apex:outputText value="S pozdravem," rendered="{!line.Status='Letter to Send'}" escape="false"/><br/> <apex:outputText value="LR" rendered="{!line.Status='Letter to Send'}" escape="false"/><br/> </div> </apex:repeat> </apex:page>
All Answers