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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can and use multiple formulas when trying to suppress data in section?

Status
Not open for further replies.

JCook23

Technical User
May 19, 2004
39
US
I currently have this formula in the section expert for the details section. It is to suppress:

If{?Order Date} = {sochng.fdate} then False else True

This shows only rows where the fdate field falls within the date parameter range.

After this, I then need to suppress all rows where sochng.fdate is 18 months or greater than somast.orderdate.

Is this possible? How would the formula read?

Thanks for any help!
 
Try changing your suppression formula to:

{?Order Date} <> {sochng.fdate} or
dateadd("m", 18, {somast.orderdate}) < {sochng.fdate}

-LB
 
Why are you suppressing your records instead of excluding them from your report entirely with a record selection formula?

Be advised that suppressed records will still evaluate in any totals you have.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
I am suppressing because I need all of the data in the report, just not all of it showing. The formula below may explain:

whileprintingrecords;
numbervar test;

// group = {somast.fsono}
// detail = {sochng.fnprice}

IF onfirstrecord OR {somast.fsono}<>previous({somast.fsono}) THEN
{sochng.fnprice}
ELSE IF {somast.fsono}=previous({somast.fsono}) AND {sochng.fnprice}=previous({sochng.fnprice}) THEN
0
ELSE
{sochng.fnprice} - previous({sochng.fnprice})
 
Along those lines:

I’ve come across something that doesn’t seem to work for me….I’m trying to suppress some output using the following code:


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if ({PATIENT_LABS.DATE_OF_LAB} in dateadd("h",-24,currentdatetime) to currentdatetime) then
false
else
true
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

in the detail section of the sub-report under Suppress visibility. What I’m trying to do is suppress the output if no labs are within the last 24 hours. This seems to work fine!!! But, in the Report Footer A, I’m trying to do the opposite, i.e. un-suppress some output if there is no no data within 24 hours:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if ({PATIENT_LABS.DATE_OF_LAB} in dateadd("h",-24,currentdatetime) _to_ currentdatetime) then
false
else
true
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

and print a big warning message……. But, it doesn’t work…Anyone have any ideas.?


Running CR 8.5 on ORACLE 8.1.7.

Thanks,
alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top