Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: One record per day Post Reply Post New Topic
Author Message
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Topic: One record per day
     Posted: 09 May 2014 at 4:54am
I am currently trying to create a report, which connects to a Database using ODBC. This database is a monitoring application which spits out performance information every 5 minutes.

What I am aiming to achieve, through Crystal, is one record a day and for that record to be a average and a [second] maximum figure.

I am using Crystal Reports 2008 but can't seem to find a way of limiting the output to 1 record per day, for each system.

Any help appreciated.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 May 2014 at 5:18am
If I understand you correctly,
unless you want to use a stored procedure or a command as your source where you do the calculations in that you can't just get one row of data but rather you need all rows of data to do the calculations.
You can change the report to only display "one row per day" but you need to include all rows in the data set.
to display only one row per day, pull all the records into the report.
group on the date field and set the grouping to use 'per day'.
insert a summary on the field you want to summarize as an average and select the group footer as the location.
repeat but select maximum as the summary type.
move the summary values from the Gfooter to the Gheader.
suppress the detail section and group footer section.
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 09 May 2014 at 5:41am
thank you for your reply. Apologies, I am very new to Crystal Report, how do I group on the date field and set it to use 'per day'? I am currently using the Report Wizard, until I am of a level to stop, and there is a group option but it only allows you to select ascending or descending?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 May 2014 at 6:21am

I just walked through the wizard and did not see the option appear.

Go ahead ans use the wizard as you normally would to get the reprot started.
once you create the report, open up the design tab.
select the group expert button (two white rectangles with top and bottom blue brackets).
The group expert box should open
in the group by window you should see your date field (which you set as a grouped on field in the wizard)
click on it once to select it
click on the Options button
a Change Group Options box opens
the bottom pick list allows you to set the interval. Select 'for each day'
 
 
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 09 May 2014 at 6:36am
Hi again - that still seems to give me loads of entries for the same day. I was however just having a play and I tried creating a Cross-Tab report (using the wizard) with the following:

Columns: Computer Name & Disk ID
Rows: Date & Time (for each day.)
Summary Fields: Disk used % (Avg) & Disk used % (Max)

This gives me the output I want, with the dates down the left hand side, computer name/Disk ID on the top and the relevant figures in a table.

The problem this way has, though, is it doesn't stipulate which figure is which... So I'd be hoping for a label to say which is Avg and which is Max. More annoyingly there is a lot of 'Total' columns and rows which I just can't get rid of...

Any ideas??
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 May 2014 at 7:29am
you will get all of the entries fro every day.
you need them to get to the average and max.
a crosstab is one way.
 
The other group ing option will give you more flexibility with the columns and headers.
To follow up on how to do this,
once you have your group set to the day (prior post)
select the section expert (Hand over a piece of paper icon)
select the Detail section
mark the Suppress no drill down option as TRUE (box checked)
select the group footer section and do the same thing
 
click on the insert summary button (Sigma sign)
slect the field you want to summarize (disk used %)
selcet the summary as Average
Summary location as Group #1
OK
repeat but change the summary type to Maximum
 
This will have dropped two fields onto your report intot he Group footer section. SInce that is suppressed (via the section expert) you have to be in the Design view to see them.
Move them to the group header next tothe date field (drag and drop)
now view your report
You can add text fields to the page header for your colum header if you want.


Edited by DBlank - 09 May 2014 at 7:30am
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 12 May 2014 at 6:50am
Hello - I have tried all of these steps but I am still getting numerous entries per day (rather than just 1 per day); I have double checked everything and it is definitely all marked as per your instructions.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 May 2014 at 6:52am
are you suppressing the detail and group footer section?
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 12 May 2014 at 6:58am
I didn't, no. I some how read your instructions about ten times and completely missed that! trying it now!
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 12 May 2014 at 7:07am
Perfect - I think that is it! I shall continue having a play with the formatting and everything but that looks brilliant... thank you.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum