Expand my Community achievements bar.

Showing Subtask View in Reports

Avatar

Level 6
Hello, I think I have asked this before, but do not recall. Is there a way to show the parent/child relationships (subtasks) in a report? This would be very beneficial for numerous reports of mine, so I am trying to figure it out. Thanks, Tim Tim Brooks Invicro
9 Replies

Avatar

Level 10
Hi @Tim Brooks - can you elaborate a little more on your requirements (especially in terms of how you want to present the report)? You can identify parent and child tasks when filtering by using the 'Number of Children' field on tasks, in conjunction with the 'Indent' field: If Number of Children is 0, and indent is greater than 0, then it is a child task. If Number of Children is greater than 0 then it is a parent task. If Number of Children is 0 and Indent is 0 then it is neither a parent task or a child task. Conversely, if Number of Children and Indent are both greater than 0, then it is both a parent and child task. Regards, David. David Cornwell

Avatar

Level 6
Hello @David Cornwell , I am actually not trying to filter out anything, I would like to show all tasks in the report, but within the report physically show the parent/child relationships. I actually figured it out since I last sent. It is a series of text mode code within task name. I actually got it to highlight the parent tasks in different colors based on how many indents that parent task is, AND have tick marks next to the task name to show how many indents the specific task is. Example below. Tim Brooks Invicro

Avatar

Level 3

Hi Tim,

would you mind sharing the text mode code you used to solve this issue?

I have exactly the same challenge.

Thanks a lot in advance.

BR

Christian

Avatar

Level 6

Here ya go!

displayname=

linkedname=direct

namekey=name

querysort=name

styledef.case.0.comparison.icon=false

styledef.case.0.comparison.leftmethod=numberOfChildren

styledef.case.0.comparison.lefttext=numberOfChildren

styledef.case.0.comparison.operator=eq

styledef.case.0.comparison.operatortype=int

styledef.case.0.comparison.righttext=0

styledef.case.0.comparison.trueproperty.0.name=textcolor

styledef.case.0.comparison.trueproperty.0.value=000000

styledef.case.0.comparison.trueproperty.1.name=bgcolor

styledef.case.0.comparison.trueproperty.1.value=ffffff

styledef.case.0.comparison.truetext=

styledef.case.1.comparison.icon=false

styledef.case.1.comparison.leftmethod=indent

styledef.case.1.comparison.lefttext=indent

styledef.case.1.comparison.operator=eq

styledef.case.1.comparison.operatortype=int

styledef.case.1.comparison.righttext=0

styledef.case.1.comparison.trueproperty.0.name=bgcolor

styledef.case.1.comparison.trueproperty.0.value=feecc8

styledef.case.1.comparison.truetext=

styledef.case.2.comparison.icon=false

styledef.case.2.comparison.leftmethod=indent

styledef.case.2.comparison.lefttext=indent

styledef.case.2.comparison.operator=eq

styledef.case.2.comparison.operatortype=int

styledef.case.2.comparison.righttext=1

styledef.case.2.comparison.trueproperty.0.name=bgcolor

styledef.case.2.comparison.trueproperty.0.value=dcf6f7

styledef.case.2.comparison.truetext=

styledef.case.3.comparison.icon=false

styledef.case.3.comparison.leftmethod=indent

styledef.case.3.comparison.lefttext=indent

styledef.case.3.comparison.operator=eq

styledef.case.3.comparison.operatortype=int

styledef.case.3.comparison.righttext=2

styledef.case.3.comparison.trueproperty.0.name=bgcolor

styledef.case.3.comparison.trueproperty.0.value=e9def4

styledef.case.3.comparison.truetext=

styledef.case.4.comparison.icon=false

styledef.case.4.comparison.leftmethod=indent

styledef.case.4.comparison.lefttext=indent

styledef.case.4.comparison.operator=eq

styledef.case.4.comparison.operatortype=int

styledef.case.4.comparison.righttext=3

styledef.case.4.comparison.trueproperty.0.name=bgcolor

styledef.case.4.comparison.trueproperty.0.value=def6e2

styledef.case.4.comparison.truetext=

styledef.case.5.comparison.icon=false

styledef.case.5.comparison.leftmethod=indent

styledef.case.5.comparison.lefttext=indent

styledef.case.5.comparison.operator=eq

styledef.case.5.comparison.operatortype=int

styledef.case.5.comparison.righttext=4

styledef.case.5.comparison.trueproperty.0.name=bgcolor

styledef.case.5.comparison.trueproperty.0.value=e8e8e8

styledef.case.5.comparison.truetext=

styledef.case.6.comparison.icon=false

styledef.case.6.comparison.leftmethod=indent

styledef.case.6.comparison.lefttext=indent

styledef.case.6.comparison.operator=eq

styledef.case.6.comparison.operatortype=int

styledef.case.6.comparison.righttext=5

styledef.case.6.comparison.trueproperty.0.name=bgcolor

styledef.case.6.comparison.trueproperty.0.value=e8f1ff

styledef.case.6.comparison.truetext=

textmode=true

valueexpression=IF({indent}<1,{name},IF({indent}<2,CONCAT(" - ",{name}),IF({indent}<3,CONCAT(" - - ",{name}),IF({indent}<4,CONCAT(" - - - ",{name}),CONCAT(" - - - - ",{name})))))

valuefield=name

valueformat=HTML

Avatar

Level 2

Wow, thank you for this.  It also worked perfectly for me.  I imagine this would be very valuable to many.  

Avatar

Level 1

This is awesome Tim! When I use the text mode the formatting works perfectly. Quick question: are you able to sort the tasks by the order in which they're displayed in the project plan? Right now the tasks have the correct formatting the the order appears random.

Avatar

Level 1

Yes, in the project plan I'm sorted by the Task number and it shows the parent-child task relationship. I'm not sure how to sort by task number in the report view.

Avatar

Level 1

Actually I just figured it out. I added the Task Number field as a column and then sorted by that column. Thank you so much Tim! You saved me so much time.