Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Selection Post Reply Post New Topic
Author Message
idavis
Newbie
Newbie


Joined: 21 Jul 2014
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote idavis Replybullet Topic: Selection
    Posted: 03 Mar 2017 at 4:09am
I an trying to create a condition when a any single record in a "set" records returns the condition.

For example I am using:

If {Table.EVENT} startswith "+SLA" then stringvar event := "+SLA" else stringvar event := "Does not contain +SLA"

The issue I have is it returns the answer based on the most recent record in the group, so for the data below it returns "Does not contain +SLA".

I am looking for a query that says if any of the record contain "+SLA" then stringvar event := "+SLA" else stringvar event := "Does not contain +SLA"



Table.EventTD        Table.Event
03/03/2017 08:18:40   LOC changed               
03/03/2017 08:18:40   Task Signed to History           
03/03/2017 08:18:26   +SLA Resource issue
25/02/2017 02:56:01   Creation of helpdesk task          
25/02/2017 02:56:01   New Breakdown Issued     

Any suggestions or advice?

Kind regards,

Iain.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Mar 2017 at 6:48am
do you have an event ID or something that is defining these rows as a single 'group' which are trying to apply this rule to?
IF so group on that, create a formula that identifies the value you want for the group
If {Table.EVENT} startswith "+SLA" then 1 else 0
sum this formula for the group
use the group sum for your our put
if sum(formula,group)>0 then "+SLA" else "Does not contain +SLA"
IP IP Logged
idavis
Newbie
Newbie


Joined: 21 Jul 2014
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote idavis Replybullet Posted: 06 Mar 2017 at 9:20pm
DBlank,

Thank you for taking the time to reply. I really appreciate you helping out a stranger. I'll give this a go.

Kind regards,

Iain.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.