You need to sign in to do that
Don't have an account?
shravan
custom visualforce for Reports
Hi,
I am uploaded Image.
I developed Custom Visualforce for the Reports in this 4 fields
Name Address Phone Role
aaa
123 Manager
xxx aaa
I want '--' like this when feilds are empty.
Please see and do the needful.
heres the other way around. this has been tested
<apex:page standardController="account" >
<apex:form >
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!account.contacts}" var="item">
<apex:column headerValue="Name">
<apex:outputText value="{!item.name}" rendered="{!!ISNULL(item.name)}"/>
<apex:outputText value="--" rendered="{!ISNULL(item.name)}"/>
</apex:column>
<apex:column headerValue="Phone" >
<apex:outputText value="{!item.name}" rendered="{!!ISNULL(item.phone)}"/>
<apex:outputText value="--" rendered="{!ISNULL(item.phone)}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
All Answers
How are you rendering the values? i.e. are you using outputext, outputfield?
Using below tags:
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{! account.contacts}" var="item">
<apex:column value="{! item.name}"/>
<apex:column value="{! item.Phone}"/>
</apex:pageBlockTable>
</apex:pageBlock>
try this
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{! account.contacts}" var="item">
<apex:column value="{!IF(ISNULL(item.name),'--',item.name)}"/>
<apex:column value="{!IF(ISNULL(item.phone),'--',item.phone)}"/>
</apex:pageBlockTable>
</apex:pageBlock>
Hi, I am getting Syntax error li"e this
"Error: Syntax error. Missing ')' "
heres the other way around. this has been tested
<apex:page standardController="account" >
<apex:form >
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!account.contacts}" var="item">
<apex:column headerValue="Name">
<apex:outputText value="{!item.name}" rendered="{!!ISNULL(item.name)}"/>
<apex:outputText value="--" rendered="{!ISNULL(item.name)}"/>
</apex:column>
<apex:column headerValue="Phone" >
<apex:outputText value="{!item.name}" rendered="{!!ISNULL(item.phone)}"/>
<apex:outputText value="--" rendered="{!ISNULL(item.phone)}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Ya its woriking thanks
please mark this thread as solve.
I'd also look at using a custom component to do this, otherwise if you decide you want to change the '-' to another value ('N/A, for example) you'd only have to make the change in one place, rather than on every column.
Is there a workbook for Visulaforce reports? I need to create a report that shows account owners, events, customer types.
I need to view how many events does a account owner have for each customer type. Customer type is a custom field.
Is this possible? Any help would be appreciated.
There isn't a workbook for Visualforce reports, rather reports are something you can build using visualforce.
There is a visualforce workbook at:
http://www.salesforce.com/us/developer/docs/workbook_vf/workbook_vf.pdf