Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Crystal Report Problem

Posted on 2013-12-03
5
Medium Priority
?
374 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

650 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