How to suppress a section in Crystal Reports based on a field?

I have a sub report that needs to provide a description if the person has a certification.  
For example, John Doe CPA.  If the designation field John has a CPA, then I need the sub report to print a description of the CPA - however, the description is just in a textbox NOT in the database.
Bascially, I have a subreport with 10 descriptions and the some descriptions need to be suppressed (not visible) for that Rep if the Rep doesn't have that designation

Does this make sense?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zephyr_hex (Megan)DeveloperCommented:
you could do this with a formula instead of suppression.

in the subreport, create a formula called Description

in that formula use code something like:
SELECT [table.field]
Case "CPA" : "This is the CPA description"
Case "Something Else" : "This is another description"
Case "Astronaut" : "This is the astronaut description"
Default: ""

to prevent blank lines when the employee job has no matching description:
in the section in the subreport that has the formula... change the section's setting to suppress a blank section.
also configure your subreport to suppress a blank subreport.
and configure the section in the main report in which your subreport resides to suppress a blank section.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
musalmanERP ConsultantCommented:
If you are using SQL ,then You can create Description Field in SQL As well. There is no Sub Report required only for a Description...

         WHEN Designation= BBA' THEN 'BBA Desc'

Just add Case Syntax in your SQL As a new Field... and map this field directly to your Report...
I agree with the others.  This can probably be done without a subreport, and that would probably be more efficient.  There is a certain amount of overhead involved in generating a report within a report, as opposed to simply evaluating a formula that produces some text.  But to answer your question ...

 How are the certifications stored?  Can one person have more than one certification?  If so, how are they stored?  Are all of the certifications stored in one field (eg. in a comma-separated list) or is there a separate field for each certification?

 You can create a parameter in the subreport, link your certification field to that parameter, and suppress sections or fields in the supreport based on that parameter, but the specifics will depend on the answers to the questions above.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.