Here is a KB which, starting with the classical Invoice data model, shows the use of QueryViewer control using Pivot Tables and Charts.
Dashboard:
Customer stats:
Product stats: