Hey, I'm finally writing something about Cognos 8. This would most likely apply to any earlier version of ReportNet as well:
I have a report that needs to display the value of the optional ?market? parameter if it's used. If it's not used, I need it to display "Southeast Region." The first instinct is to do something like
if(ParamDisplayValue('market') = '') then
('Southeast Region') else
(ParamDisplayValue('market'))
This doesn't work, though, because not selecting a parameter value does not result in that parameter equaling an empty string. All you get is a blank area on the report where 'Southeast Region' should be. I also tried using character_length('market'), but that had the same result.
The solution is to use the ParamCount() function. So my final code looked something like this:
if(ParamCount('market') = 0) then
('Southeast Region') else
(ParamDisplayValue('market'))
Problem solved!
Thursday, September 4, 2008
Tuesday, September 2, 2008
My Poetic Linked-In Recommendation
My friend Matt asked me for a LinkedIn recommendation the other day. Instead of writing the usual prosaic "Matt is an outstanding manager who puts up great sales numbers while keeping his bitches in line," I wrote him this semi-fictitious poem:
'Twas at Dunkin' Donuts where I first worked with Matt
He'd prep the dough, then I'd fry it in fat.
For 2 years we worked thus, all sweaty and rank,
'Til one day we quit and went to work at the bank.
He was the PB, and I was the J.
One day I got robbed, and Matt saved the day!
The robber had come to take all my cash
But Matt said, "No way! That's Com Fed Bank's stash!"
Ere the robber could brandish his weapon (a gun),
Matt shot the guy, his Taser on "stun."
So not only is Matt a great man of banking,
But his stature's beyond any measure or ranking.
He's smart and determined and works all weekend,
But no matter what, he's there as a friend.
'Twas at Dunkin' Donuts where I first worked with Matt
He'd prep the dough, then I'd fry it in fat.
For 2 years we worked thus, all sweaty and rank,
'Til one day we quit and went to work at the bank.
He was the PB, and I was the J.
One day I got robbed, and Matt saved the day!
The robber had come to take all my cash
But Matt said, "No way! That's Com Fed Bank's stash!"
Ere the robber could brandish his weapon (a gun),
Matt shot the guy, his Taser on "stun."
So not only is Matt a great man of banking,
But his stature's beyond any measure or ranking.
He's smart and determined and works all weekend,
But no matter what, he's there as a friend.
Subscribe to:
Posts (Atom)