locked
Header filtering issue after converting to XSLT Data View and connecting Date Filter Web Parts RRS feed

  • Question

  • Hi all,

    I have an issue with header filters. Following these steps http://yanlinglei.blogspot.com/2008/11/filter-between-two-dates-date-range.html I want to create a data view which can be filtered via 2 Date Filter Web Parts.

    All works fine until I establish connection between XSLT Data View and Date Filter Web Parts. After this step built-in header filters stop working. Only inactive "Remove filter from <field_name>" (this my own translation) is shown when I click on a header. Before this step filters work fine.

    Is it an expected behaviour? Or am I able to do smth to return header filtering functionality?

    Thanks in advance!

    P.S. SP 2007


    Andrey V Artemyev | Saint-Petersburg, Russia
    Russian blog artemyev.biztoolbox.ru
    English blog enblog.biztoolbox.ru
    Tuesday, October 25, 2011 1:34 PM

Answers

  • Hi Andrey,

    "filter criteria" is the filters we can set it from Right click the XSLT view web Part > Show Common Data View Tasks > Filter > Then add filter directly.

    If you use XSLT filters, please delete all the filters you created in above steps, then select "Add XSLT Filtering" check box > Click Edit button behind the check box > Then type a XPath expression as the filters.

    Filter toolbar could also be enabled in XSLT view, if you have other options (like grouping) enable, you may got above error in preview page. Please remove other options and try this option again.

    Best regards,
    Emir

    Thursday, October 27, 2011 9:36 AM

All replies

  • Hi Andrey,

    This is a default behavior that header filter will be disabled if you had specified a filter critical. But if you use the XSLT filters instead, header filter will not be disabled.

    If you still want to add the filter in Filter Criteria, header filter could also enabled by

    Right click the XSLT view web Part > Show Common Data View Tasks > Data View Properties > Enable “Show toolbar with options for:” > Select Filter option > Click OK.

    Save the changes and preview the page, you could find a Filter button located above the header, and the filter toolbar is a similar function with the header filters.

    Thanks & Regards,
    Emir Liu
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please contact
     
    tnmff@microsoft.com.

    Wednesday, October 26, 2011 10:22 AM
  • Hi Emir,

    thanks for your reply, but it seems to be not as simple as it should be.

    Right click the XSLT view web Part > Show Common Data View Tasks > Data View Properties > Enable “Show toolbar with options for:” > Select Filter option > Click OK.

    Yes, I'm aware of this option and it would be completely enough for me, but if I apply it and then click "Filter" button, I get an error message:

    "Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persistsm contact your Web server administrator".

    This is a default behavior that header filter will be disabled if you had specified a filter critical. But if you use the XSLT filters instead, header filter will not be disabled.

    I'm not sure I understand this part correct. What do you mean by "filter criteria" here? And how can I use XSLT filter instead?

    The main idea is that users can filter a list by the Date field using 2 Date Filter Web Parts to specify a date range. But since they have chosen a date range and got a filtered list, they also want to be able to use column header filters to make further filtering, for example, to specify a responsible employee in the AssignedTo column etc. Because it is a bit freaky to make a stand-alone Filter Web Part for each existing column in the list.


    Andrey V Artemyev | Saint-Petersburg, Russia
    Russian blog artemyev.biztoolbox.ru
    English blog enblog.biztoolbox.ru
    Thursday, October 27, 2011 6:23 AM
  • Emir,

    to be absolutely clear,

    I can set this option in SPD:

    But then, when I click any column header, I get the following:

    In English this is smth like "Remove filter from Sales" or "Clear filter...". And it is inactive. This is the issue itself.

    According to your suggestion, I can set "Show toolbar with option for" but using "Filter" button gives me an error described in my previous post.


    Andrey V Artemyev | Saint-Petersburg, Russia
    Russian blog artemyev.biztoolbox.ru
    English blog enblog.biztoolbox.ru
    Thursday, October 27, 2011 7:57 AM
  • Hi Andrey,

    "filter criteria" is the filters we can set it from Right click the XSLT view web Part > Show Common Data View Tasks > Filter > Then add filter directly.

    If you use XSLT filters, please delete all the filters you created in above steps, then select "Add XSLT Filtering" check box > Click Edit button behind the check box > Then type a XPath expression as the filters.

    Filter toolbar could also be enabled in XSLT view, if you have other options (like grouping) enable, you may got above error in preview page. Please remove other options and try this option again.

    Best regards,
    Emir

    Thursday, October 27, 2011 9:36 AM
  • Emir,

    thanks a lot for your explanation. After reading these threads

    http://social.msdn.microsoft.com/forums/en-us/sharepointcustomization/thread/9D77A4F8-8918-4170-85EE-3CE3810B7BE9

    http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/76d508d5-6eb4-4c4a-bfb3-786cb7362221

    I finally got it working. Of course, XSLT filtering works a bit slower, but it works.

     


    Andrey V Artemyev | Saint-Petersburg, Russia
    Russian blog artemyev.biztoolbox.ru
    English blog enblog.biztoolbox.ru
    Thursday, October 27, 2011 10:53 AM