locked
WCF Service to ObjectDataSource fast for GridView and 30 seconds slower for RDLC RRS feed

  • Question

  • User1903567672 posted

    I have an asp page with an objectdatasource getting data from a WCF Service. The web service returns a datatable. I compared the speed of data presentation in a gridview and in a RDLC with the reportviewer web control in local mode. The differences are 20 to 30 seconds slower with the RDLC.

    I did not have any code behind in both scenarios with all default properties. Is there something I should setup programmatically instead? What can be done to speed the RDLC rendering up? Please advise.

    <asp:GridView ID="GridView1" runat="server" DataSourceID="WCFServiceObjectDataSource">
    </asp:GridView>
    
    <rsweb:ReportViewer ID="LabReportViewer" runat="server" >
            <LocalReport ReportPath="BETA.rdlc">
                <DataSources>
                    <rsweb:ReportDataSource DataSourceId="WCFServiceObjectDataSource" Name="NAME" />
                </DataSources>
            </LocalReport>
    </rsweb:ReportViewer>
    
    <asp:ObjectDataSource ID="WCFServiceObjectDataSource" runat="server" SelectMethod="GetResults" TypeName="WebApplication.ResultsServiceReference.ResultsServiceClient">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="id" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>

    Tuesday, May 13, 2014 4:36 PM

Answers

  • User1903567672 posted

    The problem occurs in a VS2012 Express with a ReportViewer 2012 distribution added.

    I was wondering if it is because of the environment, so I tested the same setup in a VS2008 enterprise with BI installed.

    Surely in VS2008 the RDLC with an ObjectDataSource which uses a web service reference, renders perfectly fine and return within a second.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2014 10:21 PM

All replies

  • User-734925760 posted

    http://forums.asp.net/t/1109814.aspx?difference+between+datagrid+gridview+and+formviewHi,

    According to your description, I think the function of GridView and ReportView controls are different. The Gridview control only display the data in the page, but the ReportViewer control need to generate into report. So it will need more time than GridView control.

    If you only want to display the Data, I suggest you using GridView control.

    http://forums.asp.net/t/1109814.aspx?difference+between+datagrid+gridview+and+formview

    Hope it's useful for you.

    Best Regards,

    Michelle Ge

    Wednesday, May 14, 2014 5:14 AM
  • User1903567672 posted

    Not true because I also tested the report with a sqldatasource with the same data and it takes only a seconds to render but took 30 seconds to render with the object data source.
    Wednesday, May 14, 2014 5:30 AM
  • User1903567672 posted

    The problem occurs in a VS2012 Express with a ReportViewer 2012 distribution added.

    I was wondering if it is because of the environment, so I tested the same setup in a VS2008 enterprise with BI installed.

    Surely in VS2008 the RDLC with an ObjectDataSource which uses a web service reference, renders perfectly fine and return within a second.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2014 10:21 PM