Solved

Crystal Viewer Timeout

Posted on 2011-02-25
9
895 Views
Last Modified: 2012-05-11
On my web site my Crystal report viewer on "drill-down" reports is timing out after about 80 - 90 seconds.

Any ideas?
0
Comment
Question by:lrbrister
  • 5
  • 4
9 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 34980173
What viewer are you using?

Most viewers con't have a timeout but the connection to the database might.

mlmcc
0
 

Author Comment

by:lrbrister
ID: 34980278
VB Code attached
IIS Is set to 12,000 seconds timeout

These app keys are in the web.config
        <add key="CrystalImageCleaner-AutoStart" value="true"/>
        <add key="CrystalImageCleaner-Sleep" value="240000"/>
        <add key="CrystalImageCleaner-Age" value="240000"/>

This is the code for the viewer

HTML
<%@ Register Assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

<div>
        <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true"
            ReportSourceID="CrystalReportSource1" ToolPanelWidth="1px" />
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
        </CR:CrystalReportSource>
    </div>
Public Sub getReport()
        Try
            _rpt = Request.QueryString("rpt")
            _id = Request.QueryString("id")

            Dim objConn1 As New SqlConnection
            Dim oCom As New SqlCommand
            Dim dr As SqlDataReader

            objConn1.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("ConnPortal")
            oCom.Connection = objConn1
            objConn1.Open()
            oCom.CommandText = "sp_portal_CrystalReportUserAccessGet"
            oCom.CommandType = CommandType.StoredProcedure
            oCom.Parameters.Add(New SqlParameter("@userName", SqlDbType.NVarChar)).Value = Session("userName")
            oCom.Parameters.Add(New SqlParameter("@reportId", SqlDbType.Int)).Value = _id
            dr = oCom.ExecuteReader

            If dr.Read Then
                If Session("userName") = dr("username") And _rpt = dr("reportName") Then
                    CrystalReportSource1.Report.FileName = "~/reportsCrystal/" & _rpt
                    lblError.Text = ""
                Else
                    lblError.Text = "Report access = 'NONE'"
                End If
            Else
                lblError.Text = "Report access = 'NONE'"
            End If
            objConn1.Close()
        Catch ex As Exception
            lblError.Text = ex.Message
        End Try
    End Sub

Open in new window

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34980774
WHen are you getting the timeout?

When you first display the report or on drill-down?

mlmcc
0
 

Author Comment

by:lrbrister
ID: 34980939
mlmcc:
It is after the report loads...and then sits without interraction for 60-80 seconds.

After that...when clicking on the report drill down it errors out
0
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

 
LVL 100

Expert Comment

by:mlmcc
ID: 34981134
I don't know this for sure but a drill-down may use the postback and you may be losing the session variables like username and reportname

mlmcc
0
 

Author Comment

by:lrbrister
ID: 34981178
mlmcc:
I was thinking that myself...but the session timeouts on the server are huge, as thery are in my Web.Config...and the ReportName is called in the Request.QueryString

Web.Config
<httpRuntime maxRequestLength="999999" executionTimeout="21000"/>
<sessionState timeout="180"/>

URL
http://portal/reportsCrystal.aspx?rpt=rpS_SalesActivityRev.rpt&id=9
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34982511
Can you navigate from page to page?

mlmcc
0
 

Accepted Solution

by:
lrbrister earned 0 total points
ID: 35000051
CrystalReportViewer1.ViewTimeSelectionFormula=""
0
 

Author Closing Comment

by:lrbrister
ID: 35042629
Found own solution
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

19 Experts available now in Live!

Get 1:1 Help Now