
635 N.E.2d 986 (1994)
262 Ill. App.3d 923
200 Ill.Dec. 647
Robert PINES, Plaintiff-Appellee and Cross-Appellant,
v.
Leo PINES and Phillip Pines, not individually, but as Trustee under Trust Agreement dated November 20, 1975, a/k/a The Leo Pines Trust No. 101, Defendants-Appellants and Cross-Appellees.
No. 1-93-1409.
Appellate Court of Illinois, First District, Fourth Division.
May 26, 1994.
*987 Much Shelist Freed Denenberg & Ament, Chicago (Anthony C. Valiulis & Karen K. Litscher, of counsel), for appellants.
William H. Theis, Chicago, for appellee.
Justice HOFFMAN delivered the opinion of the court:
The defendants, Leo Pines and Phillip Pines, appeal from an order which denied them leave to file a motion for sanctions against the plaintiff, Robert Pines, after his action was dismissed with prejudice. The plaintiff cross-appeals for review of an order which denied his motion for voluntary dismissal without prejudice and dismissed the action with prejudice. We consider: (1) whether the trial judge properly denied the defendants leave to file a motion for sanctions; (2) whether this court has jurisdiction over the plaintiff's cross-appeal to review the order dismissing the case with prejudice when the order stated that it was final and appealable, but the plaintiff dismissed his initial appeal from the order; (3) whether the trial judge abused his discretion when he denied the plaintiff's motion for voluntary dismissal without prejudice and dismissed the case with prejudice; and (4) whether this court should review the denials of the defendants' motions for summary judgment and directed finding. For the following reasons, we reverse and remand with directions.
The plaintiff filed an action on August 7, 1989, against his father, Leo Pines, and his brother, Phillip Pines, requesting a constructive trust on certain stock. The complaint *988 alleged that when the plaintiff was a minor his father converted the plaintiff's stock and transferred it to the plaintiff's brother as trustee of the father's trust.
The defendants answered the complaint, raised certain affirmative defenses, and subsequently filed a motion for summary judgment which was denied. The case was set for trial.
The bench trial was held on several days during a six-month period. After the plaintiff presented his case in chief, the defendants moved for a directed finding which was denied. While the defendants were presenting their case, they tendered documents for the first time which the plaintiff had requested during discovery. The plaintiff moved for a continuance indicating that he was considering reopening his case based on the documents. On December 14, 1992, the trial judge reopened discovery and continued the trial generally.
Subsequently, the trial judge retired from the bench and the case was reassigned to another judge who denied the plaintiff's motion to amend his complaint and set a date for trial. There was no discussion on the record as to whether the plaintiff would reopen his case or whether the trial would start over. The order, entered February 23, 1993, stated that "trial shall commence on March 3, 1993, at 11:00 a.m., with plaintiff's case."
The day after the order was entered, the plaintiff filed a motion for voluntary dismissal without prejudice under section 2-1009 of the Code of Civil Procedure (735 ILCS 5/2-1009 (West 1992)), asserting that the second trial had not yet begun and he was ready to tender the statutory costs to the defendants.
At the hearing on the motion, the defendants argued that the plaintiff was not entitled to a voluntary dismissal because they were in the middle of trial. The judge responded, "Didn't we all agree the last time we were in here * * * that we were going to start anew?" After hearing the arguments of the parties, the judge entered an order on February 26, 1993, denying the plaintiff's motion for voluntary dismissal without prejudice and dismissing the action with prejudice. The judge stated that he found no reason to delay the enforcement or appeal of the order and the order recited that it was "final and appealable."
The plaintiff filed a notice of appeal within 30 days on March 19, 1993; the defendants filed a cross-appeal on March 25.
Several days later, on March 29, 1993, the defendants filed a motion for sanctions in the trial court arguing that the plaintiff's pleadings and answers to discovery violated Supreme Court Rule 137 (134 Ill.2d R. 137) because the plaintiff made false allegations and statements in those documents. The defendants requested a lump sum for both attorney fees and costs.
The judge denied the defendants leave to file the motion for sanctions on April 13, 1993, because it was "untimely" and struck the motion. The judge acknowledged that the motion was filed within 30 days of the dismissal order and stated, "I'm not saying I don't have have jurisdiction. I won't hear it at this late stage."
The defendants filed a notice of appeal on April 16, 1993, from the order denying leave to file their motion for sanctions; the plaintiff filed a cross-appeal on April 19 seeking review of the order dismissing his case with prejudice.
By agreement of the parties, this court dismissed the plaintiff's first appeal and the defendants' cross-appeal on May 20, 1993.

