Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Select Expert help please Post Reply Post New Topic
<< Prev Page  of 4 Next >>
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Dec 2008 at 8:07am

If you are still having problems I may have another approach. I tested and you can use running totals to conditionally suppress.  Ithink the below woud do what you need.

Create a running total summarizing your client name as a distinct count. set the Evaluate to use a formula. Make your formula the same conditions we used for your formula field "avg1 > 140 or avg2 > 90". In the Reset have it reset on change of group 2. Place this running total in the group footer 2 (running totals don't work in headers). You should get a distinct count of the clients that you are suppressing. Create a Summary of a distinct count of clients at group 2. now you have a total of clients and a total of suppresed clients that you can compare to conditinally suppress group1 (running total=summary total : the 2 fields you just created).
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 31 Dec 2008 at 8:39am
Hmm, can't seem to fully understand you're idea.
when i rest on group 2. all i get is another 0 or 1 count. which the count doesn't seem to be accurate either.
 
As for my concept. i still can't figure out why the very first department is getting suppressed either.
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 31 Dec 2008 at 9:21am
Alright, so i tried something else, still seems to ALMOST works, but not quite...
 
i created an additional 2 formulas;
 
avg1>140:
shared numbervar avg1;
shared numbervar avg1value;
 
if avg1 > 140 then
      avg1value := 0 else
      avg1value := 1
 
avg2>90:
shared numbervar avg2;
shared numbervar avg2value;
 
if avg2 > 90 then
      avg2value := 0 else
      avg1value := 1
 
i made it this way because i don't want to see the suppressed.
if all are suppressed in that department i want to keep it at 0 so i could suppress >0.
 
after these two formulas were made i went backing into the running total editor:
 
summarizeing client_name
distrinct count
 
evaluate:
use formula:
shared numbervar avg1value;
shared numbervar avg2value;

avg1value = 0 or avg2value = 0

reset on change of group1 (department)
 
my only issue with this is it's still showing a count of 1 even when all has been suppressed. and if there's only 1 client name under the department then it's still coming up as 1 aswell.
 


Edited by Takesen - 31 Dec 2008 at 9:21am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Dec 2008 at 9:44am
Sorry, I need some more coffee Dead. In my testing of this I only had 1 group and my suggestion was not accurate. Maybe with some tweaking it may work. Did you try using the Summary average function I suggested before. Without seeing your data it is hard to tell but when I tried to replicate your average formula for avg1 against the average summary function on some data here I was getting the same results. If you could replace your avg1 and avg2 formula fields with the summary function you could just use them in your select statement to omit all of your records that you currently have to suppress. That would make your suppression at group 1 a lot easier to handle.
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 31 Dec 2008 at 9:53am

Haha, it's all good man =)

i think we went threw the summary part before... but i'll look back into it. i could have over looked something. i believe i was having trouble working with the summary before and the varables made it simpler to munipulate with other functions.

IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 31 Dec 2008 at 10:07am
Alright. i feel plan stupid now Confused
haha. Yea. I was able to use the average summary. and then entered into select expert and it seems to work fine now...
i'm gonna keep looking threw the report to make sure there's no errors but yea. it's looking fine now. and since it went threw the select expert those departments that have no clients that meet those critiria they're eliminated aswell.
 
I'll letcha know how it turns out. Thank you
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 31 Dec 2008 at 10:30am
alright it looks fine.
=D
 
my only concern about this report now is. i used the select expert before to "choose these codes, and exclude these ones"
and since they're from the same field i'm not sure if it's working right or rather if i wrote it correctly.
 
{client_code_id} in ["362.11", "401.9", "402.00", "402.01", "402.1", "402.10", "402.11", "402.9", "402.90", "402.91", "403.00", "403.01", "403.11", "403.91", "404.00", "405.01", "405.09", "405.11", "405.19", "405.91", "405.99", "425.1", "437.2", "997.91"] and
{client_code_id} <> ["250" to "250.93", "362.00" to "362.02", "357.2", "366.41"]
 
i'm not sure if the 2nd half of my statement is really written correctly...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Dec 2008 at 10:36am

Isn't the second half unnecessary? they are referencing the same field in the same table correct.

 the first part {client_code_id} in ["362.11", "401.9", "402.00", "402.01", "402.1", "402.10", "402.11", "402.9", "402.90", "402.91", "403.00", "403.01", "403.11", "403.91", "404.00", "405.01", "405.09", "405.11", "405.19", "405.91", "405.99", "425.1", "437.2", "997.91"] would already omit any of the items in teh second half.


Edited by DBlank - 31 Dec 2008 at 10:37am
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 31 Dec 2008 at 10:45am

Normally i would think so, but since they can have more than 1 it would not.

sorry i edited the actual field name (since a lot of what i'm working with is confidencial) but it's more along the line of things they have.

 

client_diag_code_id would be a better relable i guess. kinda like... say a computer....

it's motherboards's bad (402.00)

graphic's card went bad (402.1)

harddrive failed (402.11)

they could have multiple of these at 1 given time. and i want to exclude certain ones.

 
so say the one's i wanna exclude are viruses that were diagnosed.
 
so if the graphic's card's bad and he has a virus.
i still don't wanna see that on my report.
 
does that make sense?


Edited by Takesen - 31 Dec 2008 at 11:05am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Dec 2008 at 11:10am
are both parts referencing the same field in the same table or is part 2 referencing another field?
IP IP Logged
<< Prev Page  of 4 Next >>
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.018 seconds.