Print Page | Close Window

looking for a specific activity within a group

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=22741
Printed Date: 29 Apr 2024 at 1:20am


Topic: looking for a specific activity within a group
Posted By: mezcalbean
Subject: looking for a specific activity within a group
Date Posted: 11 Mar 2019 at 8:47pm
Hi trying to work out a few issue(s)

My report is wanting to look for an activity that is in a group of app dates for under one customer

this customer may have a group of 1 - 40 appointments but needs to contain a specific (range of 4-5) activity.

What is the best way to do this a sub report looking for this activity ?

thanks

Philippe



Replies:
Posted By: DBlank
Date Posted: 12 Mar 2019 at 2:29am
Not sure I am completely understanding your question but will try to assist.
If you group on the customer you can create a formula field that 'flags' the appointments you want to look
If appt= whatever then 1 else 0
then sum that formula field for the customer grouping.
Now any customer with a group sum>0 has your condition.


Posted By: mezcalbean
Date Posted: 12 Mar 2019 at 8:19pm
Thank you for the reply
Sorry for the confusion
The idea is a customer can come in 30-40 times and want to search that there is an activity associated to that customer. The customer may or may not have that activity which I want to highlight. I have a status that is looking at the appointments as a base so I’m searching on date range with that status but need to see if that group of appointments contain that activity. The hard part is that the customer may have 2+ groups of appointments which may or may not have activity.
I have created a sub report to search on that activity which works well but as above brings in multiple activities that may or may not be right … is there a way to limit the date range from the parameter to the sub report say <2 and >2 months so it can exclude / include the activity ?
Thanks
Philippe


Posted By: DBlank
Date Posted: 13 Mar 2019 at 7:52am
usually if you can do this in a sub report you can also do it int he main report.
What is the exact condition you are looking for?
Create a formula field to 'flag' each row for that condition...
if condition(s) then 1 else 0
now a a sum of that formula field at the group level of what group you want to understand as including or excluding (like a client).
Now any group with a group SUM>0 is what you wanted to look for.
Yu can include the dates in your formula condition...
if date = today and table.type='abc' then 1 else 0


Posted By: mezcalbean
Date Posted: 13 Mar 2019 at 9:29pm
Thank you i have skipped the sub report, and used what you suggested which works well

I was over thinking everything !!

Regards

Philippe



Print Page | Close Window