locked
How to develop a webpart that summarize a list? RRS feed

  • Question

  • Hi,

    I'm final year student and I need to develop a webpart for SharePoint 2007.

    I have a list that contain 5 columns :

    They are Title, Broadcast Date, Business Unit, Type of Project and Channel.

    So, I want to develop a webpart that has a drop-down menu which user can choose to filter their list and show report of that list.

    This webpart need to be develop on different page from that list.I'm asking here, can it be develop in SharePoint 2007?

    Anyone can help me develop this?

    This is the link on how i want to develop it. The primary key is Broadcast Date .

    http://img163.imageshack.us/i/webpart.jpg/

    http://msdn.microsoft.com/en-us/library/cc300163%28v=office.12%29.aspx

     

     

     

     
    Friday, April 15, 2011 7:31 AM

Answers

All replies

  • Hi,

    According to my view, You should create custom  user control (.ascx) OR class library project and deploy it on sharepoint server as webpart. I believe all the report data is saved in sharepoint list. Here is some steps that you can follow to create custom webpart:

    1. Use your visual studio to create custom user control and add Microsoft.Sharepoint.dll

    2. Use SPSite, SPWeb and SPList to get content of the sharepoint site

    3. Then place your .ascx file in 12 hive (inside the control template) and put your solution DLL in BIN folder of your application virtual directoty

    4. Finally add a safe control entry in your application web.config file

    Please refer below links to create custom webpart

    http://www.sharepointkings.com/2008/12/create-custom-web-part-in-sharepoint.html

    http://www.codeproject.com/KB/sharepoint/CustomWebpartSharepoint.aspx

    http://www.datasprings.com/resources/articles-information/sharepoint-2007-custom-web-parts

    Hope it could help. Let us know if you have any doubt / issue

     


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    • Marked as answer by Peng Lei Friday, April 22, 2011 8:06 AM
    Friday, April 15, 2011 8:16 AM
    Moderator
  • Sorry, I have to ask this; What exactly is the problem? I'd say, you're on the right track already. The MSDN link on your post already gives you the steps to do something similar to what you want. If I were you, I'd go with that.

     


    Pman
    http://www.pmansLab.com/
    Saturday, April 16, 2011 1:58 AM
  • Sorry, I have to ask this; What exactly is the problem? I'd say, you're on the right track already. The MSDN link on your post already gives you the steps to do something similar to what you want. If I were you, I'd go with that.

     


    Pman
    http://www.pmansLab.com/

    Hi, the problem is the dropdowncontrol shows "(2) Normal" many times. How can we make it to show only the unique values as: (1) High, (2) Normal, (3) Low only?

    I had tried the link that I posted, but it is not worked exactly like I want?

    I want to do something like this.

    http://www.kwizcom.com/sharepoint-add-ons/sharepoint-list-filter-plus/overview/

    Monday, April 18, 2011 5:09 AM
  • Hi Jenny,

    Is there any requirement that this must be a custom web part developed in Visual Studio?

    There are other options using SharePoint's Web Services with jQuery that actually perform quite well for your needs. 

    Check out http://spservices.codeplex.com for more information and helpful documentation. 

    Good luck,

    Mark

    Monday, April 18, 2011 5:40 PM
  • Hi Jenny,

    Is there any requirement that this must be a custom web part developed in Visual Studio?

    There are other options using SharePoint's Web Services with jQuery that actually perform quite well for your needs. 

    Check out http://spservices.codeplex.com for more information and helpful documentation. 

    Good luck,

    Mark

    Hi Mark,

    Thank you for your suggestion. No, it's not a requirement to develop using Visual Studio.

    We can use SharePoint Designer as well to develop this.

    I'm not really familiar with SharePoint's web services and I don't know how it's related to this.

    Have you ever try using this jQuery to perform this kind of requirements?

    Tuesday, April 19, 2011 12:55 AM
  • Hi Jenny,

     

    There are four different ways that I can think of off the top of my head to do what you want. The right answer depends on your skill set and what you want the end result to look like.  Some of your options are:

    1) Out of the box SharePoint web parts and filter web parts - Create a page, drop a list view on the page, drop filter web parts on the page and connect to your list view

    2) SharePoint Designer - Create a DataView Web Part and controls for your filters that you either connect to your DVWP or use the controls to create QueryString variables that your DVWP uses to filter the results

    3) Use jQuery and SPServices to do it all (http://spservices.codeplex.com) and yes, I have done this before so I know it will work. 

    4) Open up Visual Studio and do it as a custom webpart (this sounds like overkill though given your requirements) 

     

    If you go with #2 I have a video blog that walks you through filtering a DataViewWebPart by a QueryString Variable. That should get you part of the way there. Next thing you'll need to do is get your controls on the page that will populate the QueryString. That blog is located at: http://sharepointhillbilly.com/archive/2009/12/08/creating-a-sharepoint-list-parentchild-relationship-ndash-video-remix.aspx

     

    There are a billion ways to do things in SharePoint which is very cool, but also very frustrating.

    Best of luck to you,
    Mark 

    Tuesday, April 19, 2011 5:53 PM
  • Hi Jenny,

    Creating something like the demo from the kwizcom will require you to do some coding using SharePoint Designer. As for showing the unique values: I can't recall what the code looks like when that dropdown control is created. But if it uses xslt for the values displayed, then you can modify the xslt code to filter out duplicate values.

    Have you tried out the toolbar that you can enable from SPD for your dataview? Simply go to the properties of the dataview web part in SharePoint Designer and enable the "Filter" toolbar. You also have the option to enable "Sorting" and "Grouping" from there. See, if that takes care of your requirements.

    Mark gave you some good pointers already and depending on your requirements there are different ways to approach it.

    Good luck!!!

     


    Pman
    http://www.pmansLab.com/
    Wednesday, April 20, 2011 12:46 AM