0

I have added conditional formatting to a Cognos report, and it seems to have slowed down

The report was running okay before I added the formatting, and I have not changed anything else on the report, other than the conditional formatting.

Does conditional formatting, as a general rule, cause Cognos to run slower?

1 Answers1

0

As a general concept, conditional formatting will not slow down a report.

That said, I can envision one scenario where the addition of conditional formatting could have an impact: You base your conditional formatting on a query item that wasn't previously included in the main data container (list, crosstab etc.).

Cognos' SQL generation is opportunistic. If your report only references one query, all other queries will be left out of the SQL statement sent to the data source. If you include a data item that comes from another query (assuming there is an established join between the two), Cognos will now include the second query in the SQL statement, constructing a join with the original query in accordance on how you define the relationship. Joining tables inevitably results in some slowdown.

If your original report took 10 seconds to generate and then added conditional formatting that forced a join, it's inevitable that the result will take longer. It could be an imperceptible amount of time or a considerable slowdown depending on the query joined and the nature of the join.

Barring the scenario I described, I would generate the tabular data for the query and see how long it takes back. When you generate the tablular data, conditional formatting is ignored. If tabular data is slow then you know it's not the conditional formatting causing the problem.

If you want to really track Cognos performance, check out the article on my blog regarding automatic report timing: Automated Cognos Report Performance Measurement

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Johnsonium
  • 2,005
  • 1
  • 13
  • 15
  • Thanks, the formatting isn't based on a query, just looking for a specific string. The report is now running fine, I think the problem was just caused because the database was refreshing – Daniel Baker May 25 '19 at 19:36