Solved

Crystal Report Problem

Posted on 2013-12-03
5
363 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
  • 3
  • 2
5 Comments
 
LVL 100

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 100

Expert Comment

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

mlmcc
0
 
LVL 100

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now