Mayor Marion Barry painted a glowing portrait of the District yesterday in his fourth State of the District address, citing his administration's contributions toward making it the "the finest city in the world" and pausing only briefly to deplore the "misdeeds of a few" whose actions threaten to smear the image of government.

"We will not tolerate corruption and violations of the public trust in the D.C. government," Barry told more than 2,500 city workers, students, senior citizens and civic and business leaders who turned out to the D.C. Convention Center for a speech preceded by a theatrical sound-and-light show extolling the virtues of the nation's capital.

The mayor, noting that he was hoping to "set a tone of optimism" for the city, was interrupted repeatedly by applause as he ticked off advances in housing, crime fighting, jobs and economic development.

He made no specific reference to any authors of "misdeeds" but appeared to be responding to the sentencing last week of Ivanhoe Donaldson, his confidant and former deputy mayor, on federal fraud and cover-up charges.

Barry, in acclaiming the "excellent education" available to students at the University of the District of Columbia, also cautioned his audience not to "negatively judge the standards" of UDC because of irregularities alleged there. Last summer, UDC President Robert L. Green resigned under pressure after reports alleged that he had misused school funds.

The mayor's speech was part credo and part tribute to the city. Barry has not announced whether he will run for a third term this year, but he is widely expected to do so.

"For seven years now, I have been your mayor," said Barry. "I have served our city with a great deal of pride and humility, but equally so with compassion, determination, tenacity, courage and vision."

Later telling reporters he considers himself a "statesman" and that in delivering his address he was "just doing what other statesmen are doing," Barry laced his speech with personal philosophy and poetry. The mayor, quoting from Langston Hughes' poem "Mother to Son," told a responsive, standing-room-only audience, "My friends, for our city, 'Life ain't been no crystal stair,' but we still are a-climbing, and we will never turn back."

After delivering the speech, Barry stood for 20 minutes at the edge of the stage signing autographs and shaking hands with admirers and subordinates who lined up to congratulate him. Absent from the line were D.C. City Council Chairman David A. Clarke and council member John Wilson (D-Ward 2), both of whom have been mentioned as possible mayoral challengers.

Clarke, while crediting the mayor with highlighting needs in the areas of housing, drug abuse and employment, said afterwards he thought Barry should have offered more proposals for dealing with them. "Everything is not roses," he said, "and everything is not rosy for the future."

Wilson said the State of the District speech "reminds me of my favorite televison show, 'Dynasty.' They wear beautiful clothes and say beautiful things, but the plot has no substance attached to it. That's what I felt about the mayor's speech. It was wonderful entertainment."

"I thought it was a good speech," said Larry Brown, a public affairs official with the D.C. Recreation Department, which helped stage the event. "It showed that the city is in excellent shape."

The sound-and-light show, dubbed "People in Progress," was produced without charge by JAM Corp., according to Gladys Mack, an aide to the mayor. The mayor's wife Effi, who attended the speech with their son Christopher, is a vice president of that firm.

The show, a first-time adjunct to the speech, consisted of multiple still slides projected on giant twin screens while electric jazz-rock filled the cavernous hall. The flashing images, introduced by slogans such as "A Wonderful Place to Live," included landmarks and head shots of the City Council members, most of whom were in attendance.

Barry rose to speak after a brief display by a D.C. National Guard color guard and an introduction by Clarke, who took the opportunity to assert that it is the council that formulates policy and the mayor who executes it.

Barry, ignoring the apparent dig and thanking Clarke for his "warm introduction," harked back to his assumption of power in 1979, noting that his doubters back then have been proved wrong.

"They said we could not balance our budget, but for the past five years we have," he said. "They said we couldn't reduce the $284 million deficit we inherited from the federal government, but we have . . . . Some called Washington the crime capital of the nation and said we could never make this city safe. But we have. We reduced serious crime by 31 percent since 1981."

Washington, said its mayor, is "now a better and safer place than ever before."