|
Users need a report showing several charts. Bar charts are probably most suitable. Data is held in Oracle tables where the primary key would be a timestamp (actually timestamp with time-zone). Charts would ideally show the number of rows in 3-month ‘buckets’ stretching back from today’s date. I’ve noticed the ‘Count’ summary function that would seem to allow grouping parameters such as ‘semiannually’, ‘monthly’, and so on, which seem to offer some promise but can’t understand how to use them.
Some data that needs to be reported is held in the tables purely by the number of rows. In other cases there are other conditions that select the number of rows (for example only batches in a batch table that have a status of ‘Active’). Some of this data can be quite large; often several million rows. But the report does not need to show any of this data; only its row counts.
Any help and advice greatly appreciated, or if there exists a sample os similar reports that I can learn from then that would be terrific.
As background, these queries I use outside of CR to count the rows for the first bar-chart:
select count(*) from cetrace where letimestamp between sysdate - interval '3' month and sysdate;
select count(*) from cetrace where letimestamp between sysdate - interval '6' month and sysdate - interval '3' month;
select count(*) from cetrace where letimestamp between sysdate - interval '9' month and sysdate - interval '6' month;
select count(*) from cetrace where letimestamp between sysdate - interval '12' month and sysdate - interval '9' month;
and so on …
|