We affirm the court of appeals’ dismissal of the complaint for declaratory judgment and injunction, as courts of appeals lack jurisdiction in these causes. State ex rel. Neer v. Indus. Comm. (1978), 53 Ohio St.2d 22, 7 O.O.3d 64, 371 N.E.2d 842; State ex rel. Pressley v. Indus. Comm. (1967), 11 Ohio St.2d 141, 40 O.O.2d 141, 228 N.E.2d 631, paragraph four of the syllabus. Moreover, we affirm dismissal of the habeas claim for failure to attach documents, as required by R.C. 2725.04(D). However, we reverse as to appellant’s mandamus claim.
The court of appeals dismissed the habeas and mandamus claims for failure to set forth the cause of action in numbered paragraphs, as required by Civ.R. 10(B). There is no doubt from the record that appellant’s “application” did not conform to that rule, but was, as the court of appeals stated, “more in the nature of a brief than a complaint.” However, the Staff Note to Civ.R. 10(B) suggests that the proper remedy for failure to comply is granting a motion to separately state and number, not sua sponte dismissal:
“Under present Ohio practice the penalty for failing to separately state and number is a motion to separately state and number. Under the rule the same motion should be used (although such motion is not specifically provided for in Rule 12), but it should be granted as a practical matter, as has been the experience in federal courts under the same rule, only when confusion is caused by failure to separately state and number such that the opposing party cannot properly answer. * * * ”
Accordingly, we hold that dismissal of the habeas and mandamus claims for this procedural formality was not appropriate in this case.
Appellees also argue that the court of appeals could have dismissed the habeas petition under Hammond v. Dallman (1992), 63 Ohio St.3d 666, 590 N.E.2d 744, *467for failure to attach commitment documents, as required by R.C. 2725.04(D), and for failure to attack jurisdiction. The jurisdictional argument is no longer well taken. In State ex rel. Firman v. Money (1994), 69 Ohio St.3d 591, 635 N.E.2d 26, we held that habeas will lie for nonjurisdictional deprivations of liberty if there is no adequate legal remedy. There is no appeal from a parole revocation decision; therefore, there is no adequate legal remedy. However, the cause in habeas corpus could have been properly dismissed for failure to comply with R.C. 2725.04(D): “ * * * [A] reviewing court is not authorized to reverse a correct judgment merely because erroneous reasons were assigned as a basis thereof.” State ex rel. Cassels v. Dayton City School Dist. Bd. of Edn. (1994), 69 Ohio St.3d 217, 222, 631 N.E.2d 150, 154. Accordingly, we affirm dismissal of the habeas claim on alternate grounds.
Mandamus, however, is not subject to R.C. 2725.04(D), and in mandamus, appellant may compel discovery. In State ex rel. Wright, supra, the Court of Appeals for Franklin County allowed a writ of mandamus, compelling the Ohio Adult Parole Authority to hold a new hearing excluding evidence derived from unconstitutional searches, citing State v. Burkholder (1984), 12 Ohio St.3d 205, 12 OBR 269, 466 N.E.2d 176, in which this court held that evidence derived from an unlawful search must be excluded from probation revocation proceedings. Wright was appealed to this court and remains pending on motion for reconsideration. Accordingly, we find that the claim of unlawful search states a potentially good cause of action in mandamus, and having rejected the grounds of procedural formality upon which the court of appeals dismissed the claim in mandamus, we reverse and remand for mandamus proceedings consistent with State ex rel. Wright v. Ohio Adult Parole Auth., supra.
Judgment affirmed in part, reversed in part and cause remanded.
Moyer, C.J., Wright, Resnick, F.E. Sweeney, Pfeifer and Cook, JJ., concur. Douglas, J., concurs in judgment only.