0
votes

I am new to Crystal Report. I have a data set like this:

DataSet:

Name    Type    Unit     Price
One      p1      3        10
Two      p2      2        8
Three    p1      1        5

In my crystal report I want to group the data by Type and then only list the group data that Type is equal to p1
How could I apply some logic to hide other groups?

1
Thanks Grant. I have to load all the data into the report to calculate some other fields. And in the group detail section, I need to apply this logic to only show the data where Type = p1CBY
On your group header, right click and add Suppress statement formula, {tablename.Type} <> 'P1', this will hide all groups except P1aMazing

1 Answers

1
votes

I'm not sure how far along you are, so in a nutshell...

  1. Add a group by right-clicking inside any one of the sections:

enter image description here

  1. Select the field you want to "group" by, in this case a field named "fieldName":

enter image description here

  1. Right-click the group section header bar and open the "Section Expert". Check the "Suppress" checkbox, press the formula button next to it, and enter a formula that tells it when to suppress the group, in this case when "fieldName <> "P1".

enter image description here

  1. Right click on the "Details" section and do the same thing (click the same checkbox and enter the same formula). If you have anything in the group footer, do the same there too.