Author Topic: 2 pages off 1 query with each page on its own filter  (Read 422 times)

Offline DragonLady

  • Full Member
  • ***
  • Join Date: Feb 2017
  • Posts: 15
  • Forum Citizenship: +0/-0
2 pages off 1 query with each page on its own filter
« on: 19 Apr 2017 09:34:04 am »
Client has question about how to solve as simple in CA as they did in Business Objects.

They want to keep 1 query but report based on slightly different filters.  I can create a variable but want each page to have a different filter off that variable.

We're limited on system changes (groups, roles, packages).

Without system changes I'm hesitant to think report bursting with work.  Will conditional formatting work?  Other options?

Page 1
    A   B   C
X
Y
Z

Page 2
    B 
X
Y

Offline New_Guy

  • Statesman
  • ******
  • Join Date: Mar 2016
  • Posts: 309
  • Forum Citizenship: +15/-0
Re: 2 pages off 1 query with each page on its own filter
« Reply #1 on: 19 May 2017 07:37:00 am »
Hi,
If you want to hide a column based on page you can create a render variable like 'PageName () <> 'Page2'' and assign it to the column you want to hide.

Good luck
New guy

Offline AnalyticsWithJay

  • Statesman
  • ******
  • Join Date: Jun 2016
  • Posts: 396
  • Forum Citizenship: +42/-1
    • Cognos With Jay
Re: 2 pages off 1 query with each page on its own filter
« Reply #2 on: 19 May 2017 08:43:18 am »
They want to keep 1 query but report based on slightly different filters.

I'm guessing this is for maintenance reasons?

1. Create your base query which contains your logic without any filters.
2. Create Query 1 and drag base query to the right of it to create a query reference. Add your filter.
3. Create Query 2 and drag base query to the right of it to create a query reference. Add your filter.

Page 1 will use Query 1, and Page 2 uses Query 2.

If you look at the SQL, base query is a subquery, and the parent query has the filter based on the subquery value.

 


       
Twittear