I beliveve it depends on number of joins and number of fields you select. If you have tiny fields selected from a single main table, then your cached function might work faster and use less memory when used right in XML generation, but if your main query is complicated and have many columns, using this technique will produce more problems with support than a profit you will have.
I would recommend you to use an accumulation register for this report and fill it with enough data including codes and values of tax agency.