cancel
Showing results for 
Search instead for 
Did you mean: 

Supress Records in a Crystal Reports Chart

Former Member
0 Kudos

This is a newbie question. I have created a crystal report and bar chart for trouble tickets entered against circuits. I have grouped the results based on the circuit name. I have also added a summary count for each circuit to show the circuit name and the total tickets entered.

My boss wants me to only show records where the count is greater than 2, so I used the select expert to show this:

Count ({Trouble_Ticket.CKT ID:}, {Trouble_Ticket.CKT ID:}) > 1 and

Count ({Trouble_Ticket.CKT ID:}, {Trouble_Ticket.Create Date}, "monthly") > 1

I ran the report and it works fine. However, the chart that is part of the report still shows records with a count of 1 or less. I want to suppress any records in the chart where the count of tickets against a circuit is less than or equal to one. For some reason, only the report seems to reflect the change in count. Any ideas?

Ben

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ben,

Please create a command object which is based on same SQL query being generated by the existing report and in the where clause you can put the below condition for count.

By using this option only the desired values would be fetched from the database and this field can thus be used in the chart .

Please revert in case of any queries.

Thanks!

vitaly_izmaylov
Employee
Employee
0 Kudos

Hi Ben,

I do not think you can use Group summary like Count ({Trouble_Ticket.CKT ID:}, {Trouble_Ticket.CKT ID:}) in records selection formulas (Select Expert). Crystal Reports should give you an error like: "This function cannot be used because it must be evaluated later."

Records selection always goes before Grouping.

I would understand it if you are using the formula

Count ({Trouble_Ticket.CKT ID:}, {Trouble_Ticket.CKT ID:}) > 1 and

Count ({Trouble_Ticket.CKT ID:}, {Trouble_Ticket.Create Date}, "monthly") > 1

for suppression in (Section Expert), then it would make sense why you are still getting records "where the count of tickets against a circuit is less than or equal to one" in the chart.

Is that true?

If yes, then I would recommend:

1. to concatenate a list of circuits with more than 1 ticket as a single string

2. pass this list as a parameter to supreport selection formula (subreport should be in report footer)

3. create your chart within the subreport

Please read the following thread for more details:

[https://forums.sdn.sap.com/click.jspa?searchID=16880715&messageID=6196262]

and

Charting on WhilePrintingRecords formula

Regards,

Vitaly