If you are unable to create a new account, please email bspsoftware@techdata.com

Author Topic: Copying a crosstab with Conditonal styles onto another page. Getting an error  (Read 189 times)

Offline Alex1p

  • Associate
  • **
  • Join Date: Apr 2022
  • Posts: 4
  • Forum Citizenship: +0/-0
I have my page1 that has a crosstab that contains Conditonal Styles on two of the fields. This crosstab is assoicated to query 1. Now I need to make an exact copy of page1 and query 1 to make a page2 and query 2. I need to do this b/c query 2 has different filters than query 1. I go onto page2's crosstab and i set the query to query 2 so it pulls the data from query 2 instead of query 1. Now when I run it I get an error but I can't see what the error is b/c the company that runs our enviroment doesn't have the logging level set high enough for the error to show. I am assuming somehow the condital style is trying to use the query 1 fields and that is causing the issue. Any help is appreicated.

Offline MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 11,529
  • Forum Citizenship: +672/-10
  • Cognos Software Muppet
I have my page1 that has a crosstab that contains Conditonal Styles on two of the fields. This crosstab is assoicated to query 1. Now I need to make an exact copy of page1 and query 1 to make a page2 and query 2. I need to do this b/c query 2 has different filters than query 1. I go onto page2's crosstab and i set the query to query 2 so it pulls the data from query 2 instead of query 1. Now when I run it I get an error but I can't see what the error is b/c the company that runs our enviroment doesn't have the logging level set high enough for the error to show. I am assuming somehow the condital style is trying to use the query 1 fields and that is causing the issue. Any help is appreicated.

Hi,

Behind the scenes, your report has tied your conditional styles to the query they were created in. The error will be the report complaining that the conditional styles in the crosstab on Page 2 are broken - as they still refer to Query 1.

The simplest way is to copy the page and query before adding the conditional styles, then add them in to both pages afterwards. A risky alternative would be to copy the report spec to the clipboard, then manually edit the report spec to duplicate the conditional styles in Query 1 and reference the copies to Query 2, but this is fraught with danger if you get it wrong.

Cheers!

MF.
Meep!

Offline Alex1p

  • Associate
  • **
  • Join Date: Apr 2022
  • Posts: 4
  • Forum Citizenship: +0/-0
Hi @MFGF,

Thank you for responding! I was going to do the way you suggested that I would copy the pages and apply the styles afterwards. My only issue is that i have about 20 different conditional styles tied to page 1 that i would need to apply to each page and eventually i am going to have about 28 pages in this one report. I imagine if i were to manually do 20 conditional styles for all 28 pages im bound to make a mistake anywhere. I was trying to avoid mistakes plus having to do 560 styles will take some time to apply. Was hoping there would be a quicker way to get it done.