Tuesday 30 September 2014

Cognos: Creating Gantt Chart using Crosstab

Cognos do not include a Gantt chart as an available option in chart dialogs. We can achieve this by using Crosstab object. The steps below will discuss creating the Gantt chart.
1. Tables used
We are going to use following two tables
(I)Minute
(II) Jobs
2. Create two Queries, Jobs and Minute, with all data items available in Jobs and Minute tables respectively.
3. Drag a third Query item and a Join object, which will join Minute and Jobs Query.
Put the following Join Expression:
4. Double click Query1 and drag the following data items into it.
5. Insert a Data Item called Range with following expression
6. Insert a filter to it with following condition:
7. Insert a Crosstab object, Select the Query as Query1
8. Insert the data items into crosstab as shown below
9. Sort the MIN column in ascending order.
10. Run the report, you can see the output
11.  Insert a Boolean Variable with following expression
12. Select Crosstab Intersection, Go to Condition Expression, Select Yes under Boolean Variable
13. Select Style Variable Property as Boolean1, Select Background and foreground color
14. After saving and Running the Report, You can see the following Gantt chart

No comments:

Post a Comment