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,130 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 100

Expert Comment

by:mlmcc
Comment Utility
Can you change the application?

How is the application calling the reports?

Any idea what version of Crystal?

mlmcc
0
 

Author Comment

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

                crv.ReportSource = rptSecur03;
0
 

Author Comment

by:adimit19
Comment Utility
private CrystalDecisions.Windows.Forms.CrystalReportViewer crv;
private CrystalDecisions.CrystalReports.Engine.ReportDocument rptSecur03;
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
How do you close the report viewer?

How do you assign the report file to the viewer?

mlmcc
0
 

Author Comment

by:adimit19
Comment Utility
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
Comment Utility
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
Comment Utility
the code works in eliminating the error
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now