If the investment account is a tax-advantaged account such as an IRA, then you do not report the transactions on your personal return or pay any capital gains tax on any gains resulting from selling an investment.
If the account is a taxable account, then you will be required to report any sales transactions and pay capital gains tax on any gains resulting from the sales. This is true whether or not you have actually taken money out of the account or simply re-invested it into something else.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"