Reportviewer.refreshreport throwing stackoverflow error. RRS feed

  • Question

  • Hello,

    I'm creating an Visual C# DLL application that uses a report. The DLL has to be com visible because it is being called from a vb application. When I run the application in debug mode, the report runs fine, but when I copy the DLL to the production folder and run the program it throws an unhandled stackoverflow error on the Reportviewer.RefreshReport method.

    I tried the ReportEmbeddedResource in the code but no luck, I even tried to move the report to another DLL that is being referenced by this DLL and use the LoadReportDefinition from that DLL, but I get the same error.

    Here is the latest code:


    assembly = Assembly.LoadFrom(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\CashPushDAL.dll");

    Stream stream = assembly.GetManifestResourceStream("CashPushDAL.LumpedListing.rdlc");

    DBOps dbops = new DBOps();

    DataTable dt = dbops.get_reportData(GFNO);

    ReportDataSource rpds = new ReportDataSource("DataSet1", dt);






    Any suggestions?

    Thank you

    • Edited by aterrazas Monday, September 24, 2012 11:38 PM
    • Moved by Bob Shen Tuesday, September 25, 2012 2:48 AM (From:Visual C# General)
    Monday, September 24, 2012 11:12 PM

All replies

  • Hi aterrazas,

    According to your description, I'd like to move this thread to Visual Studio Report Controls Forum for better support, where more experts live.
    Thanks for your understanding.

    Bob Shen [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, September 25, 2012 2:47 AM
  • Hi,

    What version of the Report Viewer control are you using? Are you using the WinForms or the WebForms one? Can you please post a piece of the stack when the exception is thrown? (Ideally the portion before it repeats over and over and one cycle of the repetition).


    Vitek Karas [MSFT]

    Tuesday, September 25, 2012 8:26 AM
  • Hi,

    Thank you for your quick response.

    I'm using the Winforms version 10.0. As soon as it gets to the this.reportViewer1.RefreshReport(); line it throws the error

    "An unhandled exception of type 'System.StackOverflowException' occurred in Microsoft.ReportViewer.Common.dll".

    I'm sorry, I don't understand when you say to post a piece of the stack when the exception is thrown, when I debug the program the report runs fine, the problem is when I copy the DLL to the production folder where the application resides. I run the application and everything looks ok until I click on the button to run the report.

    Thank you

    This is what I can see when I run the application..

    Log Name:      Application
    Source:        Application Error
    Date:          1/18/2013 7:37:54 PM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      DDCSRQTS2A-T.fnfglobal.local
    Faulting application name: ccWinEnterprise.exe, version:, time stamp: 0x2a425e19
    Faulting module name: clr.dll, version: 4.0.30319.586, time stamp: 0x50483ee3
    Exception code: 0xc00000fd
    Fault offset: 0x000f4dac
    Faulting process id: 0x22f4
    Faulting application start time: 0x01cdf5e592c081db
    Faulting application path: \\fnfglobal.local\apps\RamQuest\Production\Progs\Test\TX\ccWinEnterprise.exe
    Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
    Report Id: d7835669-61d8-11e2-a083-005056ab68aa
    Event Xml:
    <Event xmlns="">
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <TimeCreated SystemTime="2013-01-19T01:37:54.000000000Z" />
        <Security />

    • Edited by aterrazas Saturday, January 19, 2013 1:43 AM
    Tuesday, September 25, 2012 4:54 PM