yes, u need to cancel e-ticket before chart preparation for refund, if it is in waiting.
If the chart is prepared, ticket is not confirmed still remaining in waiting then u dn't need 2 cancel it, because it automatically gets cancelled as per the r & r of IRCTC.