Hillsborough County Public Schools (HCPS) and Convergence Consulting Group (CCG) partner to present Advanced Javascripting in IBM Cognos. HCPS solicited the help of CCG to develop a merit based bonus system to support and develop strong leaders in the Hillsborough Principal Pipeline utilizing IBM Cognos software. Presentation from IBM Cognos Central Florida User Group Meeting help on April 24, 2014 at Rusty Pelican in Tampa, FL.
5. www.OurStudentsOurFuture.org
Business Requirements
• Need a solution to filter many different attributes
and interact within list
• Select rows within the candidates list and be able
to do side-by-side comparisons
• View detailed resume style report for selected
candidates after analysis
• Consume different reports in specified formats
only (pdf, excel, html)
6. www.OurStudentsOurFuture.org
Overall Solution Design
• Set of three reports
• Main report needed extended functionality
• Turn off Cognos Toolbar
• Hide Multiselect prompt choice lists until
clicked
• Reset report button
• Add checkboxes to list object
• Pass checked row values to drill-through
reports
8. www.OurStudentsOurFuture.org
Using JavaScript in Cognos
Some examples of common uses:
• Hide Cognos toolbars
• Validate input boxes
• Manipulate default prompt selections
• Automatically reprompt
• Mimic built in Cognos capabilities (button for pdf, excel,
drill up , drill down)
• Passing data values
• Changing default behavior of Cognos elements
9. www.OurStudentsOurFuture.org
Considerations for using JavaScript
• Extra testing will be needed when migrating reports
to another environment
• Extra regression testing will be needed should there
be an upgrade, patch
• Know what browsers you support and Cognos is
compatible with based on version. Make sure you
test compatibility between browsers
10. www.OurStudentsOurFuture.org
• Typing in parameter names and arguments
• Standard debug tools/techniques
• Parameter/list names don’t propagate
• Code may behave differently in Cognos viewer
versus Report Studio
Considerations for using JavaScript
11. www.OurStudentsOurFuture.org
Tips / Best Practices
• Using tags
• Layout component references for html items that
are used across multiple reports
• Place .js file on gateway servers and call script
• Utilize Prompt API
- Users don’t need to see the standard toolbar
Standard multi select prompts take up a lot of room, report has numerous prompts
Need to reset all the prompts gracefully
Need a way for user to choose candidates
Pass values ot other reports
Enhance the standard capabilities of Cognos using JavaScript.
Cognos is a web based application, you can embed JavaScript in HTML tags
Report runs in HTML format, the JavaScript in those HTML tags will execute.
Create a script, save it to a location accessible to the calling server and include that script in the report.
-JavaScript could be turned off in browsers because of security reasons.
Heavily used code should be consolidated in one location via a script or layout comp
Consider if scripts can be put on the servers
Prompt API provides cleaner way to manipulate/interact with prompts