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

 

Can a if..then type command be made to work with drill downs? - SOLVED

Started by Kev, 11 Mar 2011 12:04:42 PM

Previous topic - Next topic

Kev

I'm kind of new to Cognos, so please forgive me if this is an easy issue.

I'm trying to build a report with multiple drill down options on a single column depending on a separate field in the same list. I can make the two drill down paths, but when I click to drill down, a new window appears and I have to choose the drill down I want to use.

Is there some way to make Cognos pick the drill down to use rather than making the user choose it? I was trying to make is so that if a separate column in the list was "A" to use one drill down and if it was "B" to use the other. Anyone know how this can be done?

Thanks in advance for any help anyone can provide.

NimrodA

Hi,
This is probably achievable via JavaScript, but I also found a way to do this without any. I'll give you some general guide lines because it's bedtime here, and if you need more guidance let me know and I will elaborate further.
The way I solved this was:
1. Unlock the list/crosstab (by clicking on the giant lock in the toolbar so it shows an open one).
2. Take the data item you wish to perform the drill through on (Oh yes, BTW, I assume you were talking about drill through, as alternative drill downs would require a setting of an alternative drill path in the cube itself), and mark just it (Now that the lock is open you can select the item in the column rather than the entire column body).
3. click ctrl and drag that query item to the left of itself, so it would be copied. What you have now is 2 identical query items in the same column.
4. Define different drill through for each of them (So that the right side would drill through to the report you would drill down to if the value in the other column is "A" and the left side would drill through to the report you would drill through to if the value in the other column in "Not A").
5. By now, you should have one column with two "Sub columns" of the same data, each side drilling to a different report.
6. Now, define two boolean variables (This can be achieved with one, but I figured it would be best to not even render the uneccessary side, and render variables only get a "yes" for an answer, as far as I know).
7. Make the condition for the first one [column-defining-drill-through]="A" and the condition for the other one the opposite ([column-defining-drill-through]<>"A")
8. Define a render variable for each side of the column. The side that drills to the report you want to drill to when "A" will be rendered when the first condition is "Yes", and the other side will be rendered when the second condition is "Yes".
9. Run to test. Don't forget to re-lock.

How it works? Pretty simple. Render variables define when something in the report will be created. You're besically telling cognos to display the query item containing drill through to a certain report if a certain condition is filled, and to display that same query item with a different drill definition if it isn't.
Let me know how this works for you, or hold on for one of the big JS guns here to fire.

Kev

Thank you for your solution. I finally had time to try it this morning and it worked like a charm.

Before I was trying something similar by making the render variable in the properties box and kept getting errors. Making the variable separately and assigning it to the render variable worked perfectly.

Thanks a million.