• Compass 1
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 10
    Replies
I have created a VF page to show the Opportunity data in PDF Output.
How I can add the Grand Total field on my VF Page. For reference please find below the code I have given to show the columns.

I wanted to show the total of Revenue Column.

<apex:datatable value="{!opportunityList}" var="opp" width="100%" styleClass="tableClass" border="1">

<apex:column value="{!opp.account.name}"  headerClass="headerstyle" headerValue="Client"/>
<apex:column value="{!opp.name}" headerClass="headerstyle" headerValue="Project Title"/>
<apex:column style="width:75px" value="{!opp.Facility__c}"  headerClass="headerstyle" headerValue="Facility"/>
<apex:column value="{!opp.Scope_Of_Work__c}"  headerClass="headerstyle" headerValue="Scope Of Work"/>
<apex:column value="{!opp.Pricing_Type__c}" headerClass="headerstyle" headerValue="Pricing Type"/>
<apex:column style="width:90px" value="{!opp.BiddingStatus__c}"  headerClass="headerstyle" headerValue="Bidding Status"/>
<apex:column style="width:90px;text-align:center" value="{!opp.Estimated_Revenue_MM__c}" headerClass="headerstyle" headerValue="Revenue"/>
    
</apex:datatable>

I would like to merge two graphs into one dashboad. One Bar Chart to show by category wise and Other bar chat to show the cummulative figure which includes all the category.
I would like to extend the year in date picker on Opportunity Page.
Currenty its showing till 2020. I would like to show till 2030.
I have created one page to show the Opportunity History but when the output comes wherever the changed value is date is shows in "Fri Feb 20 00:00:00 GMT 2015 " format whereas I wanted to show in "20-Feb-2015" format. 
But also in the old value and new value field it could be Number or String Value. How to fix this format problem please advise.

For reference please find below my page code,

<apex:datatable value="{!opportunityHistoryList}" var="opp" width="100%" styleClass="tableClass" border="1">
<apex:column value="{!opp.OpportunityId}" headerClass="headerstyle" headerValue="Opportunity ID"/>
<apex:column value="{!opp.CreatedById}"  headerClass="headerstyle" headerValue="Changed By"/>
<apex:column value="{!opp.CreatedDate}" headerClass="headerstyle" headerValue="Changed Date"/>
<apex:column value="{!opp.Field}" headerClass="headerstyle" headerValue="Field"/>
<apex:column value="{!opp.OldValue}"  headerClass="headerstyle" headerValue="Old information"/>
<apex:column value="{!opp.NewValue}"  headerClass="headerstyle" headerValue="New Information"/>
</apex:datatable>

 
I wanted to create a VF Page to show full list of opportunities. But after excuted my page its shows only 19 records where I am having more than 100 records.
For reference find below my VF code,

---------------------------

<apex:page renderAs="pdf" StandardController="Opportunity" recordSetVar="opportunities"   tabStyle="Opportunity"
    sidebar="false" applyBodyTag="false" showHeader="false">

 <head>
   <style>
     @page{
        size: A4 landscape;
                  }
      .headerstyle
      {
      background:red;
      color:white;
      font-size:10pt;
      text-align:center;     
      }
      .tableClass
      {    
       font-size:8pt;
       border:1;
       border-spacing:2px;
       border-collapse:separate;   
      }
            
    </style>
<apex:form >

 <c:dynapdfcomponent type="header" > 
<div align="center" style="font-size:18.0pt;word-break:break-all">All Opportunities</div><hr style="color:#8A0808" />
</c:dynapdfcomponent>

<br /><br />
    
<apex:datatable value="{!opportunities}" var="opp" width="100%" styleClass="tableClass" border="1">

<apex:column value="{!opp.name}" headerClass="headerstyle" headerValue="Project Title"/>
<apex:column value="{!opp.account.name}"  headerClass="headerstyle" headerValue="Account Name"/>
<apex:column value="{!opp.Facility__c}"  headerClass="headerstyle" headerValue="Facility"/>
<apex:column value="{!opp.Scope_Of_Work__c}"  headerClass="headerstyle" headerValue="Scope Of Work"/>
<apex:column value="{!opp.Pricing_Type__c}" headerClass="headerstyle" headerValue="Pricing Type"/>
<apex:column value="{!opp.BiddingStatus__c}"  headerClass="headerstyle" headerValue="Bidding Status"/>
<apex:column value="{!opp.Estimated_Revenue_MM__c}" headerClass="headerstyle" headerValue="Revenue $M's"/>
<apex:column value="{!opp.Contract_Award_Date__c}" headerClass="headerstyle" headerValue="Contract Award Date"/>
    
