Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress a group footer with a value calculated by a variable

Status
Not open for further replies.

torolimon

Technical User
Oct 30, 2008
20
0
0
US
I have a field in the Group Footer called Elapsed Time By Days. This field is calculated by a variable and is a number. I'm wanting to create a parameter that allows the user to select "0 ot 7 Days", "8 to 30 Days", and "31 to 90 Days" and then they would only see records with those values. For the "0 to 7 Days", I can suppress all values < 0 but when I try to add the suppress values > 8, it doesn't suppress anything. Any Ideas?

This is what I was trying:
if {?Readmission} = "0 to 7 Days" then {@Elapsed Time By Days Variable} < 0
else
if {?Readmission} = "0 to 7 Days" then {@Elapsed Time By Days Variable} > 8
 
Im fairly confused with your post but .... (it aint hard to confuse me! :) )
how are you computing the elapsed days? I assume it is either a DB Field or a formula that computes the difference between 2 dates?

and if you only want the user to see those dates, why not put it in the selection formula then you dont need to suppress anything.

_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
I assume you are placing this formula in the suppress formula in section expert of the Group Footer

Try

if {?Readmission} = "0 to 7 Days" and {@Elapsed Time By Days Variable} >= 0 and {@Elapsed Time By Days Variable} <= 7 then false
else
if {?Readmission} = "8 to 30 Days" then {@Elapsed Time By Days Variable} >= 8 and {@Elapsed Time By Days Variable} <= 31 then false
else
if {?Readmission} = "31 to 90 Days" then {@Elapsed Time By Days Variable} >= 31 and {@Elapsed Time By Days Variable} <= 90 then false
else
true

Ian
 
CoSpringsGuy,
{@Elapsed Time By Days Variable} = datediff("d",{@tot display 1st Discharge Time},{@tot1 display 2nd Admit Time})

It's calculated by doing a datediff on two times calculated using variables.

IanWaterman,
That did the trick. It is working perfectly. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top