Summary of one field based on another field.

I moved from quickreport to fastreport and have a setup which could be done in quickreport with the Onprint event of the label.

I have a table with 2 fields one boolean one numeric. In the summary I want to show 2 summaries. One summary of the numeric field with the boolean field true and one summary with the boolean field false. I tried this by adding 2 variables for the summary and a before print event . That did not work so I do something wrong. Is there a simple way to get this functionality?

Comments

  • use

    [SUM(IIF(<YourDatasetName."YourBooleanFieldName">, <YourDatasetName."YourNumericFieldName">, 0), YourDatabandName)]

    [SUM(IIF(<YourDatasetName."YourBooleanFieldName">, 0, <YourDatasetName."YourNumericFieldName">), YourDatabandName)]

Leave a Comment