This paper studies a Pareto-optimal reinsurance problem when the contract is subject to default of the reinsurer. We assume that the reinsurer can invest a share of its wealth in a risky asset and default occurs when the reinsurer's end-of-period wealth is insufficient to cover the indemnity. We show that without the solvency regulation, the optimal indemnity function is of excess-of-loss form, regardless of the investment decision. Under the solvency regulation constraint, by assuming the investment decision remains unchanged, the optimal indemnity function is characterized element-wisely. Partial results are derived when both the indemnity function and investment decision are impacted by the solvency regulation. Numerical examples are provided to illustrate the implications of our results and the sensitivity of solution to the model parameters.