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
1,249 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 100

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
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!

 
LVL 100

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

751 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