?
Solved

Data View Filter Errors and XSLT fail

Posted on 2011-09-13
1
Medium Priority
?
489 Views
Last Modified: 2012-08-13
Getting a "non-specific error" that I can't seem to get rid of. I can provide code samples later, if need be, but here's my setup:

- 2 date entry web parts (one for start date, one for end date)
- 2 data view web parts. Both data view web parts point to the same list as a data source.
- Both data view web parts use the date entry web parts as filters (via SelectCommand in the DVWP).
- Both DVWPs have the following additional XSLT filter (note that "Product" is different between each DVWP, and my syntax may be off since I'm doing this from memory: [not (@Teacher = following-sibling::@Teacher) and (@Product = 'Product')]

The requirement is to have a big list of visits to teachers, all on different dates, with different products involved (sometimes different products to the same teacher on different dates). The DVWP are designed to show the most recent visit for each teacher for the matching products. In a case where you have a bunch of visits for each teacher, they could potentially show in both DVWPs, with only their most recent visit for that product being displayed in each data view (so they would display twice).

When I had one DVWP, it worked fine with no issues. However, when I added the second DVWP, things started to go screwy. Only the DVWP representing the product where the most recent visit occurred displayed a record, even though the teacher had records for both products (so they should have displayed in both DVWPs).

I've tried editing the SelectCommand, but every single time I get a non-specific error when I change it even a little. I'm also getting the same issue if I mess with the XSLT filter. It's like I can't make any changes to my code without it breaking. The only thing that seems to work is to completely remove the date filter parameters from both DVWPs, and then both display the expected data (why does this work?). However, the date filters are important for user experience, so they can report on visits just within a specific date range.

I even tried starting over from scratch with two brand new DVWPs, both pointed to the date filters, and got the same end result.

So, I'm not exactly sure what's going on. My current theories are:
- Hooking the date filters up to both DVWPs is causing some sort of interference, so I need to create a separate set of date filters for the 2nd DVWP
- ?
0
Comment
Question by:drakmon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
drakmon earned 0 total points
ID: 36533475
Alright, so here's how I fixed it:

- Recreated both DVWPs
- Added basic filters
- Added Parameters
- Added Parameter-based filters
- Established web part connections

...and save/tested after every single change.

Works perfectly now! :D

Note to self: Never, ever use SP Designer again for anything but page layout. It blows up my code every time I use the interface to change the filtering.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question