Bill Cosby was ordered Tuesday to stand trial on sexual assault charges after a hearing that hinged on a decade-old police report in which a woman said the comedian gave her three blue pills that put her in a stupor, unable to stop his advances.

District Judge Elizabeth McHugh ruled that prosecutors had sufficient evidence to bring Cosby to trial in the lone criminal case brought against him out of the barrage of allegations that he drugged and molested dozens of women. A trial date was not immediately set.

High profile Civil Rights Attorney Gloria Allred attended Bill Cosby’s hearing in Norristown on Tuesday. Allred said this case is one more example of Cosby’s pattern with women. NBC10’s Harry Hairston tells us more.

Cosby, 78, could get 10 years in prison if convicted.

"Mr. Cosby, good luck to you, sir," the judge said.

"Thank you," said the former TV star, who stood up briskly after the ruling and seemed chipper and unsurprised. He hugged one of his lawyers.

The judge set an arraignment for July 20, at which time he could enter a plea. But Cosby waived his right to appear at that proceeding. That sets the case on a trajectory for trial.

During his twenty years on the bench, Retired Judge Michael Donio, presided over many civil and criminal cases. Now the judge tells us what he thinks about the Bill Cosby trial, which is going to court.

The preliminary hearing was not the face-to-face confrontation between accuser and accused that some had anticipated: Andrea Constand, the former Temple University athletic department employee who said Cosby violated her at his suburban Philadelphia mansion in 2004, was not in the courtroom, and the judge ruled that she did not have to testify at this stage.

Comedian Bill Cosby did not address reporters as he left the Montgomery County Courthouse Tuesday afternoon after a judge ruled that he will face trial in the charges that he drugged and sexually assaulted Andrea Constand in his Cheltenham home in 2004. NBC10’s Pamela Osborne and Rosemary Connors are outside the courthouse with a breakdown of what’s next for Cosby.

Instead, prosecutors had portions of her 2005 statement to police read into the record.

While authorities in recent months have paraphrased her account and quoted fragments, this was apparently the first time that large sections of her statement — or Cosby's, for that matter — were made public.

Constand told police in 2005 that the comedian penetrated her with his fingers after giving her pills that made her legs "rubbery" and "like jelly." ''Everything was blurry and dizzy. I felt nauseous," she said.

"I told him, 'I can't even talk, Mr. Cosby.' I started to panic," she told police.

She said she awoke with her bra askew and did not remember undoing it.

In her statement, she said Cosby told her the pills were herbal medication. She said he also urged her to sip wine even though she said had not eaten and didn't want to drink.

Cosby's lawyers argued unsuccessfully that reading Constand's statement instead of putting her on the stand would be hearsay and would deprive him of his right to confront his accuser. But having a police officer read someone's statement is common practice at preliminary hearings in Pennsylvania, which have a much lower burden of proof than trials.

In his own 2005 statement to police, excerpts of which were also read in court, Cosby portrayed it as consensual sexual activity, saying Constand never said "no" as he put his hand down her pants. A seemingly relaxed Cosby said he and Constand had had other "petting" sessions before.

Cosby also told police the pills were over-the-counter Benadryl that he takes to help him sleep. He said he gave Constand one and a half pills and she did not ask what they were.

During the hearing, Cosby attorney Brian McMonagle questioned why Constand continued to see the comedian and even returned to the house to meet with him after the alleged assault.

Detective Katherine Hart testified that Constand told detectives in 2005 that she went back to Cosby's home to confront him about what had happened.

Constand also told detectives she contacted Cosby after moving to Canada because she wanted tickets to one of his comedy shows. McMonagle said Constand brought a present for Cosby.

Earlier Tuesday, the comedian walked into the courthouse on the arm of an aide, waving to people waiting outside. He looked healthier than he did when he was charged in December, and was not carrying a cane this time.

Prosecutors reopened the case last year after dozens of women leveled similar allegations and after Cosby's sealed deposition in Constand's lawsuit was made public.

He settled her lawsuit for an undisclosed sum in 2006 after testifying about his extramarital affairs, his use of quaaludes to seduce women and his efforts to hide payments to former lovers from his wife.

The testimony and the barrage of allegations have all but destroyed Cosby's nice-guy image from TV's "Cosby Show."

Cosby's lawyers are trying to get the case thrown out, arguing that a previous prosecutor a decade ago made a binding promise that the comic would never be charged. On Monday, Pennsylvania's Supreme Court rejected a request to delay the preliminary hearing while Cosby pursues a dismissal.

Cosby has not entered a plea since his Dec. 30 arrest. He is free on $1 million bail.

He is also fighting defamation lawsuits across the country for allegedly branding his accusers liars and is trying to get his homeowner insurance to pay his legal bills. Cosby has repeatedly denied all allegations of sexual misconduct.

Constand is now a massage therapist in Toronto.