Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: looking for a specific activity within a group Post Reply Post New Topic
Author Message
mezcalbean
Newbie
Newbie
Avatar

Joined: 04 Jan 2016
Location: Australia
Online Status: Offline
Posts: 5
Quote mezcalbean Replybullet Topic: looking for a specific activity within a group
    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
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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.
IP IP Logged
mezcalbean
Newbie
Newbie
Avatar

Joined: 04 Jan 2016
Location: Australia
Online Status: Offline
Posts: 5
Quote mezcalbean Replybullet 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
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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
IP IP Logged
mezcalbean
Newbie
Newbie
Avatar

Joined: 04 Jan 2016
Location: Australia
Online Status: Offline
Posts: 5
Quote mezcalbean Replybullet 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
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.