OPINION
In their appeal, the defendants argue that the trial judge improperly denied them leave to file a motion for sanctions and struck the motion as untimely.
Rule 137 does not require a party to obtain leave of court to file a motion for sanctions. (134 Ill.2d R. 137.) At the time the defendants filed their motion for sanctions in this case, there was no time period stated in the rule within which a motion had to be filed[1], but the rule provided that all proceedings *989 under the rule must be within and a part of the underlying action. (134 Ill.2d R. 137.) Courts have held that a motion for sanctions can be filed at any time while the trial court has jurisdiction. (Marsh v. Evangelical Covenant Church (1990), 138 Ill.2d 458, 150 Ill. Dec. 572, 563 N.E.2d 459 (considered under predecessor to Rule 137); In re Custody of Landau (1992), 233 Ill.App.3d 853, 175 Ill. Dec. 402, 600 N.E.2d 25.) Also, a pending notice of appeal does not divest the trial court of jurisdiction to consider a timely-filed motion for sanctions. Gaynor v. Walsh (1991), 219 Ill.App.3d 996, 162 Ill.Dec. 409, 579 N.E.2d 1223.
In this case, the defendants were not required to obtain leave of court to file their motion for sanctions. The motion was timely because it was filed on the 30th day after the order was entered dismissing the plaintiff's action with prejudice. (See 5 ILCS 70/1.11 (West 1992) (the 30th day fell on a Sunday which is excluded).) Although the plaintiff filed a notice of appeal before the defendants filed their motion for sanctions, the trial court continued to have jurisdiction to consider a timely-filed motion for sanctions. There was no reason for the trial judge to refuse to consider the defendants' motion for sanctions as untimely.
The plaintiff argues on appeal that the order denying leave to file the motion for sanctions should be affirmed because the motion was not specific (see Diamond Mortgage Corp. v. Armstrong (1988), 176 Ill.App.3d 64, 125 Ill.Dec. 632, 530 N.E.2d 1041), and it did not have merit. However, whether sanctions should be imposed is a discretionary matter for the trial court (Graham v. Hildebrand (1993), 248 Ill.App.3d 742, 188 Ill.Dec. 689, 618 N.E.2d 1259), and the trial court should first consider the issues the plaintiff now raises before this court (In re Estate of Knowlson (1990), 204 Ill.App.3d 454, 149 Ill. Dec. 813, 562 N.E.2d 277). As a result, the order denying the defendants leave to file their motion for sanctions is reversed and remanded for the trial court to consider the motion.
In the plaintiff's cross-appeal, he challenges the order denying his motion for voluntary dismissal without prejudice and dismissing his action with prejudice. Before considering the merits of the cross-appeal, this court has an obligation to consider whether it has jurisdiction to review the dismissal order even though the parties did not raise the issue. (In re Estate of Devey (1993), 239 Ill.App.3d 630, 180 Ill.Dec. 616, 607 N.E.2d 685.) The plaintiff here dismissed his appeal from an order which stated that it was "final and appealable" and then subsequently sought review of the order in his cross-appeal.
Supreme Court Rule 304(a) allows an appeal from a final order which disposes of fewer than all of the parties or claims if an express written finding is made that there is no just reason to delay enforcement or appeal.[2] (134 Ill.2d R. 304(a).) When an order includes a Rule 304(a) finding, it must be timely appealed or the right to challenge the ruling is lost. (Stroud v. News Group Chicago, Inc. (1991), 215 Ill.App.3d 1006, 159 Ill. Dec. 483, 576 N.E.2d 152.) Final and appealable language in a dismissal order is sufficient under Rule 304(a) even though it does not refer to enforcement. In re Application of the Du Page County Collector (1992), 152 Ill.2d 545, 178 Ill.Dec. 773, 605 N.E.2d 567 (criticizing cases which held that orders stating they were "final and appealable" was insufficient under Rule 304(a)).
A dismissal with prejudice is a final order (Knox v. Keene Corp. (1991), 210 Ill. App.3d 141, 155 Ill.Dec. 201, 569 N.E.2d 201), and if no other parties or claims are pending, it may be appealed under Supreme Court Rule 301 (134 Ill.2d. R. 301). The filing of a timely motion for sanctions, however, renders a notice of appeal from such an order premature and ineffective to confer appellate jurisdiction. (Gaynor, 219 Ill.App.3d 996, 162 Ill.Dec. 409, 579 N.E.2d 1223.) No appeal may be taken from an otherwise final judgment when a motion for sanctions remains to be resolved without a finding under *990 Rule 304(a) that there is no just reason to delay enforcement or appeal. Marsh, 138 Ill.2d 458, 150 Ill.Dec. 572, 563 N.E.2d 459.
In this case, at the time the plaintiff's case was dismissed with prejudice, there were no other claims or parties pending. Nevertheless, the trial judge stated that there was no reason to delay enforcement or appeal of the order and the order recited that it was final and appealable. The plaintiff filed a timely notice of appeal from that order which was subsequently dismissed. Although the order included a Rule 304(a) finding at the time it was entered, it had no effect because the dismissal order left no claims or parties pending. As a corollary to the rule that a Rule 304(a) finding cannot make a non-final order final (Metzger v. Fitzsimmons (1988), 175 Ill.App.3d 674, 125 Ill.Dec. 103, 529 N.E.2d 1179), such a finding has no effect in an order that disposes of all of the parties and claims (see Van Slambrouck v. Marshall Field & Co. (1981), 98 Ill.App.3d 485, 53 Ill.Dec. 888, 424 N.E.2d 679 (stating that when an order was otherwise appealable, the presence or absence of a Rule 304(a) finding was immaterial)). In a typical situation, an unnecessary Rule 304(a) finding would be harmless because the order would be appealable under Rule 301; however, in a situation such as the present one, it can result in a party losing his right to appeal when the opposing party files a motion for sanctions after the order was entered. But see American National Bank & Trust Co. v. Bus (1991), 212 Ill.App.3d 133, 155 Ill.Dec. 766, 569 N.E.2d 1377 (finding that the appellate court had jurisdiction based on a Rule 304(a) finding in an order although the order left no parties or claims pending).
In Marsh, the court held that an appeal may not be taken from an otherwise final judgment entered on a claim when a motion for sanctions remains to be resolved without a finding under Rule 304(a), but such a finding may be entered after the order is entered (134 Ill.2d R. 304(a)). The holding in Marsh does not require a Rule 304(a) finding at the time any final order is entered which disposes of all of the claims and parties for the possibility that a motion for sanctions may be timely filed subsequently.
In this case, therefore, the Rule 304(a) finding included in the order dismissing the case with prejudice had no effect because it did not leave any parties or claims pending and the finding was not subsequently activated when the defendants timely filed a motion for sanctions. When the defendants filed their motion, it tolled the time for the plaintiff to appeal from the dismissal order and the dismissal of the plaintiff's notice of appeal from that order was proper. This court has jurisdiction to consider the plaintiff's cross-appeal.
Turning to the merits of the plaintiff's cross-appeal, he argues that the trial judge abused his discretion when he denied the plaintiff's motion to voluntarily dismiss without prejudice and dismissed the case with prejudice. The plaintiff contends that he had the right to a voluntary dismissal because the first trial was effectively cancelled. The defendants respond that because there was no mistrial declared during trial, the plaintiff moved for voluntary dismissal in the midst of trial and therefore, the dismissal with prejudice was proper.
Section 2-1009(a) provides:
"The plaintiff may, at any time before trial or hearing begins, upon notice to each party who has appeared or each such party's attorney, and upon payment of costs, dismiss his or her action or any part thereof as to any defendant, without prejudice, by order filed in the cause. Thereafter the plaintiff may dismiss, only on terms fixed by the court (1) upon filing a stipulation to that effect signed by the defendant, or (2) on motion specifying the ground for dismissal, which shall be supported by affidavit or other proof." (735 ILCS 5/2-1009(a) (West 1992)).
Absent the pendency of a potentially dispositive motion (see Gibellina v. Handley (1989), 127 Ill.2d 122, 129 Ill.Dec. 93, 535 N.E.2d 858), if a plaintiff strictly complies with the requirements of section 2-1009 and moves before trial or hearing begins, the trial judge does not have discretion to deny the motion (Farrar v. Jacobazzi (1993), 245 Ill.App.3d 26, 185 Ill.Dec. 125, 614 N.E.2d 259). Once a trial or hearing has begun, the right to dismissal *991 is curtailed to prevent a plaintiff from dismissing a case if the trial proceedings appear unfavorable (Kilpatrick v. First Church of the Nazarene (1988), 177 Ill. App.3d 83, 126 Ill.Dec. 508, 531 N.E.2d 1135), and the trial judge may require that the dismissal is with prejudice (Kahle v. John Deere Co. (1984), 104 Ill.2d 302, 84 Ill.Dec. 650, 472 N.E.2d 787). Whether trial has begun is a question of law. (Kahle, 104 Ill.2d 302, 84 Ill.Dec. 650, 472 N.E.2d 787.) If a trial began but then is cancelled for any reason, the absolute right to a voluntary dismissal revests until the next trial begins. Kilpatrick, 177 Ill.App.3d 83, 126 Ill.Dec. 508, 531 N.E.2d 1135.
To resolve this issue, it is necessary to determine whether the trial was cancelled. During the defendants' case, discovery was reopened because the defendants presented documents for the first time and the trial was generally continued. After the trial judge who had heard the evidence retired and the case was reassigned, the next judge set a date for trial stating in an order that trial would "commence * * * with plaintiff's case." This language indicates that trial would begin again before the new judge. This order was proper because due process contemplates that all of the evidence should be submitted before one judge who may observe the witnesses, weigh their testimony, and determine their credibility. (Trzebiatowski v. Jerome (1962), 24 Ill.2d 24, 179 N.E.2d 622; Harper v. Johnson (1978), 61 Ill.App.3d 190, 18 Ill.Dec. 652, 377 N.E.2d 1288.) The defendants argue the order only meant that the plaintiff could reopen his case, but there is no indication in the record that the plaintiff requested either judge to reopen his case although he was considering such a request. Also, if the defendants were correct, the order would have stated that the plaintiff's case would be reopened. At a subsequent hearing, the new judge believed that the trial would begin anew. These circumstances indicate that the first trial was effectively cancelled or vacated and the plaintiff's right to a voluntary dismissal revested. The defendants did not argue that the plaintiff's motion for voluntary dismissal failed to comply with the statutory requirements of notice and tender of costs. As a result, the trial judge did not have discretion to deny the motion. The order dismissing the case with prejudice is reversed and remanded for entry of an order granting the plaintiff a voluntary dismissal without prejudice.
Because of our decision that the defendants' motion for sanctions was timely and the plaintiff was entitled to a voluntary dismissal without prejudice, it is necessary to discuss a related concern which was not directly raised by the parties.
This court may look to cases interpreting Rule 11 of the Federal Rules of Civil Procedure (Fed.R.Civ.P. 11) for guidance in interpreting Rule 137 because the rules are substantially similar. (Edward Yavitz Eye Center, Ltd. v. Allen (1993), 241 Ill.App.3d 562, 181 Ill.Dec. 761, 608 N.E.2d 1235.) The United States Supreme Court has held that a voluntary dismissal does not expunge a Rule 11 violation because the violation of Rule 11 is complete when the offending paper is filed. (Cooter & Gell v. Hartmarx Corp. (1990), 496 U.S. 384, 110 S.Ct. 2447, 110 L.Ed.2d 359.) The court in Cooter & Gell stated that "the imposition of a Rule 11 sanction is not a judgment on the merits of an action. Rather, it requires the determination of a collateral issue: whether the attorney has abused the judicial process, and, if so, what sanction would be appropriate. Such a determination may be made after the principal suit has been terminated." (Cooter & Gell, 496 U.S. at 396, 110 S.Ct. at 2456, 110 L.Ed.2d at 376.) Also, a Rule 11 sanction does not assess the legal merits of the complaint and even if the court found that a complaint was not legally tenable or factually well-founded under Rule 11, the resulting sanction would not preclude refiling of a complaint after a voluntary dismissal without prejudice. Cooter & Gell, 496 U.S. at 396, 110 S.Ct. at 2456, 110 L.Ed.2d at 376.
In this case, therefore, the fact that the plaintiff voluntarily dismissed his complaint without prejudice does not necessarily preclude a finding that his pleadings violated Rule 137. If the trial judge finds that sanctions are warranted, that determination would not be a judgment on the merits of the action and would not preclude the plaintiff from refiling the complaint.
*992 In an alternative argument, the defendants assert that this court can affirm the trial judge's order dismissing the action with prejudice for any reason supported by the record (Rognant v. Palacios (1991), 224 Ill.App.3d 418, 166 Ill.Dec. 728, 586 N.E.2d 686), and as a result, this court should review the denials of their motions for summary judgment and directed finding.
The denial of a motion for summary judgment which is on appeal from a final order when there has been no trial on the merits may be reviewable in some circumstances (In re Application of Busse (1986), 145 Ill.App.3d 530, 145 Ill.App.3d 530, 495 N.E.2d 1188), but the denial of a motion for directed verdict at the close of the plaintiff's case is waived if the defendant presents evidence (735 ILCS 5/2-1110 (West 1992)). In any event, a party cannot complain of error when he would not sustain any prejudice from it. Material Service Corp. v. Department of Revenue (1983), 98 Ill.2d 382, 75 Ill.Dec. 219, 457 N.E.2d 9.
In this case, this court will not review the denial of either of the defendants' motions. Even if the orders could be reviewed, we have decided that the plaintiff was entitled to a voluntary dismissal without prejudice and the defendants will only suffer prejudice if the plaintiff refiles his action. Because the plaintiff has the absolute right to refile his action after a voluntary dismissal without prejudice (735 ILCS 5/13-217 (West 1992)), the review of the denial of the defendants' motions, if they were found erroneous, would effectively defeat the plaintiff's right to refile.
For the foregoing reasons, the order denying the defendants leave to file a motion for sanctions is reversed and remanded for the trial court to consider the motion and the order dismissing the plaintiff's case with prejudice is reversed and remanded for entry of an order granting the plaintiff a voluntary dismissal without prejudice.
Reversed and remanded with directions.
CAHILL, P.J., and JOHNSON, J., concur.
NOTES
[1]  Rule 137 has been amended and now states that motions for sanctions must be filed within 30 days of the entry of final judgment or, if a post-judgment motion is timely filed, within 30 days of the ruling on that motion. Official Reports Advance Sheet No.___, R. 137, eff. February 1, 1994.
[2]  Rule 304(a) has been amended and now provides that the trial judge must make an express written finding that "there is no just reason for to be delaying either enforcement or appeal or both." Official Reports Advance Sheet No. ___, Rule 304(a), eff. February 1, 1994.
