i need a report and i should use pivot table for it.Report will be group by categories .It is not good to use case when statement because there are many categories.u can thi
I use reporting tools to produce reports, it helps to keep views and queries clean and without formatting. Usually users ask for Excel and Excel is a very good reporting tool by itself. Excel has a lot ways to import data, but I suggest XML as input because you can open it as a regular Excel table.
Excel remembers path to data XML file and you just have to replace data to refresh report. There are many other ways, I use JAVA application on web server to merge Excel template and SQL output. This code is free and open source but it won't help for non JAVA developers https://github.com/jbaliuka/x4j-analytic There are many other reporting tools to produce "professional" reports.