You need to sign in to do that
Don't have an account?
![Lukas Razim 29 Lukas Razim 29](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Grid with fixed number of rows and columns per page
Hi everyone,
Im trying to generate table of all campaign members with their names and addresses, render as pdf (or html or whatever) but with fixed number of rows and columns per page. The idea is that I need this table to be printed on paper with stickers that could be used on envelopes and sent to those members.
I added custom button on Campaign layout generating the pdf, but Im struggling with the code (Im really no coder btw:). See below code, what I just started but got stuck, this only generates cells in one row... I just used Account and Email fields instead of address otherwise it is same. Could please somebody tell me how to modify to make grid 3x10 fixed? Many thanks
<apex:page standardController="Campaign" showHeader="false" renderAs="pdf" applyBodyTag="false">
<span style="font-family: Arial Unicode MS">
<table border="0" width="100%" id="table4">
<apex:repeat value="{!Campaign.CampaignMembers}" var="line">
<td>{!line.Contact.Name}<br/>{!line.Contact.Account}<br/>{!line.Contact.Email}<br/></td>
</apex:repeat>
</table>
</span>
</apex:page>
Im trying to generate table of all campaign members with their names and addresses, render as pdf (or html or whatever) but with fixed number of rows and columns per page. The idea is that I need this table to be printed on paper with stickers that could be used on envelopes and sent to those members.
I added custom button on Campaign layout generating the pdf, but Im struggling with the code (Im really no coder btw:). See below code, what I just started but got stuck, this only generates cells in one row... I just used Account and Email fields instead of address otherwise it is same. Could please somebody tell me how to modify to make grid 3x10 fixed? Many thanks
<apex:page standardController="Campaign" showHeader="false" renderAs="pdf" applyBodyTag="false">
<span style="font-family: Arial Unicode MS">
<table border="0" width="100%" id="table4">
<apex:repeat value="{!Campaign.CampaignMembers}" var="line">
<td>{!line.Contact.Name}<br/>{!line.Contact.Account}<br/>{!line.Contact.Email}<br/></td>
</apex:repeat>
</table>
</span>
</apex:page>
Thank you David but I need all the information (Name, Account, Email) in one cell of the grid and the grid to be 3x10. This way Im getting something like this below as result.
Not sure what you mean 'all the information (Name, Account, Email) in one cell'
Contact1 Name Contact2 Name Contact3 Name
Contact1 Account Contact2 Account Contact3 Account
Contact1 Email Contact2 Email Contact3 Email
Contact4 Name Contact5 Name Contact6 Name
Contact4 Account Contact5 Account Contact6 Account
Contact4 Email Contact5 Email Contact6 Email
in VF Page, add extention to the page and use the following snipet.
Thanks and sorry to bother again. We are on proffesional edition, this might work however I cannot use any logic written in apex due to this edition limitations. Do you think there is any possible way to get this using VF page only. Thanks very much