Crystal Graph - hide if blank

Hello

If a graph in a section has no data to fill it and the graph is blank  - how do I hide that section?

Regards
Phil
philsivyerAsked:
Who is Participating?
 
mlmccConnect With a Mentor Commented:
Is there a field that you can test to see if there is no data?
If so use it to suppress the graph.

It might be better to put the graph in its own section and suppress the section.

You can add "new" sections by
Right click the left margin of the section you want another
Click INSERT SECTION below

If you do that on the details section you will now have
Details
   Detail A
   Detail B

You can conditionally suppress a section by
Right click the left margin of the section you want to suppress
Click SECTION EXPERT
Click the formula button to the right of SUPPRESS
Enter a formula that returns TRUE when you want the section suppress
IsNull({YourDataField})

mlmcc
0
 
philsivyerAuthor Commented:
Thanks for this - I should have been more informative.  The graph is in a report header.
Phil
0
 
mlmccCommented:
You can suppress the report header or create additional headers.

How do you know there is no data?

mlmcc
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
frodomanCommented:
You can probably create a SQL expression that will determine if you have any data for the chart, then conditionally suppress the section based on that expression.

frodoman
0
 
philsivyerAuthor Commented:
The SQL expression  - any examples.

Phil
0
 
frodomanConnect With a Mentor Commented:
In field explorer create a new Sql expression.  You'll need to write a sql statement that let's you know if you have data that will appear in the chart.  Without knowing your data I can't be specific but a general example for an Oracle database would be:

select 'Y' from dual where (some condition is true)

Then you can put this field on your report above the chart, and conditionally suppress the chart based on the formula: ( {%YourSQLExpression} = 'Y' )

frodoman
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.