0
votes

Crystal Reports - If a field in the main report is null, I would like to display a subreport, else display the field that is in the main report.

1

1 Answers

0
votes

I will suppose your field is in the header section (but the idea works for other cases).

  1. Create another header section (right click header section and click insert section below).
  2. Put your subreport in this new section.
  3. In the "section expert", set a "suppress" formula for this new section:

    isnull({TableName.FieldName})
    
  4. Evaluate if it is worth to set the "suppress" formula of the field or the suppress formula of the other section (maybe is not need, since the field has no value):

    not isnull({TableName.FieldName})