You have a couple of issues here: 1. Constructor `public SalesReportExtension(ApexPages.StandardController controller)` will never be called since you stated this is a custom controller 2. When used in a VF Component, the constructor `public SalesReportExtension()` is called before the setter for the component's `assignTo="{!accountId}"` Hence, the SOQL select statement in the constructor `public SalesReportExtension()` will not have a value for `accountId` as the list `accountIds` has only a single null element. A handy reference is the [VF Developer's Guide Order of Execution][1] [1]: https://www.salesforce.com/docs/developer/pages/index_Left.htm#CSHID=pages_controller_lifecycle_example.htm%7CStartTopic=Content%2Fpages_controller_lifecycle_example.htm%7CSkinName=webhelp