Solved

Crystal Report Problem

Posted on 2013-12-03
5
370 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

Industry Leaders: 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!

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

688 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