This one is important enough to do a quick blog post on it. Microsoft has just released a new whitepaper on the AX 2012 report programming model. An official manual on reporting is still in the works at Microsoft, but this will give everyone who wants to create SQL reports in AX 2012 a head start.
It talks about using temp tables, best practices and bad practices, and goes through a bunch of examples and the associated code for them.
You can find the download here. As usual, this has been added to my list of AX 2012 Developer Resources.