Selection
Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22256
Printed Date: 02 May 2024 at 7:25am
Topic: Selection
Posted By: idavis
Subject: Selection
Date 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.
|
Replies:
Posted By: DBlank
Date 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"
|
Posted By: idavis
Date 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.
|
|