SolarBear
SolarBear

Reputation: 4619

Error in Crystal Reports formula shows a big, red X

I have the following formula for a field in my Crystal Reports report shown in a CrystalReportViewerobject :

ToText({myReport;1.NbEntries}, 0) + " entries"

Using this formula, the report generates correctly and everything's fine. However, I was asked to make that field optional. So I added a boolean parameter named bEntries and changed my formula this way :

If {?bEntries} Then
    ToText({myReport;1.NbEntries}, 0) + " entries"
Else
    ""

The formula editor does not show an error, however when I generate my report and `bEntries< is false, the control shows nothing but a large, red X inside. Reverting the formula back to its original value generates the report properly.

Is my formula wrong? What is causing the report to fail generating?

Upvotes: 1

Views: 739

Answers (1)

Nick
Nick

Reputation: 3337

Replace the "" with "(space)".

Upvotes: 2

Related Questions