Laughter is binary: It either happens or it doesn't. As each joke arrives in the course of a film, the cavernous space of the theater is either filled with joy and laughter or with the quiet of cringing embarrassment. Every time you step to the plate to make a joke, you're going to experience one or the other.
People who do not have funny in them are not funny when they read funny lines. Sorry. Just doesn't work that way. Seriously, this is the biggest rule of all. You live and die with your casting decisions. Your actors are the heart and soul of the whole thing. Without brilliant actors, you will not have a brilliant film.