
833 So.2d 1139 (2002)
Wilbert ROBERTSON, et al., Plaintiff-Appellant,
v.
CADDO PARISH, LOUISIANA, et al., Defendant-Appellee.
No. 36,540-CA.
Court of Appeal of Louisiana, Second Circuit.
December 11, 2002.
Rehearing Denied January 23, 2003.
*1140 Wilbert Robertson, In Proper Person.
Richard P. Ieyoub, Attorney General, Marry E. Hunley, Assistant Attorney General, for Appellant.
Paul J. Carmouche, District Attorney, Tommy J. Johnson, Catherine Estopinal, Assistant District Attorneys, for Appellee.
Before CARAWAY, PEATROSS and KOSTELKA, JJ.
KOSTELKA, J.
From a judgment granting exceptions of no cause and no right of action in favor of the State of Louisiana and the Parish of Caddo (collectively referred to herein as "defendants"), Wilbert Robertson ("Robertson") appeals. We affirm.

FACTS
Robertson and fifteen other plaintiffs (collectively referred to herein as "plaintiffs") seek a declaratory judgment decreeing La.C.Cr.P. art. 413(B), as it read prior to its 1999 amendment, unconstitutional due to the alleged racially discriminatory method of selecting grand jury foremen in Caddo Parish, Louisiana. The relevant facts leading up to the filing of the subject exceptions and previous history of this matter are set forth in Robertson v. Ieyoub, 34,776 (La.App.2d Cir.11/16/01), 799 So.2d 863. On February 27, 2002, after this previous appeal, defendants filed exceptions of no right and cause of action and prescription urging that plaintiffs had no right or cause of action to challenge the constitutionality of La.C.Cr.P. art. 413(B) via declaratory judgment. When, on March 26, 2002, the trial court granted defendants' exceptions of no right and cause of action, this appeal ensued.[1]