</apex:datatable>   
   </apex:form>   
   </head>
</apex:page>
-----------------------------------
Can we use Select query with where condition inside Apex:Page instead of using Apex:Class.
I would like to fetch data from Opportunity for the selected columns using where condition.
I am new in Apex Development. I have written one Apex Class but need help to create the test unit for this class so I can deploy in production.
For reference find below the code of my Apex Class.


public class topprospectsqry{

    public Opportunity[] getOpportunityList() {
    Opportunity[] opps = [SELECT
    name,
    account.name,
    Facility__c,
    Scope_Of_Work__c,
    Pricing_Type__c,
    Revenue__c,
    Contract_Award_Date__c,
    FROM
    Opportunity
    where
    Top_Prospect__c='Yes'
    order by Revenue__c desc
    LIMIT 20
    ];
    return opps;
    }
     
    public pageReference generateReport() {
    return Page.Thirdpage;
    }
    
}


 
I am not able to run the test for my created Apex Classes.
The class name is not apearing on Apex Class Excution screen.

Code Coverage: 0%Your overall code coverage is currently 0%. To deploy code to production, you must have at least 75%.

Due to this I am not able to deploy my class on production. Please advise
 
I wanted to create the Visualforce Page using Apex Class. But when i use the extensions command system says the given class name is not found and not given me an option to create the Apex Class.

 
I would like to extend the year in date picker on Opportunity Page.
Currenty its showing till 2020. I would like to show till 2030.
I have created one page to show the Opportunity History but when the output comes wherever the changed value is date is shows in "Fri Feb 20 00:00:00 GMT 2015 " format whereas I wanted to show in "20-Feb-2015" format. 
But also in the old value and new value field it could be Number or String Value. How to fix this format problem please advise.

For reference please find below my page code,

<apex:datatable value="{!opportunityHistoryList}" var="opp" width="100%" styleClass="tableClass" border="1">
<apex:column value="{!opp.OpportunityId}" headerClass="headerstyle" headerValue="Opportunity ID"/>
<apex:column value="{!opp.CreatedById}"  headerClass="headerstyle" headerValue="Changed By"/>
<apex:column value="{!opp.CreatedDate}" headerClass="headerstyle" headerValue="Changed Date"/>
<apex:column value="{!opp.Field}" headerClass="headerstyle" headerValue="Field"/>
<apex:column value="{!opp.OldValue}"  headerClass="headerstyle" headerValue="Old information"/>
<apex:column value="{!opp.NewValue}"  headerClass="headerstyle" headerValue="New Information"/>
</apex:datatable>

 
Can we use Select query with where condition inside Apex:Page instead of using Apex:Class.
I would like to fetch data from Opportunity for the selected columns using where condition.
I am new in Apex Development. I have written one Apex Class but need help to create the test unit for this class so I can deploy in production.
For reference find below the code of my Apex Class.


public class topprospectsqry{

    public Opportunity[] getOpportunityList() {
    Opportunity[] opps = [SELECT
    name,
    account.name,
    Facility__c,
    Scope_Of_Work__c,
    Pricing_Type__c,
    Revenue__c,
    Contract_Award_Date__c,
    FROM
    Opportunity
    where
    Top_Prospect__c='Yes'
    order by Revenue__c desc
    LIMIT 20
    ];
    return opps;
    }
     
    public pageReference generateReport() {
    return Page.Thirdpage;
    }
    
}


 
I am not able to run the test for my created Apex Classes.
The class name is not apearing on Apex Class Excution screen.

Code Coverage: 0%Your overall code coverage is currently 0%. To deploy code to production, you must have at least 75%.

Due to this I am not able to deploy my class on production. Please advise
 
I wanted to create the Visualforce Page using Apex Class. But when i use the extensions command system says the given class name is not found and not given me an option to create the Apex Class.