Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2005

    Unhappy Unanswered: Delay viewing report. Crystal Reports RAS 10. Datasource changed at runtime.

    Product : RAS
    Version : CR advanced
    Database: ORACLE 9, OLE DB
    Programming language: ASP
    Issue: Webreporting

    I don't have any error. However, i'm experiencing DELAYS when viewing reports with RAS10 (From 1 min 30 to 3 or 5 minutes!). Surprisingly, i own a IBM Server equipped with 1 Go RAM and i run my reports on the web locally, accessing to a local Oracle 9 database.

    The reports have been designed on another computer (named 'CALLISTO') with is not on our network, so i have to modify connection parameters. That's what i did starting from the interactiveViewer.asp file, using the crystal decision knowledge base :
    after having openned the report, i set database location :
    crReportClientDocument.DatabaseController.SetTable LocationByServerDatabaseName("TableAlias", "ServerName", "", "UserName", "Password") for each table in report.
    All is working correctly but as i said before, it is long. Moreover, we analyzed network frames using the network analyzer 'Ethereal' and we saw that as soon as the command Report.Open "foo.rpt" is executed, 3 frames occur on the network, looking for the original computer 'CALLISTO'. After a timeout delay, the execution of the ASP script seems to continue on, and works perfectly.

    Is there a way to avoid the research of this original computer(thus avoiding to wait for a timeout), or more generally, is there a way to speed-up the report viewing process? (see my code below)

    I thank you in advance for answering me if i could solve this by :
    a) changing something when creating the RPTs
    b) setting an option in ASP code.

    Sub ModifyReportConnection(dbSource, login, pwd)
       On Error Resume Next
       If clientDoc.Database.Tables.Count>0 Then
           For i=0 To clientDoc.Database.Tables.Count-1
               clientDoc.DatabaseController.SetTableLocationByServerDatabaseName clientDoc.Database.Tables.Item(i).Alias, dbSource, , login, pwd
       End If
       Set subReportNames = clientDoc.SubReportController.QuerySubreportNames
       For each subName in subReportnames
           Set subTables = clientDoc.SubReportController.GetSubreportDatabase(subName).Tables
           For each subTable in subTables
               Set table_new = subTable.Clone
               'Response.Write "SubTable: " & subTable.Name & " " & newSubTable.QualifiedName
               table_new.ConnectionInfo = ci
               table_new.QualifiedName = login & "." & subTable.Name
               clientDoc.SubReportController.SetTableLocation subName, subTable, table_new
       'auto DB logon
       clientDoc.DatabaseController.logon login, pwd
       'Error Message
       If Err.Number<>0 Then
           Response.Write    "There was an error.<br>"
           Response.Write  "<font face=""Verdana"" color=#aa9999 size=""-1"">" & L_DB_CONNECTED & "'" & dbSource & "'. " &_
                           "<a href=""interactiveViewer.asp?sess=abandon&ReportName=" & Request.QueryString.Item("ReportName") & """>" & L_DISCONNECT & "</a></font>"
       End If
    End Sub
    Dim theReportName
    theReportName = Request.Form("ReportName")
    if theReportName = "" then theReportName = Request.QueryString("ReportName")
    if checkFolder(theReportName)<>0 Then
       Dim objectFactory
       Set objectFactory = CreateObject("CrystalReports10.ObjectFactory.1") '"CrystalReports.ObjectFactory.2"
       Response.ExpiresAbsolute = Now() - 1
       Dim viewer
       Set viewer = objectFactory.CreateObject("CrystalReports.CrystalReportInteractiveViewer")
       viewer.Name = "page"
       viewer.IsOwnForm = true
       viewer.IsOwnPage = true
       viewer.URI = "interactiveViewer.asp?ReportName=" + Server.URLEncode(theReportName)
       Dim clientDoc
       Set clientDoc = objectFactory.CreateObject("CrystalClientDoc.ReportClientDocument")
       clientDoc.Open theReportName
       Const crConnectionInfoKindCRQE = 5
       ModifyReportConnection "MyServerName", "MyUserName", "MyPassword"
       viewer.ReportSource = clientDoc.ReportSource
       Dim BooleanSearchControl
       Set BooleanSearchControl = objectFactory.CreateObject("CrystalReports.BooleanSearchControl")
       BooleanSearchControl.ReportDocument = clientDoc
       viewer.BooleanSearchControl = BooleanSearchControl
       viewer.ProcessHttpRequest Request, Response, Session
       ' ReportClientDocument will be automatically closed when clientDoc is released
       Response.Redirect "../reportListing.asp" 'unauthorized access
    end if
    Last edited by anto80; 01-14-05 at 04:48.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts