Friday 3 July 2009

Create custom reports using Site Content and Structure

I got a cute requirement from my content team manager, asking to find out a simple way to find out the pages Approved,Rejected,Pending,Draft,scheduled to any one in the team.
After doing some research on existing reports provided by MOSS--"Manage Content and Site Structure", I thought we can do some thing over there.
Finally I deduced a way to add the new report to existing reports.
Steps are as follows:
1) Locate "Content and Structure Reports" list.
2) Add a new item for that list
3) Enter the following values in the new form displayed
Title = "All Documents(Aspx)"
CAML Query = "<Where><Eq><FieldRef Name='DocIcon' /><Value Type='Computed'>aspx</Value></Eq></Where>"

4) Now Navigate to "Site Actions-->Manage Content Structure"
5) Select View on the top toolbar and select "All Documents(Aspx)" from drop down.
Then the view would be displayed with all the pages in the portal.
Total number of results can be modified by choosing relevant number on the tool bar.

If we want to show only pages only with
a) Approved
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">0</Value></Eq></Where>
b) Rejected
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">1 </Value></Eq></Where>
c) Pending
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">2</Value></Eq></Where>
d) Draft
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">3</Value></Eq></Where>
e) Scheduled
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">4</Value></Eq></Where>


Cheers!We are done
Happy SPD'ing

1 comment:

Greg said...

Very Helpful...Thank you very much!