Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Getting an average result with comment included Post Reply Post New Topic
Author Message
srodopol
Newbie
Newbie
Avatar

Joined: 23 Nov 2009
Online Status: Offline
Posts: 5
Quote srodopol Replybullet Topic: Getting an average result with comment included
     Posted: 14 Aug 2013 at 7:07am

Hello Crystal guru's!

I am stuck on a report that I want to list temperature readings, date, and any comments regarding entries made in db that annotate why the temp was out of range.  I believe my links are correct to the 3 db tables needed.  No problem with the date and temps to appear - and I do want an average to show for the day - so I used a Summary to get that.
 
I am stuck with how to show a different entry for the annotation entries that may have been made for any given day.  I do see the same entry for all dates throughout a report, but I really want the true actual different entry that occured.
 For example, I want all 31 days of a given month to appear and for each month to be on a different page.  So, one row may have
8/14/13  2.36 (temp)  N entry cause there was no problem (null)
8/15/13   6.35  entry if an alarm went off such as "Door left open".
 
If anyone could help point me in the right direction, I sure would appreciate the help!
 
Thanks,
Rookie
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Aug 2013 at 7:28am
consider using shared variable formulas to concatenate the comments for the day into one string which can be displayed in the group (day) footer.
You can show or suppress the field based on the result of the average for the day.
You can also include or exclude comments per row based on the temp of that row being inside or outside of a set temperature.


Edited by DBlank - 25 Nov 2013 at 5:01am
IP IP Logged
srodopol
Newbie
Newbie
Avatar

Joined: 23 Nov 2009
Online Status: Offline
Posts: 5
Quote srodopol Replybullet Posted: 14 Aug 2013 at 9:10am
Thanks DBlank!  I will give that a try and let you know how it turns out!  I haven't used Crystal in a while - pretty rusty - but I think I at least follow what you're saying!  What is the trick for keeping all dates for a month on a page and separating each page for each new month?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Aug 2013 at 9:18am
one way
group on the date field twice
first by month
second by day
do a page break on group 1


Edited by DBlank - 14 Aug 2013 at 9:18am
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