Correct way to dispose of the Crystal Viewer

Hello
i have noticed that the Viewer is not cleaning itself up correct when you close a form, i have also been able to replicate the issue within the following code:
Public Class Form1
    Private _crystalReportsControl As CrystalDecisions.Windows.Forms.CrystalReportViewer
    Private Sub ButtonCreate_Click(sender As System.Object, e As System.EventArgs) Handles ButtonCreate.Click
        _crystalReportsControl = New CrystalDecisions.Windows.Forms.CrystalReportViewer
        _crystalReportsControl.Dock = DockStyle.Fill
        Panel1.Controls.Add(_crystalReportsControl)
    End Sub
    Private Sub ButtonDispose_Click(sender As System.Object, e As System.EventArgs) Handles ButtonDispose.Click
        Panel1.Controls.Remove(_crystalReportsControl)
        _crystalReportsControl.Dispose()
        _crystalReportsControl = Nothing
    End Sub
End Class
-- i would of used a code block however you seem to be missing one for VB
now what i would expect to happen is when the dispose button is clicked the memory usage to drop back down to what it was. now of course this wont get cleared up straight away down to the Garbage Collector deciding when it runs. however after awhile we do expect to see a drop. i have created and then disposed of the control 40 times which should cause the Garbage collector enough time to at least make some difference however the memory just keeps climbing.
now it doesn't climb the full amount each time. for example on the first load of the viewer it loads about 10MB, after that it loads a few hundred kb and clears away 8
Current Set-Up Visual Studio 2010 - CR 13.0.2000.0

See if adding CrystalReportViewer.Dispose() will help.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter

