encode data passed to report generation (closes #1)