Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Report with Formula using 'Maximum' Post Reply Post New Topic
Author Message
garylythgoe
Newbie
Newbie
Avatar

Joined: 01 Feb 2008
Online Status: Offline
Posts: 5
Quote garylythgoe Replybullet Topic: Report with Formula using 'Maximum'
     Posted: 04 Feb 2008 at 1:55am
Hi all! Top resource this! Star
 
Having a few problems at the moment with a report im trying to do.
 
Heres the lowdown. Its a piece of 'helpdesk' software which logs incidents, changes, and problems. Incidents, changes and problems can have many call notes (mini updates) attached to them.
 
An Incident (for example) is a 'process'. Along with the others. This report is about incidents only.
 
Im trying to bring back the incident details, with the last call note if there is one.
 
Here is the database expert 'links' screen:
 
 
Here is the design screen:
 
 
I put in a formula in 'group selection' to select the 'max' serial_number from the incident_notes table:
 
 
When i preview the report, i get the relevant results back, except the incidents without notes dont appear! Confused Cry
 
The annoying thing is, it recognises the incidents without notes! See below (incident 1706 is in the pane on the left but not in the report):
 
 
Ive set the joins correctly, i.e Left Outer's so it will pull back data properly.. This didnt cure anything Ouch
 
I dont know what else to try??? I understand the joins properly, and i think my formula is working? When i try the report without the formula, it works in that it brings back all the notes relating to one incident and brings back incidents without notes.. But some incidents have 20+ notes and its just messy hence only wanting the latest one.
 
Does anyone have any idea's? I would be massively grateful for anyhelp!
 
Regards,
 
Gary
 
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 04 Feb 2008 at 4:52am
The problem is, I think, with your Group Selection formula.  Specifically, if there is no note, then there is no serial number to be compared, and so the group is tossed out.

Another approach is to use a suppression formula on the section with the notes information.  If the serial number does not equal the maximum, suppress the notes section.  If you want a blank notes section to appear, you can also test for NULL, and don't suppress blank sections.

(And, as a side note, I just finished ITIL Foundations training last week, so "incidents" and "problems" are very familiar to me.  LOL )


IP IP Logged
garylythgoe
Newbie
Newbie
Avatar

Joined: 01 Feb 2008
Online Status: Offline
Posts: 5
Quote garylythgoe Replybullet Posted: 05 Feb 2008 at 6:58am
Hi Lugh,
 
Thanks for your response, i managed to get this fixed... There was a tick box for 'replace null values with default values' in the options which fixed it!
 
I come from an oracle reporting background so its a bit weird to me! lol!
 
As far as the supression formula goes, that sounds excellent and i think i'll give it a go!
 
ITIL is annoying but it definately has a place in some IT arena's imo!
 
All the best..
 
Gary
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