none
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 = 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);

    this.reportViewer1.Reset();

    this.reportViewer1.LocalReport.DataSources.Add(rpds);

    this.reportViewer1.LocalReport.LoadReportDefinition(stream);

    this.reportViewer1.LocalReport.Refresh();

    this.reportViewer1.RefreshReport();

    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).

    Thanks,


    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
    Description:
    Faulting application name: ccWinEnterprise.exe, version: 7.1.0.118, 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="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2013-01-19T01:37:54.000000000Z" />
        <EventRecordID>17273</EventRecordID>
        <Channel>Application</Channel>
        <Computer>DDCSRQTS2A-T.fnfglobal.local</Computer>
        <Security />
      </System>
      <EventData>
        <Data>ccWinEnterprise.exe</Data>
        <Data>7.1.0.118</Data>
        <Data>2a425e19</Data>
        <Data>clr.dll</Data>
        <Data>4.0.30319.586</Data>
        <Data>50483ee3</Data>
        <Data>c00000fd</Data>
        <Data>000f4dac</Data>
        <Data>22f4</Data>
        <Data>01cdf5e592c081db</Data>
        <Data>\\fnfglobal.local\apps\RamQuest\Production\Progs\Test\TX\ccWinEnterprise.exe</Data>
        <Data>C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll</Data>
        <Data>d7835669-61d8-11e2-a083-005056ab68aa</Data>
      </EventData>
    </Event>

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