I have needed to figure out how to do this for a while to avoid having to create multiple pages with nearly the same code when I want send a report for printing or conversion to PDF. Turns out this is really simple. The easiest way I found was not to remove the master page, but to replace it with a blank master page in the Page_PreInit event.
protected void Page_PreInit(object sender, EventArgs e)
{
if (Request.QueryString["Report"] == "true")
{
Page.MasterPageFile = "~/BlankMasterPage.master";
}
}