ObjectDataSource.Select with Parameters Time Out

Posted by MasterMax1313 on Stack Overflow See other posts from Stack Overflow or by MasterMax1313
Published on 2009-08-18T17:27:31Z Indexed on 2010/03/23 3:01 UTC
Read the original article Hit count: 359

I'm using an ObjectDataSource with a 2008 ReportViewer control and Linq to CSV. The ODS has two parameters (the SQL is spelled out in an XSD file with a table adapter). The Reportviewer takes a very long time to render the output after a button is clicked to generate the report. That's my first problem. Even though it works (most of the time), the processing time worries me, and subsequent requests don't seem to be changing the results shown on the screen. The next issue is that when I go to export the ODS to CSV I'm getting a time out exception on the select method of the ODS (shown below). This works for ODS without parameters, but it seems like now that I've added parameters that it doesn't want to cooperate. I'm fresh out of ideas, any thoughts?

<asp:ObjectDataSource ID="obsGetDataAllCustomers" runat="server" 
    SelectMethod="GetDataAllCustomers" 

    TypeName="my.myAdapter.AllCustomers" 
    OldValuesParameterFormatString="original_{0}" >
    <SelectParameters>
    	<asp:ControlParameter ControlID="StartDate" Name="Start" PropertyName="Text" 
    		Type="DateTime" />
    	<asp:ControlParameter ControlID="EndDate" Name="_End" PropertyName="Text" 
    		Type="DateTime" />
    </SelectParameters>
</asp:ObjectDataSource>

After button click to view report -

rvAllCustomers.LocalReport.Refresh()

Export to CSV (adding the items returned to a list which is then processed by working code) -

For Each dr As DataRow In CType(obs.Select(), DataView).Table.Rows
    l.Add(New FullOrderOutput(dr))
Next

© Stack Overflow or respective owner

Related posts about reportviewer2008

Related posts about asp.net-3.5