Proof of $\text{TVaR}_p(X)$ and $\text{VaR}_{u}(X)$ relationship From Loss Models, 4th ed., by Klugman et al.:

Definition. Let $X$ denote a loss random variable. The Value-at-Risk of $X$ at the $100p$% level, denoted $\text{VaR}_{p}(X)$ or $\pi_p$, is the $100p$ percentile (or quantile)
  of the distribution of $X$.
If $X$ is continuous, then $\text{VaR}_p(X)$ is the value of $\pi_p$
  satisfying  $$\Pr\left(X \leq \pi_p\right) = 1-p\text{.}$$
Definition. Let $X$ be a loss random variable. Then the Tail-Value-at-Risk at the $100p\%$ security level, denoted $\text{TVaR}_p(X)$, is given by \begin{equation*} \text{TVaR}_p(X) = \mathbb{E}\left[X|X > \pi_{p}\right] =\dfrac{\int\limits_{\pi_p}^{\infty}xf(x)\text{ d}x}{S\left(\pi_p\right)}\text{.} \end{equation*}

The text then says

Furthermore, if $\text{TVaR}_p(X)$ is finite, we can use integration
  by parts and substitution to rewrite it as $$\text{TVaR}_p(X) = \dfrac{\int\limits_{p}^{1}\text{VaR}_{u}(X)\text{ d}u}{1-p}\text{.}\tag{*}$$

I did integration by parts and got the following result:
\begin{align*}
\dfrac{\int\limits_{\pi_p}^{\infty}xf(x)\text{ d}x}{S\left(\pi_p\right)} = \dfrac{x[F(x)-1]\bigg|_{x = \pi_p}^{x \to \infty} - \int\limits_{\pi_p}^{\infty}[F(x)-1]\text{ d}x}{S\left(\pi_p\right)} &= \dfrac{-\pi_{p}[F\left(\pi_p\right)-1]+\int\limits_{\pi_p}^{\infty}S(x)\text{ d}x}{S\left(\pi_p\right)} \\
&= \pi_p + \dfrac{\int\limits_{\pi_p}^{\infty}S(x)\text{ d}x}{S\left(\pi_p\right)}\text{.}
\end{align*}
Note that $S(p) = 1 - F(p)$, the complement of the CDF. This is actually the equation given after the result ($*$), and I used integration by parts... can someone explain to me how to get the result ($*$)?

Credit goes to the Actuarial Outpost for providing me with a really nice hint.
For the integral in the numerator of $\text{TVaR}_p(X)$, set $u = F(x)$ so that $x = \pi_{u}$ and $\text{d}u = f(x)\text{ d}x$. Then
$$\int\limits_{\pi_p}^{\infty}xf(x)\text{ d}x = \int\limits_{F(\pi_p)}^{F(\infty)}\pi_{u}\text{ d}u = \int\limits_{p}^{1}\pi_{u}\text{ d}u = \int\limits_{p}^{1}\text{VaR}_{u}(X)\text{ d}u\text{.}$$
Furthermore,
$$S\left(\pi_p\right) = 1 - F\left(\pi_p\right) = 1 - p\text{.}$$
The result follows immediately.
