Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i have a ppr report which looks lik 1

Status
Not open for further replies.

cognos11

MIS
Nov 19, 2003
40
US
i have a ppr report which looks like this


Industry(Measure) No of Visits By Industry(Measure)

Education 1284
Healthcare 594
Transportation 300
Banking 700

Now when i drill down to a particular item eg. Education , i get the following info

Education 1284
Healthcare 0
Transaction 0
Banking 0


What i want is to hve an option to do either of the below.

1) if a click on Education, all i shuld get is, that particular row as in

Education 1244

2) if i click on Education, with whole report still showing, Education should be highlited or color coded.In other words, whenever i click a different industry, that particular industry should be higlighted with a color


Is this possible?

Regards
Jay
 
Why don't you put Industry in a Dimension ??
it will then behave exactly as you want.
 
oops! that was typing error.I did include Industry as Dimension.

It works now.

Any ideas on the second option ie higlighting the result with a color.
 
cognos11
Use a macro and launch it via a button.
Macro code would be something like this, using the good news style as a highlight.

Sub Main()
Dim PPRep As Object
Dim PPRow As Object
Dim PPColumn As Object

Set PPRep = GetObject(, "CognosPowerPlay.Report")
PPRep.ExplorerMode = False

Set PPRow = PPRep.Rows.Active
Set PPColumn = PPRep.Columns.Active
If (PPColumn is Nothing) then
PPRow.Style = "Good News"
ElseIf (PPRow is Nothing) then
PPColumn.Style = "Good News"
Else
MsgBox "Please select row or column"
End If
Set PPRow = Nothing
Set PPColumn = Nothing
Set PPRep = Nothing
End Sub

HTH
lex
 
D'oh
It'll need a slight adjustment to stop it failing if the user selects the upper left corner of the report

substitute:
If NOT (PPColumn is Nothing) then
PPColumn.Style = "Good News"
ElseIf NOT (PPRow is Nothing) then
PPRow.Style = "Good News"

slightly chastened
lex
 
Hi Lex,

Thx for your macro's but it is not so easy as I thought. If we take the macro about custom exceptions that you wrote for Cognos11 as example. My first question.
- I have an report named Segmentanalyse.ppr so I should think the macro has to be like this. Where do I have to fill my report preferences more.
Thanks!
MiRRo
Sub Main()
Dim PPRep As Object
Dim PPRow As Object
Dim PPColumn As Object

Set PPRep = GetObject (, "Segmentanalyse.ppr")
PPRep.ExplorerMode = False

Set PPRow = PPRep.Rows.Active
Set PPColumn = PPRep.Columns.Active
If (PPColumn is Nothing) then
PPRow.Style = "Good News"
ElseIf (PPRow is Nothing) then
PPColumn.Style = "Good News"
Else
MsgBox "Please select row or column"
End If
Set PPRow = Nothing
Set PPColumn = Nothing
Set PPRep = Nothing
End Sub
 
MiRRo,
The Line
Set PPRep = GetObject(, "CognosPowerPlay.Report")
picks up the active report and makes it an object for further commands; you don't want your report name there.

Rather than hijack this thread, best to continue it in your thread.

PS
The PPRep.Explorer = False
line is otiose - serves me right for adapting another macro!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top