Thus, section 9, Rule 113, expressly provides that the dismissal of a case against the defendant can only be considered as a bar to another prosecution for the same offense when the case against him is dismissed upon a valid complaint or information or other formal charge sufficient in form and substance to sustain a conviction.