views:

401

answers:

1

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
A: 

Unfortunately (or fortunately I suppose in this case - loads of data here) I didn't find a direct solution to this problem. Instead, I used a query (probably using a SQLAdapter or something like that - it's been a while) and specified the parameters manually within that bit of code, then if I recall, supplied the report's datasource the adapter.

MasterMax1313

related questions