Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1414
  • Last Modified:

There are still active COM Objects in this application. One or more clients may have refrences to these objects

I get the error message indicated in the title each time I log off the computer after the application is closed.

The .net application uses a crystal reports active-x.

How do i get rid of this error?
0
adimit19
Asked:
adimit19
  • 5
  • 2
1 Solution
 
mlmccCommented:
Can you change the application?

How is the application calling the reports?

Any idea what version of Crystal?

mlmcc
0
 
adimit19Author Commented:
opening of report:
crv.ShowCloseButton = true;
                crv.Visible = true;
                crv.BringToFront();

                crv.ReportSource = rptSecur03;
0
 
adimit19Author Commented:
private CrystalDecisions.Windows.Forms.CrystalReportViewer crv;
private CrystalDecisions.CrystalReports.Engine.ReportDocument rptSecur03;
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mlmccCommented:
How do you close the report viewer?

How do you assign the report file to the viewer?

mlmcc
0
 
adimit19Author Commented:
I was hoping this forum would tell me how to close the reportviewer. THe report file code is already attached -- crv.ReportSource = rptSecur03;.
0
 
adimit19Author Commented:
I used the folowing code on form_closing to clear the com object from memory

private void clearReportsFromMemory(CrystalDecisions.CrystalReports.Engine.ReportDocument rpt)
        {
            try
            {
                if(rpt != null)
                {
                    if (rpt.IsLoaded)
                    {
                        rpt.Database.Dispose();
                        rpt.Close();
                        rpt.Dispose();
                        GC.collect

                    }
                }
                   
             
            }
0
 
adimit19Author Commented:
the code works in eliminating the error
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now