Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Be open to new ideas
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

01
March

How Do I Conditionally Suppress the Results of a Formula in Crystal Reports?

I was recently asked "How do I create a formula that calculates the difference, in days, between the order date and delivery date, where any value less than 1 would be hidden, in Crystal Reports?"

There are two solutions to this question.

Solution 1:

  1. Create a formula that displays nothing if the delivery days is less than :

      If DateDiff("d", {Orders.Order Date},{Orders.Delivery Date}) < 1 Then "" Else
      Totext(DateDiff("d", {Orders.Order Date},{Orders.Delivery Date}),0)

  2. Add the field to the details section of the report
Solution 2:

  1. Create a formula to calculate the number of days between the two date time fields:

        DateDiff("d", {Orders.Order Date},{Orders.Delivery Date})

  2. Add the field to the details section of the report

  3. Right click on the formula field

  4. Select Format Field, from the menu

  5. On the Common Tab, locate the Suppress formatting option

  6. Press the Conditional Formatting button

  7. Enter the following suppression formula:
    Currentfieldvalue < 1


If you have any questions, or need any assistance, please do not hesitate to Contact Us
1

Nader

27
July
DateTimeVar d1 := {EmployeeVacations.StartDate}; DateTimeVar d2 := {EmployeeVacations.EndDate}; DateDiff ("d", d1, d2) - DateDiff ("ww", d1, d2, crFriday) + 1 When I suppress formula name "GetDay" by another field all this formula hiding?
2

Julia

01
September
Hi Nader, What criteria are you using to suppress the formula field?

MAKE A COMMENT

Name *

Email Address *

Comment *

To prove you are human what is:

87 + 54 =