Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppress not between values Post Reply Post New Topic
Author Message
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet Topic: Suppress not between values
    Posted: 13 Jun 2013 at 5:42am
Hi,

I have a report which calculates a percentage based on a jobs planned time by actual time (0.80.0.81 = 0.99%) the percentage sign is irrelevant as that's added in after the calculation.

What I would then like to do is suppress values between -9.9 & 9.9, however select expert doesn't like it and still shows all of the data.

Is there away to exclude these lines?

Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jun 2013 at 5:54am
how are you calculating?
IP IP Logged
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet Posted: 13 Jun 2013 at 5:56am
Sorry - the formula should be 0.80/0.81 = 0.99
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jun 2013 at 6:05am
is your calculation on one row, crossing rows, using a min or max or running total, etc?
IP IP Logged
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet Posted: 13 Jun 2013 at 10:08pm
Here's the actual formula:

If {wip.wruntim} > Average ({@actual_per_min}, {used.uopnum}) Then (
    //Planned > Actual, so divide by actual to get correct percentage difference
    If Average ({@actual_per_min}, {used.uopnum}) = 0 Then
        0 //Prevent div by 0 error
    Else
        //Average Difference Percentage = (AverageActual-Planned)*100 / Planned
    ((Average ({@actual_per_min}, {used.uopnum}) - {wip.wruntim}) * 100) /Average ({@actual_per_min}, {used.uopnum})
)
Else (
    //Planned < Actual, so divide by planned to get correct percentage difference
    If {wip.wruntim} = 0 Then
        0 //Prevent div by 0 error
    Else
        //Average Difference Percentage = (AverageActual-Planned)*100 / Planned
    ((Average ({@actual_per_min}, {used.uopnum}) - {wip.wruntim}) * 100) /{wip.wruntim}

It's just working out the average total on that one line

Thanks
IP IP Logged
adders
Groupie
Groupie


Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Quote adders Replybullet Posted: 13 Jun 2013 at 11:36pm
All sorted used the following formula within the selection expert:

If {@difference_tot}in -9.9 to 9.9 then
    True
Else
false
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.016 seconds.