It depends on what is causing the film. Vinegar will get hard water deposits off, and it will clean your dishwasher, too. A dishwasher repairman told me to fill a glass with white vinegar (I buy it by the gallon at Walmart--it's pretty cheap) and put it right-side up in the middle of your lower rack. He said to run your dishwasher empty to clean the dishwasher, but we'd had crud building up on our dishes, so we ran it again with vinegar and those dishes (the ones with build up). I couldn't believe how much better they looked! I do that every few weeks just to keep it up. It cleans out some of the hard-water deposits in the dishwasher, meaning that it sprays better and cleans better.
But dishwashers etch glass over time. Hold your glasses up to sunlight. If there's sort of a rainbow when you're looking at the "film" then it's not really film. It's etching. And there's nothing you can do about it. Your choices are to live with it, buy new glasses every few years, or wash your glasses by hand. I live with it until I can buy new glasses.