Link to home
Start Free TrialLog in
Avatar of drakmon
drakmonFlag for United States of America

asked on

Data View Filter Errors and XSLT fail

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
- ?
ASKER CERTIFIED SOLUTION
Avatar of drakmon
drakmon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial