Solved

Data View Filter Errors and XSLT fail

Posted on 2011-09-13
1
485 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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