?
Solved

Crystal Report Problem

Posted on 2013-12-03
5
Medium Priority
?
372 Views
Last Modified: 2013-12-29
Dear All

i have a visual studio 2010 project in asp.net and there is a section for reports

my problem that when we run the report few times after that it will not work at all unless we restart the Application pool of the application

my crystal report are version :13.0.2000.0(as in web.config )

i make sure that all the connection with data base are open and close correctly

Please help
0
Comment
Question by:Kamal Khaleefa
[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
  • 3
  • 2
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39692418
Each time a report is run, you use a report connection.  Most systems are limited in the number of simultaneous connections.  When you close a report through the viewer, sometimes the report doesn't release the connection for up to 15 minutes.
 DO you close and dispose of the report objects?
If not you may be running out of connections.

Does closing the application and waiting 15 minutes allow you to rerun the application then run reports?

mlmcc
0
 
LVL 16

Accepted Solution

by:
Kamal Khaleefa earned 0 total points
ID: 39705763
im only diposing the connection with the data base.

here is a small code in general

  Dim cryRpt As New ReportDocument


            Dim FileName As String
            FileName = MapPath("crpMyReport.rpt")
            cryRpt.Load(FileName)


            Dim crtable As Table

            Dim crtablelogoninfo As TableLogOnInfo

            For Each crtable In cryRpt.Database.Tables
                crtablelogoninfo = crtable.LogOnInfo
                crtablelogoninfo.ConnectionInfo = cnnInfo
                crtable.ApplyLogOnInfo(crtablelogoninfo)

            Next

  Dim crParameterDiscreteValue As ParameterDiscreteValue
            Dim crParameterFieldDefinitions As ParameterFieldDefinitions
            Dim crParameterFieldLocation As ParameterFieldDefinition
            Dim crParameterValues As ParameterValues

            crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields
   crParameterFieldLocation = crParameterFieldDefinitions.Item("Date_From")
            crParameterValues = crParameterFieldLocation.CurrentValues
            crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue

            If Session("txtFrom") Is Nothing Then

                crParameterDiscreteValue.Value = Date.Today.AddYears(-10)
            Else

                crParameterDiscreteValue.Value = CDate(Session("txtFrom") + " 00:00:00.0")
            End If
            crParameterValues.Add(crParameterDiscreteValue)
            crParameterFieldLocation.ApplyCurrentValues(crParameterValues)

            CrystalReportViewer1.ReportSource = cryRpt

            CrystalReportViewer1.DataBind()

Open in new window

0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39706059
AT a minimum you have to dispose of the cryRpt object.

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39739565
Did you try disposing of the report objects?

You can't dispose of the report connection since that is internal to the report

You also didn't address my question of waiting after closing the application.

I recently was at a client where they had an issue with running out of licenses to run reports.
It turns out I wasn't logging out of the CMC (just closed IE or the page) so the connection (license) was retained.  WHen I looked it showed i (adminisstrator) was using 4 of the 5 licenses.  As soon as I logged out they freed up.

mlmcc
0
 
LVL 16

Author Closing Comment

by:Kamal Khaleefa
ID: 39744517
i didnt get the needed answer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

765 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