An era ends: After five seasons on Fox, David E. Kelley’s Emmy-winning dramedy “Ally McBeal” is closing its casebook for good, Kelley and Fox executives announced Wednesday. According to The New York Times, Kelley delivered the news to the cast, including lead Calista Flockhart, Wednesday night on the set. The Hollywood Reporter said that the announcement came as a shock to the cast and crew, with some bursting into tears. Kelley now faces the writing of the May 20 series finale. His decision to end “Ally” had been reached, said The Times, following the disappointing ratings for a recent, special two-hour episode that he had hoped might boost the sagging popularity of the series. In a statement to the press, Kelley, 45, said, “It’s sad to say goodbye to something you love, even when perhaps it is time.” In its time, “Ally” was the only hour-long show ever to win the Emmy as TV’s best comedy; it made one-time Broadway actress Calista Flockhart, now 37, a household name and her character, a commitment-phobic Boston lawyer, the symbol for the modern American young woman — according to a cover story in Time magazine when the show was at its peak.