Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting list items according to priority field

Status
Not open for further replies.

Prakash4141

Programmer
Jul 26, 2009
2
US
I have a list in a site and I want to display the count of the list items according to the field "priority" in a webpart for e.g.

No. of High priority task in list Task are 4
No. of Low priority task in list Task are 2

and I want to display this webpart anywhere in that particular site collection.

Any suggestion would really be appreciated.
 
why not use a data view web part for this???

Known is handfull, Unknown is worldfull
 
Actually I forgot to mention one thing that list can be anywhere in the site. So I need to query whole site collection. I guess with data view web part in sharepoint designer we can only open one site at a time.Regarding CAMLQueryBuilder I never used it but I will look into it. I myself also thinking of using CAML query for it.
 
>>I guess with data view web part in sharepoint designer we can only open one site at a time

Really depends, you can add different data sources.
however the point here is why are you searching for the list? what makes it location so dynamic???

Known is handfull, Unknown is worldfull
 
Can you get the data view web part to out put the format you wanted?

There are 4 High Priority tasks.

I thought the data view could only display a list of the high priority tasks. Am I wrong? If the web part needs to be very dynamic and needs to display the results in a custom format, as in your first message, it seems like C# with CAML is probably going to be the best way of going about it.
 
>>Can you get the data view web part to out put the format you wanted

i was able to do this in using a data view web part :)

it has grouping functions and from there we can change the XSLT and convert it to a report format.

Known is handfull, Unknown is worldfull
 
your welcome :)...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top