Print Page | Close Window

Chart Data

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22211
Printed Date: 30 Apr 2024 at 12:28pm


Topic: Chart Data
Posted By: Martin Halford
Subject: Chart Data
Date Posted: 26 Jan 2017 at 12:47am
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 …

-------------
Martin Halford



Replies:
Posted By: Martin Halford
Date Posted: 31 Jan 2017 at 5:43am
This has now been resolved using a cross-tab but with no x-axis defined, and using the quarterly grouping option. Also needed to ensure that the detail section contents were suppressed to avoid a gazillion empty rows being reported.

-------------
Martin Halford



Print Page | Close Window