A lot depends on how elastic your own definiton of "cheating" is*.
If making an unselected Sim selectable for a minuite or two and then changing his/her clothing or having him her use a dresser to change clothes or something along those lines (either at the comminity lot or by way of being invited to your own Sims' house first) falls under "cheating," then probably no, in the sense of being sure of their attire beforehand.
However, if you don't consider it a cheat, there are some hacked objects which you can place on a lot or in a room (and in which the hack can be activated or deactivated at your discretion) which will force most Sims (some employees and NPCs may be excepted) into formal wear without first making an unselectable Sim selectable.
See here (scroll down a bit on both pages linked):
http://www.simlogical.com/sl/Sims2Pages/Sims2_Doors_ClothesChange.htmhttp://www.simlogical.com/sl/Sims2Pages/Sims2_Dressing.htm*EDIT for clarification: That is, if most hacks and mods fall under that label for you, as basically what they do is activate or allow to be activated cheats without having to type in the cheat code.