Hi
If your {table.month} consist of all months then you don't have to write any IF else statements.
In cross tab.. Place your {table.month} in columns and place Code / Name on rows and {table.amount} in summarized fileds.
This will take care of your desired output.
To print 'X' in place of '0', right click on summariezed fields and go in Format Field--Common Tab--Display String --Formula Editor and give the following formula :
IF currentfieldvalue = 0 then Totext(currentfieldvalue) else 'X'