Why is the SqlDatasource I am using not returning a calculated value when the same query does in SQL server? C#.net 4.0
===

Query that works in Sql Server.

    
    Declare @from datetime, @to datetime, @status int, @SupervisorID uniqueidentifier
    SELECT @to = '09-12-2012', @from = '02-02-2012', @status = 0, @SupervisorID = '2EB087F0-A419-4421-861A-6EBDFED9449A'
    
    select nums.date as DayOff, [RequestID], [EmployeeName], [AbsenceType], [AbsenceBundle], [DateRequested], [FirstDay], [LastDay], [ReturnDay], [SupervisorName], [DaysHoursDesc] as DaysAbsent, [Description], Hours from
                (select dateadd(day, number, @from) as date
                from 
                    (select distinct number from Numbers
                    ) num
                where dateadd(day, number, @from) < @to) nums right outer join [AbsenceRequests].[dbo].[AbsenceRequestWithDescriptions] a on (DateDiff(Day, a.FirstDay, nums.date) >= 0 and DateDiff(Day, a.LastDay, nums.date) <=0)
                where
                     (([SupervisorID] = @SupervisorID) or ([EmployeeID] = @SupervisorID)
                                or 
                     ([SupervisorID] in  (select SupervisorID from Viewers where [viewerID] = @SupervisorID)))
    and((@status = StatusID) or (@status = '0'))
                order by SupervisorName, EmployeeName, FirstDay, Hours 

Results I am getting from this query

    2012-06-06 00:00:00.000	515	apptest1	Vacation	55 - Vacation	2012-06-28 00:00:00.000	2012-06-06 00:00:00.000	2012-06-07 00:00:00.000	2012-06-08 00:00:00.000	apptest3	16 Hour(s)	Pending	16

SqlDatasource definition

      <asp:SqlDataSource ID="EmployeeAbsenceRequestsSql" runat="server"  
            ConnectionString="<%$ ConnectionStrings:AbsenceRequestsConnectionString %>" 
                
                SelectCommand="
                select nums.date as DayOff, [RequestID], [EmployeeName], [AbsenceType], [AbsenceBundle], [DateRequested], [FirstDay], [LastDay], [ReturnDay], [SupervisorName], [DaysHoursDesc] as DaysAbsent, [Description], Hours from
                (select dateadd(day, number, @from) as date
                from 
                    (select distinct number from Numbers
                    ) num
                where dateadd(day, number, @from) &lt; @to) nums right outer join [AbsenceRequests].[dbo].[AbsenceRequestWithDescriptions] a on (DateDiff(Day, a.FirstDay, nums.date) &gt;= 0 and DateDiff(Day, a.LastDay, nums.date) &lt;=0)
                where
                     (([SupervisorID] = @SupervisorID) or ([EmployeeID] = @SupervisorID)
                                or 
                     ([SupervisorID] in  (select SupervisorID from Viewers where [viewerID] = @SupervisorID)))
                     and ((@status = StatusID) or (@status = '0'))
                order by SupervisorName, EmployeeName, FirstDay, Hours " 
                onselecting="EmployeeAbsenceRequestsSql_Selecting" >
                <SelectParameters>
                    <asp:FormParameter DefaultValue=" " FormField="Fromtxt" Name="from" />
                    <asp:FormParameter DefaultValue=" " FormField="Totxt" Name="to" />
                    <asp:SessionParameter DefaultValue="&quot;&quot;" Name="SupervisorID" 
                        SessionField="EmployeeID" Type="Object" />
                    <asp:ControlParameter ControlID="Statusddl" DefaultValue="0" PropertyName="SelectedValue"  Name="status" />
                </SelectParameters>
            </asp:SqlDataSource>

I am getting results with this when I call the select method of the datasource but the First Column DayOff is returning blank(I have verified this by setting a watch and checking the DataView). Below is the code that I am using to execute and read the results of the select query.

       protected void RefreshTreeview()
        {
            this.EmployeeAbsenceRequestsSql.SelectParameters["from"].DefaultValue = SafeDateString(this.Fromtxt.Text);
            this.EmployeeAbsenceRequestsSql.SelectParameters["to"].DefaultValue = SafeDateString(this.Totxt.Text);
            DataView dv = (DataView) this.EmployeeAbsenceRequestsSql.Select(new DataSourceSelectArguments());
    
            FillTreeView(dv);
        }

    private void FillTreeView(DataView dv)
    {
        TreeNode CurrentSupervisorNode =  null;
        TreeNode CurrentEmployeeNode = null;
        foreach (DataRow row in dv.Table.Rows)
        {
            String SupervisorName = SafeString(row["SupervisorName"]);
            if ((CurrentSupervisorNode == null) || !CurrentSupervisorNode.Text.Equals(SupervisorName))
            {
                CurrentSupervisorNode = new TreeNode(SupervisorName);
                this.AbsencesTV.Nodes.Add(CurrentSupervisorNode);
                CurrentEmployeeNode = null;
            }
            String EmployeeName = SafeString(row["EmployeeName"]);
            if (CurrentEmployeeNode == null || !CurrentEmployeeNode.Text.Equals(EmployeeName))
            {
                CurrentEmployeeNode = new TreeNode(EmployeeName);
                CurrentSupervisorNode.ChildNodes.Add(CurrentEmployeeNode);
            }

            String DayOffSummary = SafeString(row["DayOff"]) + " " + SafeString(row["AbsenceBundle"]) +" " + SafeString(row["Description"]);
            CurrentEmployeeNode.ChildNodes.Add(new TreeNode(DayOffSummary));
        }
    }

Does anyone have any debugging advice or even better the answer to why this is happening?
