Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-06-10
7
Medium Priority
?
1,391 Views
Last Modified: 2013-06-16
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
Comment
Question by:adimit19
  • 5
  • 2
7 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39235309
Can you change the application?

How is the application calling the reports?

Any idea what version of Crystal?

mlmcc
0
 

Author Comment

by:adimit19
ID: 39235386
opening of report:
crv.ShowCloseButton = true;
                crv.Visible = true;
                crv.BringToFront();

                crv.ReportSource = rptSecur03;
0
 

Author Comment

by:adimit19
ID: 39235415
private CrystalDecisions.Windows.Forms.CrystalReportViewer crv;
private CrystalDecisions.CrystalReports.Engine.ReportDocument rptSecur03;
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 101

Expert Comment

by:mlmcc
ID: 39235417
How do you close the report viewer?

How do you assign the report file to the viewer?

mlmcc
0
 

Author Comment

by:adimit19
ID: 39235541
I was hoping this forum would tell me how to close the reportviewer. THe report file code is already attached -- crv.ReportSource = rptSecur03;.
0
 

Accepted Solution

by:
adimit19 earned 0 total points
ID: 39237937
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
 

Author Closing Comment

by:adimit19
ID: 39251046
the code works in eliminating the error
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question