*1141 DISCUSSION
The purpose of the peremptory exception of no cause of action is to determine the sufficiency in law of the petition. It questions whether the law provides a remedy to the plaintiff against the defendant for the complaints set forth in the petition. Hall v. Zen-Noh Grain Corp., XXXX-XXXX (La.04/27/01), 787 So.2d 280; Miller v. Seven C's Properties, LLC, 2001-543 (La.App. 3d Cir.11/21/01), 800 So.2d 406, writ denied, XXXX-XXXX (La.03/08/02), 811 So.2d 878; Stelly v. Ieyoub XXXX-XXXX (La.App. 3d Cir.10/31/01), 799 So.2d 1206. All well-pleaded allegations must be assumed as true, and any doubt is to be resolved in favor of the petition. Id. In reviewing a trial court's ruling sustaining an exception of no cause of action, the reviewing court should subject the case to de novo review because the exception raises a question of law and the lower court's decision is based solely on the sufficiency of the petition. McCoy v. City of Monroe, 32,521 (La.App.2d Cir.12/08/99), 747 So.2d 1234, writ denied, XXXX-XXXX (La.03/30/01), 788 So.2d 441.
After de novo review of the record before us, we find no error in the trial court's determination that Robertson[2] has failed to state a cause of action.
Robertson seeks a declaration of the unconstitutionality of La. C.Cr.P. art. 413(B), prior to its 1999 amendment, as it applied to his March 20, 1986 indictment and resulting conviction for aggravated rape and burglary. Specifically, he has maintained that "when [the][s]tate court system allowed the appointment of grand jury forepersons it g[a]ve them authority to vote for an indictment against the plaintiffs and in favor of the prosecution." Further, Robertson alleged that "the integrity of their decisions depended upon the integrity of the process used to select the grand jurors. And that process was infected with racial discrimination, to the extent, doubt is cast over the fairness of all subsequent decisions, in particular, with regard to injury caused to [p]laintiffs." For such relief, however, we find declaratory judgment unavailable.
We first note that in 1999, the Legislature amended Article 413(B) to remove the grand jury foreman selection power from the judge, in favor of a random selection. See complete explanation in State v. Langley, 95-1489 (La.04/03/02), 813 So.2d 356. Prior to its 1999 amendment, the article called for the district court to select one person from the grand jury venire to serve as the foreman of the grand jury. Accordingly, Robertson now seeks a determination of the constitutionality of a provision which no longer exists. Specifically, Robertson seeks this relief based upon the past application of that repealed provision to his 1986 indictment and conviction. Although couched in terms of a prayer for declaratory relief, we can interpret Robertson's request as nothing other than an effort to obtain a reversal of his conviction based upon the alleged illegality of the previous Article 413(B). The law is clear that a suit for declaratory judgment is an appropriate means of testing the constitutionality of a statute or applicability of an ordinance in which there is an actual controversy between the parties. It is available to test the validity of a criminal ordinance where a criminal prosecution has not yet begun. Liberto v. Rapides *1142 Parish Police Jury, 95-456 (La.App. 3d Cir.11/02/95), 667 So.2d 552; Vonderhaar v. Parish of St. Tammany, 633 So.2d 217 (La.App. 1st Cir.1993). See also, Olan Mills, Inc. of Tennessee v. City of Bogalusa, 225 La. 648, 73 So.2d 791 (1954). Louisiana courts have consistently held that declaratory relief is available to decide a justiciable controversy, meaning a presently existing, actual and substantial dispute, but the courts are not empowered to render advisory opinions on moot or abstract issues of law. American Waste & Pollution Control Co. v. St. Martin Parish Police Jury, 627 So.2d 158 (La.1993). Obviously, these purposes abide in actions contesting both criminal and civil ordinances. In the criminal context, the courts have found these purposes met only where an individual falls within a class which is threatened with prosecution under an allegedly unconstitutional statute, not after the prosecution has begun. Extending this reasoning to the present facts, we also conclude that declaratory judgment is unavailable to test the constitutionality of a repealed criminal statute as applied to a 1986 indictment and the resulting conviction. Clearly, any threat of prosecution or even application of the statute to Robertson or any other individual no longer exists. Certainly, therefore, the repeal of the provisions Robertson seeks to declare unconstitutional in these civil proceedings eliminated any threat of its use and thus any "active" interest or rights Robertson may have possessed in having it declared unconstitutional. Accordingly, no resolution of a justiciable controversy could possibly be served by a declaratory judgment. Moreover, at the time of his prosecution, Robertson possessed viable remedies at law via a motion to quash the grand jury indictment and/or post-conviction relief.[3] Whether or not he took advantage of such relief at that time is not revealed by the record before us. Nevertheless, the law is clear that a defendant must assert an equal protection claim regarding the composition of grand juries in a pre-trial motion to quash or he waives any complaint in that regard. Deloch v. Whitley, 96-1901 (La.11/22/96), 684 So.2d 349; State v. Lee, 340 So.2d 180 (La.1976); State v. White, 193 La. 775, 192 So. 345 (1939); State v. Robinson, 32,794 (La. App.2d Cir.03/01/00), 754 So.2d 311, writ denied, XXXX-XXXX (La.03/23/01), 787 So.2d 1008. If he failed to file appropriate pre-trial motions, Robertson clearly has no cause of action via declaratory judgment, because he has waived his right to complain. If appropriate motions were filed, Robertson has no remedy in a civil action, but rather through criminal proceedings. See, La.C.Cr.P. art. 930.8 and discussion in State v. Divers, 34,748 (La.App.2d Cir.06/22/01), 793 So.2d 308, writ denied, 2001-2544 (La.08/30/02), 823 So.2d 937.
For these reasons, we find that a declaratory judgment is unavailable to Robertson. The situation presents no existing, actual and substantial dispute for which such a remedy would be appropriate.
We finally mention that the courts of this state have analyzed Caddo Parish's procedure for selecting a grand jury foreman from the years 1971-1991 and in those cases found no unlawful discrimination in the selection of grand jury foremen. See, State v. Davis, 92-1623 (La.05/23/94), 637 So.2d 1012, cert. denied, 513 U.S. 975, 115 S.Ct. 450, 130 L.Ed.2d 359 (1994) (discussion *1143 contained in unpublished appendix); State v. Davis, 626 So.2d 800 (La. App. 2d Cir.1993), writ denied, 93-2945 (La.02/25/94), 632 So.2d 762; State v. Thomas, 609 So.2d 1078 (La.App. 2d Cir. 1992), writ denied, 617 So.2d 905 (La. 1993).
Therefore, we find that Robertson has failed to state a cause of action for declaratory judgment. Because we so find, it is unnecessary that we address the no right-of-action ruling. The judgment of the trial court is affirmed at Robertson's costs.
AFFIRMED.

APPLICATION FOR REHEARING
Before WILLIAMS, CARAWAY, PEATROSS, KOSTELKA, and MOORE, JJ.
Rehearing denied.
NOTES
[1]  The trial court declined to rule on the prescription exception, finding it had been mooted by its ruling on the other exceptions.
[2]  While the original suit was filed by fifteen other plaintiffs who initially sought to have the claims certified as a class action, the record shows that plaintiffs failed to follow the certification procedure set forth in La. C.C.P. art. 592. Accordingly, the case has not been certified as a class action. Therefore, because only Robertson has appealed, it is proper that we solely address his claims.
[3]  For example, our limited research reveals the issue of discrimination in the selection of the grand jury foreperson to have been a heavily litigated and debated issue prior to Robertson's indictment in 1986. See generally, Rose v. Mitchell, 443 U.S. 545, 99 S.Ct. 2993, 61 L.Ed.2d 739 (1979); Castaneda v. Partida, 430 U.S. 482, 97 S.Ct. 1272, 51 L.Ed.2d 498 (1977).
