Multiple Queries COGNOS Multiple Queries In Cognos Report Studio, it is possible to include multiple queries on a report. In the Applicants report below, we will add a query for Admissions information. Page 1 of 21 Revised July 2012 Multiple Queries Follow these steps to create a report with multiple queries: 1. Open the report Page 2 of 21 Revised July 2012 Multiple Queries 1. 2. 3. 4. 5. Highlight the report body area Select the Table menu item Select Insert Select Table Change the table size to three (3) columns and four (4) rows 6. Click OK Page 3 of 21 Revised July 2012 Multiple Queries 7. 8. 9. Highlight the College column Select the List Column Body link at the top of the Properties Pane Select List Page 4 of 21 Revised July 2012 Multiple Queries 10. 11. Drag the columns to the bottom left cell Click inside the cell 12. Select the Center Page 5 of 21 icon Revised July 2012 Multiple Queries 13. 14. 15. Click the Toolbox tab from the Insertable Objects Pane Select List item Drag the List item to the bottom right space of the table Page 6 of 21 Revised July 2012 Multiple Queries 16. 17. Select the Source tab from the Insertable Objects Pane Drag the data items COLLEGE_DESC and PERSON_UID into the NEW list report frame Page 7 of 21 Revised July 2012 Multiple Queries 18. 19. 20. 21. 22. 23. 24. Double click inside the PERSON_UID column The Data Item Expression dialogue box will open Click before the Query Item Definition Enter the word count <space> open parenthesis ( Click at the end of the Query Item Definition Enter close parenthesis ) Click OK Page 8 of 21 Revised July 2012 Multiple Queries 25. Click inside the COLLEGE_DESC column 26. Click the Group Page 9 of 21 icon Revised July 2012 Multiple Queries 27. Highlight the PERSON_UID column 28. 29. Click the Aggregate Select Total Page 10 of 21 icon Revised July 2012 Multiple Queries 30. 31. Click inside the subtotal line Click the <Delete> key on your keyboard Page 11 of 21 Revised July 2012 Multiple Queries 32. 33. 34. Mouse over the Explorer Bar Mouse over Query Explorer Select Query 1 Page 12 of 21 Revised July 2012 Multiple Queries 35. 36. 37. 38. Select the second filter in the Detail Filters window The Detail Filter Expression dialogue box will open Highlight and copy the contents in the Expression Definition window Click the Cancel button Page 13 of 21 Revised July 2012 Multiple Queries 39. 40. Mouse over the Query Explorer Select Query2 Page 14 of 21 Revised July 2012 Multiple Queries 41. 42. 43. Click the Toolbox tab from the Insertable Objects pane Drag and drop the Filter item to the Detail Filters window Paste the copied statement into the Expression Definition window Page 15 of 21 Revised July 2012 Multiple Queries 44. 45. 46. 47. Click the Source tab from the Insertable Objects pane Scroll through the tree hierarchy until you find the Filters folder Open the Filters folder Drag and drop the Admit Select filter to the Detail Filters window Page 16 of 21 Revised July 2012 Multiple Queries 48. 49. Open Page 1 by opening the Page Explorer from the Explorer Bar Click inside the right side of the report to highlight it 50. Select the Center Page 17 of 21 icon Revised July 2012 Multiple Queries 51. 52. 53. Highlight the column heading for COLLEGE_DESC Select Source Type from the Properties Pane Select Text Page 18 of 21 Revised July 2012 Multiple Queries 54. 55. 56. 57. 58. Double click inside the column heading The Text box will open Type the word College Click OK Repeat steps 56 - 62 for the PERSON_UID column, except change the word to Admissions Page 19 of 21 Revised July 2012 Multiple Queries 59. Select the PERSON_UID column 60. Select the right justify icon 61. Run the report to view the results Page 20 of 21 Revised July 2012 Multiple Queries For additional information regarding Cognos, policies and access, or modifications to the ODS, contact the Business Intelligence Team at cognos@kent.edu. For technical assistance, contact the IS Help Desk at 672-HELP (4357). www.kent.edu/is/training istraining@kent.edu ©2012 This information is provided by the Division of Information Services, Kent State University and is proprietary and confidential. These materials are made available for the exclusive use of Kent State University employees, and shall not be duplicated, published or disclosed for other purposes without written permission. Page 21 of 21 Revised July 2012