Suppress section if date field is not null and if its not in date range

Posted on 2005-03-01
Medium Priority
Last Modified: 2012-08-14
I need to suppress a section so that I am left with records where the date field is null or if the date field is in the dates of a date range parameter.

Question by:carlosmonte
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 28

Accepted Solution

bdreed35 earned 500 total points
ID: 13435579
You can suppress the section following these steps:

Report menu, Section Expert.
Highlight the section you want to suppress and then click the X+2 button to the right of "Suppress (No Drill Down)".
In the editor, use the following logic:

not(isnull({table.date})) and not({table.date} in {?Date Range Parameter})

Save and Close and Test.

In the situation where you don't need these records at all, you would be better off eliminating the records from being returned to the report in the first place.
You can do this through the record selection.

Report menu, Selection Formulas, Record.
In the editor, add the following logic:

(isnull({table.date}) or {table.date} in {?Date Range Parameter})
LVL 101

Expert Comment

ID: 13436278
Agree with bd.  You are better off using a selection formula because it can be passed to the server for speed.


Author Comment

ID: 13440238
I cannot do it in the selection formula because the crystal I'm using is from a healthcare software that my company bought and they made special ODBC connection to the data in this softwares tables. (It gives me a Huge error when I try to use IsNull in the selection formula)

So to negate the OR operator I should use AND, right?

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

LVL 28

Expert Comment

ID: 13440285
not(isnull({table.date})) and not({table.date} in {?Date Range Parameter})

Author Comment

ID: 13440345
What I meant is that if I want to use "condition1 OR condition2" in the selection formula then I would have to use "not(condition1) AND not(condition2)" in the suppress formula of the section expert?
LVL 28

Expert Comment

ID: 13441493

Featured Post

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question