Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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,351 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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!

 
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

Technology Partners: 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!

Question has a verified solution.

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

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

670 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