Opening multiple reports in Crystal Reports for VS causes database connect limit to be reached.  Seems to be no way to force Crystal Reports to close database connection (other than exiting application)

I am working on upgrading an application that has been in use for many years.  The application is written in VB6 and I have been tasked with upgrading the current application to Crystal Reports for Visual Studio.  I am using Crystal Reports for VS Version 13.0.12.1494.  The system's database is a Sybase SQL Anywhere 16 database with an ODBC connection using integrated login.  Each of the reports has the database connection set up from within the report.  There is only once database server, so each of the reports are pointing to the same DB.  The database server is currently installed as a "Personal Server" with a limit of 10 connections. 
I have implemented the CR viewer as part of a COM-callable wrapper that exposes a COM interface for VB6 to interact with.  Inside of my viewer component is a Winform that embeds the Crystal's Report viewer.  The COM interface basically maps the basic Crystal apis to methods that the VB6 can call (i.e., Load Report, Set Field Text, Update SQL Query, etc).  This architecture is working as designed and the reports are displaying correctly and responding correctly to changes in queries, etc.
The issue is that after I open 9 reports, the tenth one will respond with an error indicating that the database connection limit has been reached.  The database connections used by the reports aren't released until after the application is closed.  The application is designed for a secure environment that prohibits the non-administrative user from accessing the systems desktop, so asking the user tor restart the application after 10 reports isn't a viable option.
I have checked and database connection pooling is turned off for the SQL Anywhere 16 driver.
I have been digging on this for a few days and have tried adding code in the FormClosed event to close and dispose of the Report Document as follows:
ReportDocument reportDoc= (ReportDocument) crystalReportViewer1.ReportSource;
reportDoc.Close();
reportDoc.Dispose();
GC.Collect();       // Force garbage collection on disposed items
I have also tried the following (as well as maybe 20 or so other permutations) trying to fix the issue with no success.  
ReportDocument reportDoc= (ReportDocument) crystalReportViewer1.ReportSource;
foreach (Table table in reportDoc.Database.Tables)
     table.Dispose();
crystalReportViewer1.ReportSource = null;
reportDoc.Database.Dispose();
reportDoc.Close();
reportDoc.Dispose();
reportDoc = (ReportDocument)crystalReportViewer1.ReportSource;
GC.Collect();       // Force garabe collection on disposed items
Any ideas or suggestions would be greatly appreciated.  I have been pulling my hair out on this one!

Hi Ludek,
Thanks so much for the quick reply.  Unfortunately I did not have time to work on the reporting project Friday afternoon, but did a quick test this morning with some interesting results.  I'm hoping if I describe what I'm doing, you can show me the error of my ways.  This is really my first major undertaking with Crystal Reports.
If I simply load the report, then close and dispose, I don't hit the limit of 10 files.  Note that I do not logon manually in my code as the logon parameters are all defined within the reports themselves.  The logon happens when you actually view the report.  Loading the report doesn't seem to actually log in to the DB.
What I did was create a very simple form with a single button that creates the WinForm class which contains the Crystal Viewer.  It then loads the report, sets the ReportSource property on the CrystalReportsViewer object contained in the WInForm and shows the report. The report does show correctly, until the 10 reports limit is reached.
The relevant code is shown below. More than I wanted to post, but i want to be as complete and unambiguous as possible. 
This code displays the same behavior as my earlier post (after 10 reports we are unable to create another connection to the DB).
// Initial Form that simply has a button
  public partial class SlectReport : form
        public SelectReport()
            InitializeComponent();
        private void button1_Click(object sender, EventArgs e)
            ReportDocument rd = new ReportDocument();
            ReportForm report = new ReportForm();
            try
                rd.Load(@"Test.rpt");
                report.ReportSource = rd;
                report.Show();
         catch (Exception ex)
              MessageBox.Show(ex.Message);
// The WinForm containing the Crystal Reports Viewer
    public partial class ReportForm : Form
        public ReportForm()
            InitializeComponent();
        private void Form1_Load(object sender, EventArgs e)
            this.crystalReportViewer1.RefreshReport();
            this.FormClosed += new FormClosedEventHandler(ReportForm_FormClosed);
        void ReportForm_FormClosed(object sender, FormClosedEventArgs e)
            ReportDocument rd;
            rd = (ReportDocument)crystalReportViewer1.ReportSource;
            rd.Close();
            rd.Dispose();
        public object ReportSource
            set { crystalReportViewer1.ReportSource = value; }
