Reputation: 4619
I have the following formula for a field in my Crystal Reports report shown in a CrystalReportViewer
object :
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