Phpjasperxml And Ajax Problem

When I call a controller action that executes a PHPJasperXML document generation function through an ajax function, it does not work. If I call the action through a direct CHtml::button action, it does. What usually gets corrupted on these ajax calls?

Thanks