Similar Messages

  • Horrid u201Ccrash for no apparent reasonu201D in the crystal viewer

    Hi
    We have embedded the new 2010 for VS crystal viewer in our .NET 4 enterprise application.
    We are sometimes seeing this crash:
    at CrystalDecisions.Windows.Forms.PageControl.OnMouseMove(MouseEventArgs e)
       at System.Windows.Forms.Control.WmMouseMove(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.UserControl.WndProc(Message& m)
       at CrystalDecisions.Windows.Forms.PageControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
    This seems to happen if the report viewer happens to show where the mouse is and the mouse is moving. This is hard to reproduce but has happen on a number of different machines.
    We are running the Crystal viewer on a form in it own message loop with Application.Run(TheForm).
    We are running 32bit_13_0_1 crystal runtime.
    Any help appreciated.
    Regards
    Daniel Rowe

    Also note. Another user had the same issues and the cause was fixed by updating their video card drivers.
    They too were on CR SP1.
    For all those who find this post please try it first. In the Adapt and Fix in SP2 We have altered the way we render the report objects and added some changes to the order the objects are rendered but it appears the bottom line cause of this is the video card drivers not being able to keep up and throwing an exception which causes CR to crash.
    Don

  • Is there a way to automatically open the Activity Viewer & make it float?

    I just upgraded from Panther Mail, and I really miss knowing what was going on and having to constantly open the activity viewer and reordering the windows every time I do something. Is there a way to somehow make the activity viewer open with mail each time and keep it floating above the other windows (so I can have an indication of what's going on like in Panther Mail)?
    I'm afraid I'm going to shut mail down in the middle of a crucial activity. No doubt that might well be behind all the problems that develop with it over time.
    Thanks!

    I had two problems relating directly to the Tiger upgrade, one I solved with help here. That was importing saved mail that failed to be imported into one mailbox, the saved messages were showing up as IMAP messages ("haven't been downloaded from the server yet"). When both my accounts were POP, I never even had an IMAP account. I solved that and everything else with mail is fine now, except I want to see what's going on like I was able to in Panther. I especially miss not seeing outgoing mail sent progress, especially with long messages.
    The other issue was font related, and I still cannot get Fontbook to save the fonts I have disabled, so I just removed the duplicates manually (leaving the ones in the system folder as the defaults). As long as I don't open fontbook again, and it doesn't automatically re-enable the fonts, my system is fine. I will leave it alone now for a couple of years like I was able to in Panther. I have over 3000 fonts installed and available at all times which I need for my print work.
    Other than that and a 25 minute log-in time (as it reads the fonts; in Panther it was 7 minutes and I learned to live with that) everything is finally ok.
    The long log-in might also be Spotless related; I don't know enough about it to figure it out; all I know is if it is, it is a small price to pay for the way the system flies not having to index all my loaded drives all the time, not to mention the wear and tear on my drives.
    Tiger is so much faster than Panther (once I shut down Spotlight) it's like having a processor upgrade. Once you work out all the glitches, it's definitely worth the money and time put in. I was very careful with the install... counting backup time the usual precautions and updates to everything afterward (including third-party programs), it took over 30 hours.
    Thanks!

  • Values are fine on my CR developer desktop but become all zeroes when ran in the Crystal Viewer

    Post Author: RobertICBC
    CA Forum: Data Connectivity and SQL
    I am using CR v. 11.5 and have developed a report using an Oracle table as a datasource. The table is small with a lot of summary data. I have used a number of running totals for display fields. There is also a chart that displays totals over time. My problem is that the report displays all the correct values when I preview the report in the Crystal Designer but when I save it to the Crystal Server development environment and run it with the same parameters, I get zero values for all fields. The chart however appears as it does in developer. Anybody run into a similar problem.

    Post Author: yangster
    CA Forum: Data Connectivity and SQL
    are you publishing this to a bo xi r2 server?are you using the same datasource in both enviroments?do you get any results for any parameters not just the ones you've been testing with?

  • Attn - The correct way to connect to the repository

    From iFS Product Management.
    Many people appear to be having trouble connecting to the repository and are using the wrong API calls to do. The recommended API calls changed between beta and production. For the production release here is the correct way to connect:
    1. Four pieces of information are need to connect to the repository
    1. The iFS User Name
    2. The iFS User's password
    3. The properties file to be used
    4. The database password of the user who owns the iFS Schema
    This is different from the beta where the database password was hardcoded into the properties file.
    Note that any TNSNAMES information is still containing in the databaseURL entry in the properties file.
    package ifs.demo.samples;
    import oracle.ifs.beans.*;
    import oracle.ifs.common.*;
    import java.util.Locale;
    public class ConnectionTester extends Object {
    public static LibrarySession testConnection()
    throws IfsException
    LibraryService service = new LibraryService();
    CleartextCredential me = new CleartextCredential("gking","ifs");
    ConnectOptions connect = new ConnectOptions();
    connect.setLocale(Locale.getDefault());
    connect.setServiceName("IfsDefault");
    connect.setServicePassword("manager");
    return service.connect(me,connect);
    public static void main(String[] args)
    try {
    LibrarySession ifs = testConnection();
    ifs.disconnect();
    } catch (IfsException e) {
    IfsException.setVerboseMessage(true);
    e.printStackTrace();
    Note that in this example "gking" is the iFS user name, "ifs" is the gking user's ifs password. "manager" is the password of the database user who owns the iFS Schema.
    "IfsDefault" is the server properties file that describes the ifs connection. This file is in called "IfsDefault.properties" and is located in the package oracle.ifs.server.properties". This means that the folder that contains the 'oracle' folder that is the root of this package must be referenced in the class path when running this example.
    Note, if you use the older, 3 argument form of the connect you will get an unable to connect exception as the iFS will not have the Schema Password.
    null

    When I run the example below on Solaris (after setting the CLASSPATH etc., I get a oracle.ifs.common.IfsException: IFS-21008: Login Failure
    oracle.ifs.common.IfsException: IFS-10170: Invalid name/credential.
    (I am providing all 4 pieces of information for connecting)
    When using the web interface the same userid and password work fine (system/manager).
    Please help.....
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Mark_d_Drake ():
    From iFS Product Management.
    Many people appear to be having trouble connecting to the repository and are using the wrong API calls to do. The recommended API calls changed between beta and production. For the production release here is the correct way to connect:
    1. Four pieces of information are need to connect to the repository
    1. The iFS User Name
    2. The iFS User's password
    3. The properties file to be used
    4. The database password of the user who owns the iFS Schema
    This is different from the beta where the database password was hardcoded into the properties file.
    Note that any TNSNAMES information is still containing in the databaseURL entry in the properties file.
    package ifs.demo.samples;
    import oracle.ifs.beans.*;
    import oracle.ifs.common.*;
    import java.util.Locale;
    public class ConnectionTester extends Object {
    public static LibrarySession testConnection()
    throws IfsException
    LibraryService service = new LibraryService();
    CleartextCredential me = new CleartextCredential("gking","ifs");
    ConnectOptions connect = new ConnectOptions();
    connect.setLocale(Locale.getDefault());
    connect.setServiceName("IfsDefault");
    connect.setServicePassword("manager");
    return service.connect(me,connect);
    public static void main(String[] args)
    try {
    LibrarySession ifs = testConnection();
    ifs.disconnect();
    } catch (IfsException e) {
    IfsException.setVerboseMessage(true);
    e.printStackTrace();
    Note that in this example "gking" is the iFS user name, "ifs" is the gking user's ifs password. "manager" is the password of the database user who owns the iFS Schema.
    "IfsDefault" is the server properties file that describes the ifs connection. This file is in called "IfsDefault.properties" and is located in the package oracle.ifs.server.properties". This means that the folder that contains the 'oracle' folder that is the root of this package must be referenced in the class path when running this example.
    Note, if you use the older, 3 argument form of the connect you will get an unable to connect exception as the iFS will not have the Schema Password.<HR></BLOCKQUOTE>
    null

  • Problem with the crystal viewer

    Hi there,
    I have a problem with thw crystal viewer. I have reports developped in Crystal XI that run in vb.net within the "CrystalDecision.Windows.Forms.CrystalReportViewer" object. On all computer client everything works fin except on one of them. When the print button is pressed, it gave a "Object reference not set to an instance of an object" error. Since this error is raised by the "Crystal report windows form viewer" preview window i have no idea why this occured. We tried to uninstall the viewer and reinstall it without chance.
    The only thing i can tell is that this client use a "HP deskjet 3420 series" printer. that's the only difference there is on this computer. Anyone as an idea?
    Thanks
    Ben

    Hi Ben,
    Try moving that printer to another PC and install the print driver. If it fails there it's likely a driver issue. HP and Cr has a history of problems. Mostly it's HP drivers returning the wrong memory structure size.
    If you can find someone who is using Windows XP and Windows 2003 and see if either work. Or possibly plug the printer ina print server and see if that works.
    Next option is if you wrote the software you are running run it in debug mode and see if it captures anything when printing. If did not write it then ask the person who did to test it also.
    Next option if you want to dig deeper into the cause is go to Windows site and download a program called DebugDiag. Run this program and set it to capture crashes. It will generate a dump file which can be analyzed. It should tell you which API or function caused the crash.
    Thank you
    Don

  • What is the correct way to dynamically change the View?

    hi @,
    In my application I have a radiobuttonbyKey UI element and based upon the key I have to hide and/or show a particular UI combination placed in the group UI element basically dynamicallly modifying the view.
    I have 2 option one on radio button action I will change the visibilkity property of the group or in the wdModifyView method of the View.
    I want to know which is the best way in such situation as per MVC concepts to dynamically modify view in UI action or in wdModifyView method.
    Regards,
    Amit

    I would just bind the "visible"-property of the Group to a context attribute (DDIC type "Visibility") and set the value of that attribute from the onSelect-handler of the drop-down list. No need for code in wdDoModifyView().
    Armin

  • Is there a way to default to the ABC view within bookmark folders?

    Just upgraded to Firefox 8. Also just transferred all my bookmarks from Delicious to Firefox bookmarks. Love most aspects of the system but when I open a bookmark folder/subfolder the bookmakrs are displayed in 'date bookmarked' order. I prefer alphabet order as it is much easier to look things up. I have tried using the 'view' menu to reorganise but every time the folders default to 'date order' after I've switched off and restarted my laptop. Is there a way to 'save' the alphabet order? (I am using Windows 7 on a Compaq laptop)

    '''''@moth2fic'''''
    Well to sort bookmarks alphabetically I still use the easy solution :
    Click on your bookmarks tab & scroll down to the folder you want to sort & right click on that folder name & when the little menu comes up just scroll down to "Sort By Name" & left click on that and that's it they are sorted alphabetically..
    If you want to alphabetically sort the entire list of bookmarks just scroll all the way down to the bottom of the bookmarks list & in any open area just do the right click/ sort by name/ left click thing again & it will sort the entire bookmark list alphabetically...
    Hope I understood your question correctly..

  • Using the Crystal Viewer RDC with a business view report

    Hi
    Ive mananged to get the viewer working with crystal xi rpt files thru an odbc link to a sql database.
    However I want to deploy the viewer for reports that use a business view.  When I do this I get the invalid tlv record.
    Is it possible to use the viewer in this way.
    Thanks

    Sorry there is no integration between the RDC and Business Views.
    Since the RDC has been depricated in CR2008 this will not be availble in the future either.
    Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/robhorne</a>

  • What is the correct way of quieting down the CPU fan?

    Hello,
    Let me first ask for recomendations on an aftermarket CPU Heatsink and Fan to replace the stock one on my AMD x4 965 Black edition CPU please, My profile on this forum has my computers equipment and case etc.  But if you need more info please just ask..
    Would somebody please give me instructions on how to make the stock CPU cooling fan run at a more appropriate RPM when at idle and or when running with a load on it please.
    The stock CPU cooling fan usually runs up there at about 5,000 to 5,500 CPM even when at idle and it's seriously insanely loud, too loud to be sitting next to it and trying to concentrate on work or even playing a game.
    I've been loading up the Overclockers Center program and choosing the default profile since that seems to have the CPU fan set to around 3500 RPM which produces an acceptable noise level for the fan.  But I figure that having to load up Overclockers Center program and choosing a profile each time I load my computer is probably not the way I should be doing it, so if somebody wouldn't mind, please explain what I need to set in the Bios or elsewhere so that the CPU cooling fan is not blowing my head off with noise all the time.
    Thanks

    Hello
    1-This mobo is strong enough to support such a heavy coolers.Now i have i installed TUNIQ TOWER EXTREM( because of porformance/price here) that is as heavy as v8. although the company dosnt gauranty the failure but it works very well on my case and i rotate and opening the case  many times for some experiments!!
    2- ZALMAN is a famous cooler producer.I said the rules for choosing a cooler . You can buy one of them .The reviews on net can help you for best choise.BUt v8 is a good proven cooler because the more surface that has and material and big fan.although i didnt have another choice in IRAN.You may find so better coolers.
    the fluid mechanic rules say that the surface-material-shape of heat sinks and temperature-velocity-amount of air that moves on the heat sinks are the parameters of a heat sink.
    i have a bad experience.In my old case with P4 3 GHZ i bought a good cooler from THERMALTAKE .But the fans is rotating very much and made noise. There was some truth that i didnt mentioned.
    The cpu is produce a lot of heat ( more than phenom) and  the fan is 10 cmm i think . I replaced the fan with a 12 cmm fan but the system in loads crashed. The heat sink designed for such a fan and it must rotate very much to cool cpu .12 cm fans cant go beyond 2000 rpm i think and this amount of air wasnt enough for cooling.
    3- you have a lot of wind in your case!!. I dont know that greater fan than 12 cm is safe because they use more current .But 8 and 12 cm fans works very well with onboard ports and SPEEDFAN program.
    After all cooling and making the pc make less noise is a long story .You must have a target . There is a limit that you cant go beyond that so i think you must have a plan and use your money and time on it.
    For my new system i had a dream: most powerful-silent-upgradable system so i choosed these parts:
    POWER=CM SILENT PRO- for the design and big fan that they have.
    CPU=ATHLON II 635 -I knew that phenom is very powerful but make more heat so i used this cpu and have plan for upgrading with a 6 core cpu.
    VGA= 1-GIGABYTE 9800GT SILENT
             2-ZOTAC 9800GT SYNERGY
    choosing a gpu was very hard. 9800gt silent was the most powerful silent cpu that i could buy. but for future i bought a zotac. because it has a single cooler and dosnt occupy a PCI slot that i need.
    you may say why you dont buy another 9800 silent? because this card is warm in loads and i had a fear two of them in a case may harm them. I count on HYBRID SLI technology that could shut down the second card but it is not working and i am a little disappoint .
    two 9800gt in sli have as power as a GTS 270 in reviews.
    CPU COOLER=TUNIQ TOWER EXTREM- According to my counts cooler was silent in ideal but in loads it was noisy so i replaced that
    MOBO=NF980-G65-It uses the last chipset from nvidia with sli enabled and ddr3 and phenomii x6 support. (The mobo is hot. According to some reviews it is cooler than AMD chipset motherboards and faster but i hope it was cooler)
    Good luck

  • Any way I can change the Grid view background back to black...

    I really dislike the white/greyish color....

    100% in agreement here: a b/w slider as in iPhoto would be the best option. It's much more jarring to scroll through my albums now, whereas it was a pleasure before.
    And am I crazy, or did there used to be a slider to choose the album cover art size as well? How on earth could removing that slider be a good thing?

  • What is the Text Book correct way to do a spot uv merging multiple applications and exporting from 1

    I am unsuccesssfully finishing a project using Spot UV and about to start another.  I want to start this one out the Text Book correct way.  Here are the details.
    I have logo's coming from Illustrator that I want to have a spot UV on
    I have photos coming from photoshop that I want a spot UV on
    I have a design element in In Design that I want a spot UV on
    What is the Correct way to get everything into In Design have it output to a PDF that a printer could use and a second one that I could use for the Web that does not show the spot uv
    A note is that the last project I followed all the tutorials on the web that say to use channels in photoshop to make my spot UV that in the end I think is causing me a lot of headaces right now. 
    Thanks in advance

    Put the spot UV on its own layer in InDesign. Turn it off for the web version of the PDF.
    Bob

  • What is the correct way to upgrade 5.0.4 to 5.1 Universal?

    I just received Final Cut Studio Universal, and I have Final Cut Pro 5.0.4 installed what is the correct way to upgrade all the Final Cut Studio applications? Do install over or delete each application and then reinstall?
    As always thanks in advance for reading and replying to my Post,
    Sebastian

    WHEN I do it, I'm going to archive what's necessary and desirable to keep, erase my hard drive, reinstall Tiger, do the upgrades, then install 5.1 clean and do the upgrades.
    Might sound like overkill, but I really love a clean, fast machine and nothing does it better!

  • Crystal Reports are not centered when viewing on Crystal Viewer

    Hi
    I´d like to ask you if you reported some problem of using subreports and during the visualization from the Crystal Viewer the main report and of course the subreports are not centered. I´m running Vs.Net 2005 with CR 10.
    The main report and subreports access ADO.NET. Only one parameter is passed by the user. If we test the application and address the visualization to the crystal report viewer it is showed on right side even using DisplayGroupTree = False. But if we export the report to PDF it is showed centered. Is it a way to fix this one?
    Any advice or suggestions?
    Tks,
    Isocler

    When you say you're using v10 with VS2005, do you mean the full CR v10 product or the version that comes with VS.NET 2005 (version 10.2)?  Make sure you're using/referencing the 10.2.* CR assemblies in your project, as the 10.0.* are not supported.
    If you have the correct assemblies referenced, then make sure you have the latest patches applied.  I think there may have been a fix for DIV tags.
    -MJ

  • Inconsistency and problems printing with Crystal Viewer

    I'm printing from the Crystal Viewer based on the Crystal Reports Runtime 11.5 (R2) distribution.   the viewer is being instantiated from a .NET web application.   the report has been developed in Visual Studio 2005.
    when I print from my development computer (with VS designer plug-in) the output to the printer is as expected.   however, when printing from any of my production client machines (no designer installed) the output is offset and any text at the top of the report is cropped such that only the lower half of the text is printed.    in either case the output is rendered correctly in the viewer prior to sending it to the printer.   
    the printer is being served from a central network server, hence the driver is the same regardless of the client machine.   I'm thinking there must be a difference in the CR components in either environment.  
    note I've also tried printing a test using other applications and no problem exists, only when printing from the CR viewer.
    any info would be much appreciated.
    vaderr.

    May be that the worker process is not seeing the printer driver the report wants to use, so another printer driver is substituted. One way to test this is to insert these lines of code;
    Dim myPrinter As String
    For Each myPrinter In System.Drawing.Printing.PrinterSettings.InstalledPrinters
        Response.Write(myPrinter)
        Response.Write("<BR>")
    Next
    Is the printer driver you are trying to use visible to the process?
    Another thing to try is to set the option "No Printer" (File | Page Setup).
    Ludek

Maybe you are looking for

  • How to attachm a pdf document in sales order in background

    Hello All, I need to attach a pdf document in sales order in background. Can anyone guide me on this? Thanks, Thiyagu

  • IPod not showing up in iTunes source list

    Hi, My fifth gen iPod is not showing up in the iTunes source list. I've tried the troubleshooting recommendations (unistall and then reinstall iTunes, delete the iPod/bin file and then update iPod software, etc.) The only one I have not tried is rest

  • Process Order for Job work

    Hi, Scenarion is client will get raw materials from customer, process and send them back, These materials are defined as Non Vluated materials, What are the settings to be done for the Process order created for this  regarding availablity chk ?

  • Resource consumption in different bucket

    Hi all, we have some planned orders which are created by optimizer and they have start date and end date are in different bucket then the total resource consumption is showed in the bucket where start date of the order fall. that means actually there

  • Quantity  mask

    Hello... In a editable field on ALV I can insert a quantity of PO item...  The filed mas is X,XXX (in ALV). I use the method ref_grid->check_changed_data to come back the informations of ALV report. But, when the quantity back the SAP change the numb