Again, any guidance would be greatly appreciated. 

Similar Messages

  • I have not been able to open up Lightroom on my computer for over a year now. Whenever I double click on it, this comes up - can anyone help? Problem signature:   Problem Event Name:APPCRASH   Application Name:lightroom.exe   Application Version:3.4.1.10

    I have not been able to open up Lightroom on my computer for over a year now. Whenever I double click on it, this comes up - can anyone help? Problem signature:   Problem Event Name:APPCRASH   Application Name:lightroom.exe   Application Version:3.4.1.10

    First thing to try is the latest version of Lightroom (currently 5.6). If it don't crash, then problem solved - upgrade.
    If Lr5 won't run on your machine, then Lr4 instead.
    If both Lr5 and Lr4 crash on your machine, then at least you know it's a not a Lightroom version problem but something wonked in your system.
    If you can't figure out how to resolve the crash on the system you have, then it's time for a new system (or try another converter/editor app).
    PS - A few things to try:
    * After re-installing new version, if that doesn't fix it, then get rid of all Lightroom-related data files (rename them so they can be restored), in case problem is in Lr data file.
    * Remove all non-essential hardware in case problem is hardware/driver.
    * Startup up machine with minimal software services.
    * If still no go, consider updating driver software, including mainboard drivers and/or bios firmware if need be.
    * Of course run all the system hardware and software diagnostics you can - problem could be failing disk or ram..
    * Check system event logs for any clues.
    If you don't know how to do some of these things - ask.
    Do not say "you've tried everything" unless you want a lecture - there is most definitely something you haven't tried. It's like when you can't find your car keys - you haven't looked everywhere -  there is somewhere you haven't looked!
    PS - Has Lightroom EVER worked on your machine? what's changed since then..
    Good luck,
    Rob

  • I created a new Apple ID for iCloud on my iPhone, but I can't seem to find a way to "sign out" or "log out" of that Apple ID (for iCloud) to sign in with another Apple ID. The only account login I could change was the Store. How do I "log out"

    I created a new Apple ID for iCloud on my iPhone, but I can't seem to find a way to "sign out" or "log out" of that Apple ID (for iCloud) to sign in with another Apple ID. The only account login I could change was the Store.
    How do I "log out" or "sign out" of iCloud on my iPhone? There is an option to delete the account, but I just want to log off. I want to keep the account name for future use.

    @fernandamagalhaes
    It looks like the article below has the information you are looking for.
    iCloud: Change iCloud feature settings
    http://support.apple.com/kb/PH2613
    Turn off iCloud completely
    Depending on whether you want to stop using iCloud on all or only some devices, do one or more of the following:
    On your iOS device’s Home screen, go to Settings > iCloud, then at the bottom of the screen, tap Delete Account.
    Note:   If you delete your iCloud account, iCloud will no longer back up your iOS data. You can still back up your device in iTunes (for more information, open iTunes and choose iTunes > Help). 
    On your Mac, open iCloud preferences, then click Sign Out.
    If your Mac has OS X v10.7.5 and you turn off iCloud, your calendar information and reminders aren’t stored locally in iCal. If you want to retain your calendar and reminder information, you need to back it up before turning off iCloud. For more information, see the Apple Support article iCloud: Calendar & reminder data removed from Calendar and Reminders or iCal when disabling iCloud Calendar.
    On your Windows computer, open the iCloud Control Panel, then click Sign Out.
    Note:   If you turned on automatic download of music, app, or book purchases (in iTunes preferences or in Settings on your iOS device), your iTunes purchases are still downloaded to your devices.
    Set up iCloud on your devices

  • How to set sourceURL for MS Access database in other computer?

    How to set sourceURL for MS Access database in other computer?
    getConnection("jdbc:odbc://www.micrsoft.com:9999/msaccess");
    How do you determine the port for the MS Access?
    Thank you very much.

    How to set sourceURL for MS Access database in other computer?You don't.
    How do you determine the port for the MS Access?You don't.
    Databases like Oracle and MS SQL Server have 'server' software which runs on a server computer. Requests talk to that server software. MS Access does not have a server, so there is nothing to talk to.
    You either must use a DSN or create you own server. For the DSN each client must have a mapped driver to the computer with the database. For your own server search the Sun site for JDBC drivers or use RmiJdbc (http://www.objectweb.org/)

  • What are possible causes for frequent loss of wireless mouse connectivity other than the batteries ?

    What are possible causes for frequent loss of wireless mouse connectivity other than the batteries ?

    Wi-Fi or another interference source. Try turning off the Wi-Fi and see if the problems continue. If that solves the problem, see if you can set your Wi-Fi to run in the 5 GHz range.
    Keyboard/Mouse – Troubleshooting Wireless
    WIFI AND BLUETOOTH FINALLY SOLVED, NO REALLY - YOSEMITE 10.10
    Bluetooth Wireless Problems
    Bluetooth devices become unresponsive

  • Open multiple reports in WEBI Through URL

    Hi All,
    We are working on BO XI R3.1 WebI reports. We are trying to open multiple reportparts using opendocument url. We tested with juts one report part and it worked fine, but so far, the attempt for multiple report parts using same url has never succeeded. Can anyone suggest a way to achieve this?
    Thanks in advance.

    Hello ,,
    Could you please share the full scenario...
    How exactly you are expecting. with open document syntax.
    Thanks
    Santhu.....

  • How to open multiple report windows on button click without losing session?

    Hi,
    JDev : 11.1.1.2.0
    I am trying to open multiple discoverer plus report windows using my ADF application.
    My requirement is that user has to select multiple reports from the screen and by clicking on submit button all the reports should be opened in different windows.
    1) Below link provided me the the first solution but I can't go with it because my page is jsff and in jsff it doesn't support form tag.
    http://andrejusb.blogspot.com/2007/07/opening-report-window-in-adf-faces.html
    2) RichGoButton also provide targetFrame property but there is not action property in it so I can't call backing bean method with RichGoButton
    3) I have tried to open report windows using javascript window.open with ExtendedRenderKitService but on discoverer side it giving error message that Discoverer Plus cannot attach same session to multiple request.
    4) I have created one jsp page in the same folder where my jsff is kept in my ADF application and on submit button click I have launch this jsp page using afConetxt.launchDialog and in jsp scriplet I have written response.sendRedirect to report url but here all report are getting open properly to seperate windwos but my ADF application session is getting timeout so after clicking on submit button it will automatically goes to login page it cann't stay with the current page.
    Hoe you have understnad my problem and please provide me if you know any other solution aprart from above mentioned 4 solutions
    Regards,
    DevD

    sURL is query parameter value that I want to pass on jsp page. It is used to set some value on jsp page.
    If this is not a right approach then let me know how to pass the parameter in jsp page.

  • Deploying Crystal Reports 2008 on a website other than the default website

    Hi,
    We have an ASP.NET 2003 web application using CR 2008 as reporting tool.
    To deploy the application, we are using the CR 2008 mergemodules.
    If the application is installed into the default website, this works fine, but if another website is selected, the mergemodule still installs CR 2008 to the default website.
    To overcome this problem, the crystalreportviewers12 virtual directory has to be created in the selected website.
    But if the application is installed directly into the website, and not into a virtual directory of the website, problems occur, like images not showing up.
    I would like to know if there exists documentation regarding deployment into websites, other than the default website and what configurations have to be done to make it work.
    Best regards,
    Ângelo Vilela

    See the following articles;
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0437ea8-97d2-2b10-2795-c202a76a5e80
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50aa68c0-82dd-2b10-42bf-e5502b45cd3a
    Also, the developer help files contain more info:
    https://boc.sdn.sap.com/developer/library
    Ludek
    Follow us on Twitter
    http://twitter.com/SAPCRNetSup

  • Smart tunnel used for access other than native application?

    Dear all,
    i have a question about smart tunnel. my situation is, i need to  access to the server on certain IP address that using a port (example : port 5007) that is native for the application. that application is customized application just for my company.
    Question is :
    1. can i use smart tunnel to access the application for that particular port (ex : port 5007, 8476) ?
    2. i have so many grup servers (other than group server A) with so many costumized application with native port . is there any other way for me to access to that IP without using smart tunnel? because this project requirement is
    Clientless application access using application/Agent in user's PC, such as RDP, SSH & Native Application and ohers.
    Group Server A
    IP                                     Port
    10.194.24.99
    5007, 80, 9593, 9594, 9595
    10.194.22.99
    82
    192.9.1.99
    23, 449, 8470, 8476, 9470, 9476, 992
    My ASA is 9.1.3 and my ASDM is 7.1.3
    Please kindly to help, any reponse i appreciated
    source : http://www.cisco.com/c/dam/en/us/solutions/collateral/enterprise/design-zone-security/tunnel.pdf

    See http://www.mozilla.org/projects/netlib/PortBanning.html
    * http://kb.mozillazine.org/network.security.ports.banned.override

  • Open multiples reports for the same document

    Hi,
       I created 3 PLD reports for PO, I am wondering in SDK, how can I open all 3 PLD reports when I click on the preview button for a PO document?
       Thanks
    Chris

    Hi Chris,
    You cannot. I use Crystal Reports when I need to open more then one document layout at the same time.
    Regards,
    Vítor Vieira

  • Open document to open multiple reports

    Hi
    i have created 3 Webi Reports, namely
    Report 1
    Report 2
    Report 3
    Report 1 has company and its revenue
    Report 2 has Site and its Revenue
    Report 3 has Service and its revenue
    Example :
    Report 1
    Company    Revenue
    abc            456
    adf           789
    dsd            145
    Report 2
    Site                 Revenue
    s1                  7255
    s2                  8985
    s3                  4444
    Report 3
    Services        Revenue
    sr1               10
    sr2               15
    sr3               45
    which falls under the hierarchy
    1.company -> Site
    2.company -> Service
    In Report 1 , i should have a open document link on Company object, if i click any of the company, it should ask for options to navigate either to Report 2 or Report 3 ie by SITE or SERVICE.
    Is this possible by open document functionality in Web intelligence. If so please guide step by step.
    i have tried directly creating a object with hyperlink from universe
    Case     @Prompt('Select Measure: ','A',{'Site', 'Service'},MONO,CONSTRAINED)
         When 'Site' then ="<a href='#' on.click=\"javascript:window.open('http://ptpl-vm3:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=Afkjn4VJ.qpHqciiP5iOlwE&sIDType=CUID&sType=wid&sRefresh=N&lsSEnterYear%3A="+[Year]+"')\">"+[Year]+"</a>"
         When 'Service' then ="<a href='#' on.click=\"javascript:window.open('http://ptpl-vm3:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=AdLLgIJn7XJCv85q2wVZlOo&sIDType=CUID&lsSEnterYear%3A="+[Year]+"&lsSEnterQuarter%3A="+[Quarter]+"')\">"+[Year]+"</a>"
    End
    its throwing an error on parse failed.
    and also tried in infoview, creating hyperlink
    ="<a href='#' on.click=\"javascript:Case     @Prompt('Select Measure: ','A',{'Site', 'Service'},MONO,CONSTRAINED)
         When 'Site' then
              window.open('http://ptpl-vm3:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=Afkjn4VJ.qpHqciiP5iOlwE&sIDType=CUID&sType=wid&sRefresh=N&lsSEnterYear%3A="+[Year]+"')
         When 'Service' then
              window.open('http://ptpl-vm3:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=AdLLgIJn7XJCv85q2wVZlOo&sIDType=CUID&lsSEnterYear%3A="+[Year]+"&lsSEnterQuarter%3A="+[Quarter]+"')\">"+[Year]+"
    End
    </a>"
    which is also not working.
    is there an way to create this ?
    Regards
    dineshkumar

    I'm not sure if what you're asking is possible, but perhaps this alternate design will work for your users.
    Have two additional columns. Each column will have it's own hyperlink, one column for 'By Service' one for 'By Site'. It takes up more room on the page, but from the user's perspective, they only need to click once to get to the report they want, rather than click the company, then select which report they want to see.
    Just a thought...

  • How To Place/Open Multiple Images Into Separate Layers For ONE Document?

    I've been searching for the answer for a long time so I figured that someone here has to know.  I have PS Elements 9. 
    So I would like to make GIFs and I know how to do so, the problem is placing in those tens of files in layers (it's tedious).  Is there a way to select multiple image files to place into a single document?  And for them to be place into its own layer?  I've tried dragging and selecting from the Open/Place menus (won't allow), SHIFT + Direction Key from the Open/Place menus (won't allow), tried opening them to drag on the Organizer and to drag from the Project Bin (again won't allow), and I've read tutorials where they say to use scripts and actions but I'm not sure what to download them in order for them to work and the links are broken anyway.
    An example of what I'd like to do:
    Open and place in 15+ screenshots into layers but in just one document.
    Each screenshot would be one layer in said document.
    ...rest of GIF process...
    I feel like there's an easier way to get this without placing in each one at a time.  I remember being able to do this on a old PS (though not Elements).  Thanks for any help.

    The quickest method is probably opening all images together from Full Edit:
    File >> Open
    Then navigate to the folder and use shift+click to select a block of files.
    The images will appear in the photo bin. Drag and drop each one into the main editing window and a separate layer will be created for each.

  • Is there any way to report on Custom Object 3 other than lists?

    Looks like the answer is no but just wondering if anyone has come up with a brilliant work around. I guess the only chance is with Web Services, or is Custom Object 3 the red headed step child there as well?
    I read in an earlier thread that R15 fix/patch may enable the ablity to report in analytics OD on the Custom Objects, any idea if Custom Object 3 will be included?
    I wish the documentation pointed this out somewhere! It would have been nice to know before I created the Objects funtionality!
    Live and learn...
    Dan D

    It is my understanding that the patch will be applied automatically for all customers. The patch will enable reporting on custom Objects 1, 2 & 3 and will have subject areas for Custom Object, Custom Object & Account, Custom Object & Opportunity, Custom Object & Contact, and Custom Object & Service Request.
    (That is 5 subject areas per custom object for a total of 15 new subject areas!)
    Mike L

  • Reports runs faster throuth Discoverer Server than through Application

    I try to run a report directly from the discoverer server. The report executed fine and in few seconds i get the results.
    When i try to call the same report from the BI Application through a link the report needs a lot more time to be executed. I am waitting about 10 minutes and still don't get any results.
    I am using the Discoverer 4i.
    Can anybody knows why this happens?
    Message was edited by:
    user641134

    Discoverer is available and ships as a component of Oracle Application Server. Oracle Application Server via Oracle HTTP Server provides a proxy capability to support other web servers such as Netscape iPlanet and Microsoft IIS. The proxy capability will enable client applications to directly route requests to their native web server and these then get routed to Oracle Application Server and the Oracle HTTP Server. For detailed information on support for these web servers please refer to Oracle Application Server documentation.
    Regards
    Discoverer Technical Team

  • Crystal XI Starting with a page other than "1"

    I have a crystal report that contains 2 subreports. I have set it up to number pages "N of M" using the page number special field. I would like to keep this same format, but I would like the page number to start at "13".
    Edited by: Megan5 on Jan 18, 2010 5:59 PM

    Hello Megan,
    Go into the section expert for the group that you want to base the page count on and enable reset page number after for the group footer. It would also be a good idea to enable new page after conditionally based on not(OnLastRecord) if you haven't already.
    As well it may be easier to place the formula in the Group header and in the group expert > options > options tab enable repeat group header on each page rather than have the formula in a Page Header.
    Edited by: Graham Cunningham on Jan 18, 2010 1:39 PM

Maybe you are looking for

  • In Automatic Payment Prog - MT103 Problem

    Dear Friends, I have a problem for Automatic Payment Programme, I am Using MT103 format when i run Automatic Payment Programme it is Ok everything Fine it posted correclty, when i want to create DME file through this T.Code - FBPM - it is also workin

  • Import Command background functionality

    Hello. I want to know that after Copying our custom application pages to Server why we use Import command from our machine ? What does this command do ? Regards Ajay

  • Smartform ,  PDF error

    Hi, experts I  want to send the Smartform to mail as PDF attachment. I found  the program in code gallery., it name was 'ZTEST_NREDDY_PDF_MAIL'  . I wrote my program .it was send the Smartform to mail as PDF attachment but when open the pdf file it g

  • How to create file form servlet in our virtual directory

    hi.... I want to create a file form my servlet in my virtual directory.. my directory name ia vps it cconatin vps -> WEB-INF -> classes-> servTest servTest is servlet.... and i want to create file from servTest in vps directory.. actually i am trying

  • ResourceBundle.getBundle()

    Hi, After hours of debugging I can't find the mistake I do try to load a ResourceBundle with the method ResourceBundle.getBundle( String baseName, Locale loc, ClassLoader cl );everytime I get a MissingResourceException ... The scenario : I got three