This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Report Project and activities

tigrao - Friday, December 10, 2010 9:13 AM:

I am creating a report project and I need to view the activities, but when I include only the property is shown wbs_id 458FAA545545415BAFF61654515451545AB.

 Can someone help me? Plaese!



Brian - Sunday, December 12, 2010 6:39 AM:

Hi Tigrao,

You will need to add some more details on what you are trying to do.

Be very specific. The more information you can supply the easier it is for other people to work out what you are asking.

Cheers,

Brian.



tigrao - Monday, December 13, 2010 6:52 AM:

Hi my friend,

I have a project;
This project has two WBS and each WBS has two activities;
I want a report that lists the project, the WBS of the project and the activities of each WBS.

I could list the project with the WBS, but I could not list the activities of the WBS.

See AML I used:

<Item type="Project" action="get" select="name,parte,date_start_target,date_due_target,description,wbs_id">
<Relationships>
        <Item action="get" type="Project Team"
         select="source_id,related_id(name,description)"/>
</Relationships>

<wbs_id>

    <Item action="get" type="WBS Element"   select="name, config_id">
       <Relationships>
            <Item action="get" type="Sub WBS" select="config_id, name">
                  <Relationships>
                       <Item action="get" type="WBS Activity2"  select="*"></Item>
                  </Relationships>
            </Item>
       </Relationships>
    </Item>

</wbs_id>
</Item>


I want this:

Project                 Name                    WBS                          Activities

                                                                                                Activity_1

12562                  MyProject             MyWBS_1                 Activity_2

                                                                                               Activity_3

Cheers,

Tigrao

             



Brian - Monday, December 13, 2010 7:54 AM:

Hi Tigrao,

The relationships you have to capture are:

Project to top WBS Element (which is via the wbs_id in the Project Item).

WBS Element to WBS Element via Sub WBS (relationship) and

WBS Element to Activity2 via WBS Activity2 (relationship)

Assuming you have a Project:

Top Element

  Sub WBS

    Sub WBS

      Activity

Then you need AML like this:

<AML>
<Item type="Project" action="get" select="name,parte,date_start_target,date_due_target,description,wbs_id">
  <wbs_id>
    <Item type="WBS Element" action="get">
      <Relationships>
        <Item type="Sub WBS" action="get">
          <related_id>
            <Item type="WBS Element" action="get">
              <Relationships>
                <Item type="WBS Activity2" action="get">
                  <related_id>
                    <Item type="Activity2" action="get"/>
                  </related_id>
                </Item>
              </Relationships>
            </Item>
          </related_id>
        </Item>
      </Relationships>
    </Item>
  </wbs_id>
</Item>
</AML>

Your problem was you were not using the <related_id> of the relationships to get to the next lower level.

In your situation you need one less "Sub WBS" element to get to your activities.

Hope this helps.

Cheers,

Brian.



tigrao - Monday, December 13, 2010 10:45 AM:

Hi Brian, thank you very much.

with your help I managed to solve the problem.

I followed your AML above and it worked.

Obrigado.



Abhijit - Tuesday, August 23, 2016 1:55 PM:

Hi,

The above query do not return WBS Elements from 3rd level. What would be the query to we get those?

I am getting "1319" & "2.0 Assembly" but not "3rd Level" onwards by above query

Thanks,

Abhijit



edonahue - Monday, September 19, 2016 11:49 AM:

Hi Abhijit,

The query provided in this thread is specific to the information provided by the original poster, so it may not work for your use case.

Please post a new question in the Developers forum with some background information on the use case you are trying to implement.