Hi,
As per your business requirement, your query should like below
Steps followed:
1. Add CustTable as datasource and set dynamic property on fields to No. On the groupby Node, create groupby on AccountNum
2. Add SalesTable at the next level datasource, set properties FetMode to 1:n, JoineMode to InnerJoirn, Relations to Yes on datasource and on on fields set dynamic property to No. Select Count of SalesId on Fields Node.
3. Add SalesLine as the next level datasource, set properties FetMode to 1:n, JoineMode to InnerJoirn, Relations to Yes on datasource and on on fields set dynamic property to No. Select Sum LineAmount on Fields Node.
Yes you need to refresh your view to remove already selected aggregate functions.
Following link provides you steps to develop ssrs report based on query:
(Developing SSRS report using Query in Microsoft Dynamics AX 2012)
https://community.dynamics.com/ax/b/dynamics101trainingcenterax/archive/2013/07/10/developing-ssrs-report-using-query-in-microsoft-dynamics-ax-2012