Skip to Content
0
Former Member
Jan 29, 2009 at 03:15 PM

Load Testing issue

42 Views

I am baffled by the response time from the Crystal Reports Viewer after 30-40 concurrent users. Here is the stats about after running a load test to the pages:

Transaction Name Minimum Average Maximum Std. Deviation 90 Percent Pass Fail Stop

viewreport.aspx_2_Action_127 1.313 57.195 161.788 31.819 101.385 161 47 0

viewreport.aspx_3_Action_182 1.157 56.461 135.439 34.388 109.71 131 30 0

viewreport.aspx_4_Action_237 1.907 49.908 142.735 36.867 110.039 114 17 0

viewreport.aspx_Action_72 1.875 76.426 168.074 38.239 129.755 208 149 0

If you notice the minimum is a very good to start but as the users increase more than a 2 minute response time is reach. I need a real expert on this issues. I will call Business Objects if a proper response is not posted.

I need more information how to tweak, fix and maintain the same performance as the first login.

My current environment is:

Visual Studio 2005

Oracle 9.2

Crystal Viewer 11.5.3700.0

ASP.NET VB

Crystal Reports 11.5.3700.0

Current object for Crystal Viewer is:

<CR:CrystalReportViewer BackColor="White" ID="CRViewer" runat="server" AutoDataBind="true" EnableParameterPrompt="True"

DisplayGroupTree="False" EnableDatabaseLogonPrompt="True" HasCrystalLogo="False" HasViewList="False" HasToggleGroupTreeButton="false"

BorderStyle="Solid" BorderWidth="1" BorderColor="darkgray" ReuseParameterValuesOnRefresh="True" Width="925px" BestFitPage="True"

DisplayBottomToolbar="False" ReportSourceID="CrystalReportSource" />

<CR:CrystalReportSource ID="CrystalReportSource" runat="server">

</CR:CrystalReportSource>

Back end code:

Imports System.Xml

Imports System.data

Imports System.IO

Imports System.Text

Imports System.Configuration

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared

Partial Public Class viewreport

Inherits System.Web.UI.Page

Private _dsContacts As DataSet

Dim strUser, strReport, strPeriod, strRegionType, strRegion, strDate, strUnit, reportPath As String

Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

Try

reportPath = Server.MapPath("Reports/" & Request.QueryString("strReport"))

If Not Page.IsPostBack Then

If Not Page.User.Identity.IsAuthenticated Then

Response.Redirect("default.aspx")

End If

strUser = Request.QueryString("strUser")

strReport = Request.QueryString("strReport")

strPeriod = Request.QueryString("strPeriod")

strRegionType = Request.QueryString("strRegionType")

strRegion = Request.QueryString("strRegion")

strDate = Request.QueryString("strDate")

strUnit = Request.QueryString("strUnit")

If strUser <> "" And strReport <> "" Then

CrystalReportSource.Report.FileName = reportPath

ConfigureCrystalReports()

Else

lblMessage.Text = "<h1>Values for the report where not received properly.</h1><br /><br /><h2>" & strReport & "</h2><br /><br />Please contact your Commissions Reporting Administrator<br /><br />"

End If

End If

If File.Exists(reportPath) Then

CrystalReportSource.Report.FileName = reportPath

End If

Catch ex As Exception

ErrorRoutine(ex, "Page_Load")

End Try

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

GlobalCode.DisplayTitle("MetLife - Commissions Administration - Report Viewer", Page)

If Not Page.IsPostBack Then

GlobalCode.CreateLog(0, Master, Replace(Page.AppRelativeVirtualPath, "~/", ""))

End If

End Sub

Private Sub ConfigureCrystalReports()

Try

Dim i, j As Integer

Dim ParameterValue As String

_dsContacts = Nothing

_dsContacts = New DataSet

_dsContacts.ReadXml(Server.MapPath("XML\ReportFiles.xml"))

For i = 0 To _dsContacts.Tables(0).Rows.Count - 1

If Trim(UCase(_dsContacts.Tables(0).Rows(i)("FileName").ToString)) = Trim(UCase(strReport)) Then

Dim conn As ConnectionInfo = New ConnectionInfo()

If Not File.Exists(reportPath) Then

lblMessage.Text = "<h1>Report is not available.</h1><br /><br /><h2>" & reportPath & "</h2><br /><br />Please contact your Commissions Reporting Administrator<br /><br />"

Exit Sub

End If

ParameterValue = ""

CRViewer.ReportSource = reportPath

CrystalReportSource.Report.FileName = reportPath

CRViewer.HasToggleGroupTreeButton = False

conn.DatabaseName = _dsContacts.Tables(0).Rows(i)("Database").ToString

conn.UserID = _dsContacts.Tables(0).Rows(i)("UserID").ToString

conn.Password = _dsContacts.Tables(0).Rows(i)("Password").ToString

For Each cnInfo As TableLogOnInfo In CRViewer.LogOnInfo

cnInfo.ConnectionInfo = conn

Next

CRViewer.ParameterFieldInfo.Clear()

Dim ParamFields As ParameterFields = CRViewer.ParameterFieldInfo

Dim reportSeparation As New ReportDocument()

reportSeparation.Load(reportPath)

For j = 0 To reportSeparation.ParameterFields.Count - 1

Dim param As New ParameterField

param.Name = reportSeparation.ParameterFields.Item(j).Name

Select Case param.Name

Case "VRPTTYPE"

ParameterValue = strRegionType

Case "VPARAM"

ParameterValue = strRegion

Case "VUSER"

ParameterValue = strUser

Case "VDATE"

ParameterValue = strDate

Case "VUNIT"

ParameterValue = strUnit

Case "VPERIOD"

ParameterValue = strPeriod

Case Else

lblMessage.Text = "<h1>Report has parameters not expected.</h1><br /><br /><h2>" & reportPath & "</h2><br /><br />Please contact your Commissions Reporting Administrator<br /><br />"

Exit Sub

End Select

Dim param_Value As New ParameterDiscreteValue

param_Value.Value = ParameterValue

param.CurrentValues.Add(param_Value)

ParamFields.Add(param)

Next '

CRViewer.RefreshReport()

CRViewer.Dispose()

CRViewer = Nothing

reportSeparation.Close()

reportSeparation.Dispose()

reportSeparation = Nothing

_dsContacts.Dispose()

_dsContacts = Nothing

Exit Sub

End If

Next

Catch ex As Exception

ErrorRoutine(ex, "ConfigureCrystalReports")

End Try

End Sub

Public Sub ErrorRoutine(ByVal ex As Exception, ByVal Routine As String)

GlobalCode.ErrorRoutine(ex, Routine, Master)

End Sub

Private Sub CRViewer_Error(ByVal source As Object, ByVal e As CrystalDecisions.Web.ErrorEventArgs) Handles CRViewer.Error

'Do nothing

If Not File.Exists(reportpath) Then

lblMessage.Text = "<h1>Report is not available.</h1><br /><br /><h2>" & reportPath & "</h2><br /><br />Please contact your Commissions Reporting Administrator<br /><br />"

Else

lblMessage.Text = "<h1>An error has occurred!</h1><h2>Please try again at a later time!</h2><br />" & e.ErrorMessage

End If

CRViewer.Visible = False

e.Handled = True

End Sub

End Class