Application crashes when exporting PDF report