User1312450783 posted
I know there are issues using a crosstab query with sql server - but was hoping that I could get a crosstab query with a MS Access backend to display properly in a gridview in my asp.net page. At one point, I actually had this gridview displaying
properly, but now can't even seem to get that working. Ultimately I need to have a date range as selected from txt boxes in the asp.net page to be additional parameters for the cross-tab query - but first just need to get the data to display properly in gridview.
Below is my code for the Access Data Source that the gridview is bound to. I get the "
No value given for one or more required parameters."
error whenever this page loads - - but at one point this page was actually displaying fine.
*********************************
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/Data1.mdb"
SelectCommand= "TRANSFORM Sum(EmployeeHours.Hours)
AS SumOfHours
SELECT [EmployeeHours].[Employee], Sum([EmployeeHours].[Hours]) AS [Total Of Hours]
FROM EmployeeHours LEFT JOIN Employee ON [EmployeeHours].[Employee] = [Employee].[Username]
GROUP BY [EmployeeHours].[Employee]
PIVOT [EmployeeHours].[Building]">
</asp:AccessDataSource>
*****************
Any help is greatly appreciated!