Crystal Report / Subreport - Performance Issue

I am having problems with a Crystal Report / Subreport with performance. I am using Crystal Version 11, directly in Crystal Developer.  There are no other programs involved.  I am linking to a SQL Server database using ODBC.
I have narrowed the problem down to this:
The main report has 4 tables.  See diagram using the following link.   http://screencast.com/t/TA9YYlwwl7
The subreport has 1 table, this table has > 2 Million records in it.
The main report links to the subreport with one field:
Main report field SAMPLE.PATIENT = subreport field Z_RESULT_HISTORY.PHIN
When I set the subreport linking within Crystal   it automatically generates the following in the record selection for the subreport:
{Z_RESULT_HISTORY.PHIN} = {?Pm-SAMPLE.PATIENT}
The problem is that the report execution time is dependent on the field that I am using for the record selection in the main report.
Case I   works lightening fast:
There are 16 records returned on the Main Report   each one of these has about 1-5 records returned on the subreport.
{SAMPLE.PATIENT} = "MOUSEMICKEY"  and {SAMPLE.SAMPLE_NUMBER} < 200
Case II   brutally slow   there are 51 records in the main report that qualify   with a few records each in the subreport.  By  brutally slow    I mean a few minutes:
{BATCH.NAME} = "HEP_ARCH-20090420-1"
In this case, I can see in the bottom right of the Crystal Preview window, that it is reading through all 2M records in the Z_RESULT_HISTORY table
Case III   brutally slow - a couple minutes
{BATCH_OBJECTS.OBJECT_ID} = 111
This returns 1 record on the main report and 0 records on the subreport.  Yet I can see it reading through ALL 2 Million records before the report is displayed.
What I can t understand is why the field used for record selection on the MAIN report is affecting the speed of the execution of the subreport.  I need the main report to be selected by BATCH.NAME   yet I can t figure out what I can change to make the report run fast.  When I record select the main report by SAMPLE.PATIENT, I do NOT see the subreport reading all 2M reocrds - the report preview is returned in less than 1 second.
Any help would be much appreciated.

Lindell - your response was very helpful.  I was able to create a SQL Command on the subreport and change the subreport links on the main report to use the paramters in the SQL Command.  The report is now very fast - even when there are lots of detail records on the main report.  It is properly executing the query and not reading all 2M records into memory for each subreport.
I'm still totally confused as to why Crystal was misbehaving so poorly and changing how the subreport queried the database when the only change was the fields used for record selection on the main report.  It really looks like a bug to me, but maybe someone can still enlighten me.
thanks again so much.  We are in Parallel testing for a production rollout - and the users are MUCH happier now!  (which of course makes me much happier!)
Susan
PS I was not aware of the SQL Command - had never used it before.  Took me a little while to figure it out and how to do the linking - but it is very powerful.  Thanks again.

Similar Messages

  • Crystal Report 9 performance issue wehn we move old DB to new DB server

    We are using Crystal Reports 9 version, recently we move to new database server and reports data source are pointing to Old database server and old database server is no longer in the network.
    , Now we have issue with the performance, if the we call the reports from web application, it is talking long to retrieve the report at least 1 min.. , if we manually update the report data source pointing to new server and the reports are pulling in 1 second, Is there any easy solution to update all the report pointing to new server, we have 3000 reports, we can not use manual process, it will take long time and it is also issue with the future if we change the server.
    Thanks!
    Ram

    The 1 minute timeout is due to ODBC driver trying to connect, it's the default timeout you are seeing. There is not tool Cr has to migrate/update database connection info. You can develop your own though or search the web for a third party tool, I'm sure there are lots out there.

  • Crystal Reports 11g Performance Issue

    We just upgraded our database to Oracle 11g from Oracle 10g and we are having significant performance issues with Crystal Reports.
    Our DEV and TEST environments are on 11g and are very slow to connect to the database and attach to specific tables.  It is unusable.  Our PROD environment is still 10g and works fine.  
    We  have tested with both the lastest version -  Crystal Reports 2008 V1  and  Crystal Reports XI R2 SP6.  We have also tested on several different machines.
    We are using Oracle 10g ODBC drivers.
    Does anyone have any recommendations?

    You could also try our Data direct drivers we have available on our WEB site using this [link|https://smpdl.sap-ag.de/~sapidp/012002523100008666562008E/cr_datadirect53_win32.zip].
    Those drivers are the most recent and do support 11g. It also has a wired driver that doesn't require the client to be installed.
    Also, highly recommended that when you do update the Oracle client to uninstall 10 first. There have been issues with CR and Oracle mixing the Oracle dependencies and causing problems.
    Thank you
    Don

  • Sap Crystal Reports 2013 Performance Issues

    Hi,
    We are planing to do the report migration to sap crystal report 2013. now we have crystal report xi Developer licensed version and we download the 30 days evaluation(trial) version of sap crystal report 2013 only for testing. we have 1 report that created in crystal report xi version it runs within 5 mins for 2 lakhs records and same report we are testing on sap crystal report 2013 evaluation(trial) version with same connection and same report parameters it took 10 mins for 2 lakhs records.every report take more time in sap crystal report 2013 evaluation(trial) version as compared to crystal report xi Developer licensed version.
    Why this happened? is it issue of evaluation(trial) version of sap crystal report 2013?
    Kind Regards,
    Ganesh

    Hi Jamie,
    what database are you using?
    Oracle
    what specific db version?
    Oracle  11g
    what connection method?
    Oracle Server
    Above same thing we r using for crystal report xi licensed version and sap crystal report 2013 evaluation(trial) version but now issues is that report takes 45 min in sap crystal report 2013 evaluation(trial) version for 2 lac records,but same report takes only 5 min to run in crystal report xi licensed version. is this issue of licensed bcoz now we are run report on sap crystal report 2013 evaluation(trial) version.

  • How should I report forum performance issues?

    The forums rely heavily on the caching features of browsers to improve the speed of page rendering. Performance of these forums should greatly improve after a few pages because more and more of the images, css and javascript is cached in the browser. As a consequence, when reporting forums performance issues the report should include some information on the state of the browser cache to determine whether the issue is a browser issue or a server issue. Such detailed information is generally not available from just watching the browser screen, but needs to come from specialized tools such as performance monitor plugins and recording proxies.
    The preferred report method for performance issues is to use the speed reporting features build into or available as a plugin for a browser for both the page you want to report a problem with and several refence pages in the site. Detailed instructions are listed below separated out for different browsers. If possible, please use Firefox for submitting the report because it provides an export format that can be read back electronically.
    Known performance issues
    The performance issues with any screen with a Rich Text Editor, such as the Reply window and the compose Private Message window have been acknowleged and improvements are being implemented.
    Mozilla Firefox (preferred)
    Warning: it is currently not recommended to generate a speed report when logged in. The speed report has enough detail for somebody else to hijack your session and impersonate you on the forums. If you really must report while logged in, make sure you log out your browser after generating the speed report and wait at least 4 hours before posting.
    Install the Firebug plugin
    Install the NetExport 0.6 extension for Firebug
    Enable all Firebug panels
    Switch to the "Net" panel in Firebug
    Click on this link
    Export the data from the Firebug Net panel
    Click on this link
    Export the data from the Firebug Net panel
    Browse to the page where you are experiencing the performance problem.
    Export the data from the Firebug Net panel
    Click on this link
    Export the data from the Firebug Net panel
    Click on this link
    Export the data from the Firebug Net panel
    Browse to the page where you are experiencing the performance problem.
    Export the data from the Firebug Net panel
    When you report a performance problem please attach the 6 exports from the Firebug Net panel and an explanation of how you are experiencing the issues (for instance how much slower it is then normal) and include a description of your internet connection (dial-up, dsl, cable etc.) and the country from where you are connecting. If you have non-standard tweaks to your Firefox configuration (such as pipelining enabled) or are running any plugins please include that information in your report as well.
    Google Chrome
    Open the Developer Tools (Ctrl-Shift-J)
    Navigate to the resources tab
    Enable resource tracking.
    Click on this link
    Export the resource loading data.
    Reset the data by disabling and enabling resource tracking
    Click on this link
    Export the data
    Reset the data by disabling and enabling resource tracking
    Navigate to the page where you experience the performance problem
    Export the data
    Reset the data by disabling and enabling resource tracking
    Click on this link
    Export the data
    Reset the data by disabling and enabling resource tracking
    Click on this link
    Export the data
    Reset the data by disabling and enabling resource tracking
    Navigate to the page where you experience the performance problem
    Export the data
    Since Google Chrome does not have an export format for the Resource Tracking information best current practice is to take a screenshot and note the hover details for any resource with a tail that is longer then 25% of the total load time. When you report a performance problem please attach the screenshots and an explanation of how you are experiencing the issues (for instance how much slower it is then normal)  and include a description of your internet connection (dial-up, dsl, cable etc.) and the country from where you are connecting.
    Apple Safari
    The Apple Safari Web Inspector has a Resources panel similar to the Resources panel in the Google Chrome developer tools.To get there, follow these steps:
    Show the menu bar.
    Go to preferences
    Go to the Advanced Tab
    Check “Show  Develop menu in menu bar”.
    From the Develop menu select “Show Web  Inspector”. 
    Collecting the performance information and exporting works exactly the same as in Google Chrome. Please refer to the instructions for Google Chrome.
    Microsoft Internet Explorer
    IE does not have native features to analyze web traffic. No plugins have been found that produce the required information (please let us know if we missed any). For now, please reproduce the issue with Firefox, Chrome or Safari.
    Please note that due to the reliance on Javascript for the interactive effects the performance of these forums will be much better on MS IE 8 then on previous versions of MS IE.

    Hi
    It works, check once again...
    regards
    Swami

  • Crystal report Subreport linking error

    Hi, I have a issue with linking subreport to main report in crystal report. I created a main report with BEx query as source and this query had fiscal year/period as variable. I have a another subreport with different BEx query and this query also had fiscal year/period variable.
    I linked main report fiscal year/period parameter to subreport fiscal year/period parameter.I can run the report and see the data, however In the parameter selection screen I have two prompts with fiscal year/paeriod variable. How can I make this report to prompt fiscal year/period once?
    I treid to link main report field and subreport parameter, in this case it is prompting only once but I am getting below error.
    [Mon May 23 11:30:08 2011]     5120     5628     ERROR: .\crdb_bwmdx_execution.cpp [478]: l_bapiSelectData failed with return code RFC_RC = 0 Exception:  BAPI Error: BAPI Error #:0
    For characteristic 0FISCYEAR, enter value in a permitted format
    [Mon May 23 11:30:08 2011]     5120     5628     Caught DbError #1 with Message 'BAPI Error #:0
    For characteristic 0FISCYEAR, enter value in a permitted format'
    [Mon May 23 11:30:08 2011]     5120     5628     Caught DbError #1 with Message 'BAPI Error #:0
    For characteristic 0FISCYEAR, enter value in a permitted format'
    Please advice.
    Thanks
    Sasi

    Hi Sasi
    i had the same issue with main report - subreport linking over Bex Variables. So far i realised a workaround by
    giving the value to the subreport variable in the obviously requested format.
    I had to provide the value with leading zeros (internal Numc format).
    In my case I had a compounded value. By running the rep from CR local I have to give the value as usual like "ED/20080" but when running on infoview the subrep variable demands this format "ED0000020080".
    Veeeeery special, but it works.
    Obviously, when running this thing on infoview the variable in the subrep demands the internal fomat.
    But me to, I'm very interested in an explanation of this behavior and by when it's solved. We have BOE XI 3.1 Sp 3 FB 3.
    Ingo, can you help?
    regards alex

  • Crystal report -Subreports and BW key date

    Hope your in good spirits,  we had to install the SP 7 on bw for our webi reports to work, i have an issues here with Crystal reports
    I need to develope a crystal report with two BEx Queries as Data Sources, I suggested to use Subreports, where the promts of the reports can be linked, but i have a Keydates in these two Bex Queries which are poping up as two parameters when i run the report is there any way that you can link those to key dates,where the user can enter for one key date Parameter and the value is passed to the Sub report Key date  parameter, please help me

    >
    raj_4234 wrote:
    > Hope your in good spirits,  we had to install the SP 7 on bw for our webi reports to work, i have an issues here with Crystal reports
    >
    > I need to develope a crystal report with two BEx Queries as Data Sources, I suggested to use Subreports, where the promts of the reports can be linked, but i have a Keydates in these two Bex Queries which are poping up as two parameters when i run the report is there any way that you can link those to key dates,where the user can enter for one key date Parameter and the value is passed to the Sub report Key date  parameter, please help me
    did you manage get the solution, i also want to know how to share date parameter from subreport to main report?

  • Crystal report 9 Viewer issue

    Post Author: rikleo2001
    CA Forum: Crystal Reports
    First I need to know.1. My Crystal Report 9 Developer edition purchased seperately. Developed an .rpt and Includes in .NET 2003 as Web Service. Will this be consider as (Crystal report 9 ) or (Crystal Report .NET) ? 2. Which Patch/service pack I will apply on Web Server? CR9 or CR.NET?3. If I apply patch/Service Pack for CR9 it says "failed to create backup - 110" this means I won't be able to restore back to old Service pack?4. Service packs and Hotfix meant to be installed on Web Servers where actually web site is hosted? or do I need to install them on my Development machine too?Here is one more question
    I am using Crytal report 9 developer edition within VS 2003.At run time my reports displays fine with Navigation tool on top, this report is using 2 different subreports.Here are my question.1. on Main report when I click on GO TO Next page button, it take me to  page 2, then I want to go to third page, but it won't let me, it refresh Page 2 again, so in nutshell I can't go above page 2. Then I putting Custom page,and it worked fine. How can I use Navigation button to walk through between pages?2. UP button is disabled, how do I enable it? for example if I go to any of sub report, I have to select Backspace to go back to main report, and sometime it takes me to some differant location on main page. Using UP navigation will help to resolve this issue?
    I checked another report with more than 3 pages without any sub report, and navigation next button works fine and walk me through multiple page.{cur_Fieldresult.Rdate}>= #2007/09/12# and {cur_Fieldresult.RDate}<= #2007/09/12#
    I then applied time filter including date and time, and there it is dieing.{cur_Fieldresult.Rtime}>= #2007/Sep/12 06:13:55# and {cur_Fieldresult.Rtime}<= #2007/Sep/12 08:13:55# I am getting perfect data based on time filter, but why can't I navigate through? Any help guys??
    Thanks in advance

    what you can do is is select the export to xls
    select options
    and uncheck the export page header page footer.
    then it wont export the header at all
    if you can figure out a way to conditionally supress an addtional report header you can place what you want to export in there and it only displays when it is exported.
    not sure how its can be done.

  • Problem passing parameter to crystal report subreport from *.aspx page

    Background:
    I am developing a .NET web application using Visual Studio 2005. The code behind is in VB.net. One of my asp.net pages calls a report, which is invoked when the user clicks a Print button. I have developed this report using the Crystal Reports software that is bundled with Visual Studio 2005. I am passing one parameter from the asp.net page (utilizing the VB.net code-behind on the Print button) to the Crystal report. The report consists of a main report and 5 subreports. Both the main report and the subreports use the same parameter. Both the main report and the subreports are bound to stored procedures, each of which require a parameter.
    Problem:
    For some reason, the parameter is not being passed from the asp.net page to the report. I am receiving the following error: "CrystalDecisions.CrystalReports.Engine.ParameterField.CurrentValueException: Missing Parameter Values." However, when I remove the subreports, the parameter gets passed, and the report is invoked with no problem.
    I have read in other forums that there may be an issue with the Crystal Reports software that is causing this problem. I have downloaded and run the suggested hotfix, but the problem remains unresolved. I have tried changing the linking of my main report to the subreport, but that doesn't help either. It is possible that I am doing something wrong with the linking, as this is the first time I have developed a report with Crystal Reports. I need a workaround or definitive solution. Below is the aspx code used to call the report:
    Imports System
    Imports System.Collections.Specialized
    Imports System.Collections.ObjectModel
    Imports System.Collections
    Imports System.Text
    Imports System.Configuration
    Imports System.Data.SqlClient
    Imports System.Data
    Imports System.Data.SqlClient.SqlDataAdapter
    Imports System.Web.Configuration
    Imports Crystaldecisions.crystalreports.engine
    Imports Crystaldecisions.reportsource
    Imports Crystaldecisions.shared
    Partial Class OACIS_Award_or_Deny_BudgetSummary_PrintRpt
    Inherits System.Web.UI.Page
    Dim paramFields As ParameterFieldDefinitions
    Dim paramField As ParameterFieldDefinition
    Dim paramValue As ParameterValues
    Dim paramDiscreteValue As New ParameterDiscreteValue
    Public Shared idCase, nameRpt As String
    Private PrintRpt As ReportDocument
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Try
    idCase = Request.QueryString("id")
    nameRpt = Request.QueryString("prtName")
    Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")
    Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)
    Dim file As String = settings.File
    Dim dSource, iCatalog, userIs, passUser, appString As String
    dSource = Nothing
    iCatalog = Nothing
    userIs = Nothing
    passUser = Nothing
    appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()
    Dim AppArray() As String = Split(appString, ";")
    Dim arrayLgth As Integer = AppArray.Length
    Dim i As Integer
    For i = 0 To arrayLgth - 1
    Dim pairIs() As String = Split(AppArray(i), "=")
    Dim firstItem As String = pairIs(0)
    Dim secondItem As String = pairIs(1)
    If firstItem = "Data Source" Then : dSource = secondItem : End If
    If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If
    If firstItem = "UID" Then : userIs = secondItem : End If
    If firstItem = "PWD" Then : passUser = secondItem : End If
    Next
    Dim crReportDocument As ReportDocument
    Dim crExportOptions As ExportOptions
    Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
    Dim crconnectioninfo As ConnectionInfo
    Dim crDatabase As Database
    Dim crtables As Tables
    Dim crtable As Table
    Dim crtablelogoninfo As TableLogOnInfo
    Dim Fname As String
    Dim Prtname As String
    Dim FPath As String
    Dim crSection As Section
    Dim crReportObject As ReportObject
    Dim crSubreportObject As SubreportObject
    Dim subRepDoc As New ReportDocument
    FPath = Server.MapPath("") + "\"
    Dim rptIs As String = nameRpt
    crReportDocument = New ReportDocument
    Prtname = FPath
    Prtname = Prtname + rptIs
    crReportDocument.Load(Prtname)
    Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"
    crconnectioninfo = New ConnectionInfo
    crconnectioninfo.ServerName = dSource
    crconnectioninfo.DatabaseName = iCatalog
    crconnectioninfo.UserID = userIs
    crconnectioninfo.Password = passUser
    crDatabase = crReportDocument.Database
    crtables = crDatabase.Tables
    For Each crtable In crtables
    Try
    crtablelogoninfo = crtable.LogOnInfo
    crtablelogoninfo.ConnectionInfo = crconnectioninfo
    crtable.ApplyLogOnInfo(crtablelogoninfo)
    crtable.SetDataSource(Prtname)
    crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
    crtablelogoninfo.ConnectionInfo.UserID = userIs
    crtablelogoninfo.ConnectionInfo.Password = passUser
    crtable.ApplyLogOnInfo(crtablelogoninfo)
    crtable.Location = iCatalog + ".dbo." + crtable.Name
    Catch ex As Exception
    Response.Write(ex)
    Exit Sub
    End Try
    Next crtable
    For Each crSection In crReportDocument.ReportDefinition.Sections
    For Each crReportObject In crSection.ReportObjects
    If crReportObject.Kind = ReportObjectKind.SubreportObject Then
    crSubreportObject = CType(crReportObject, SubreportObject)
    subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
    For Each crtable In subRepDoc.Database.Tables
    Try
    crtablelogoninfo = crtable.LogOnInfo
    crtablelogoninfo.ConnectionInfo = crconnectioninfo
    crtable.ApplyLogOnInfo(crtablelogoninfo)
    crtable.SetDataSource(Prtname)
    crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
    crtablelogoninfo.ConnectionInfo.UserID = userIs
    crtablelogoninfo.ConnectionInfo.Password = passUser
    crtable.ApplyLogOnInfo(crtablelogoninfo)
    crtable.Location = iCatalog + ".dbo." + crtable.Name
    Catch ex As Exception
    End Try
    Next
    End If
    Next
    Next
    crDiskFileDestinationOptions = New DiskFileDestinationOptions()
    crDiskFileDestinationOptions.DiskFileName = Fname
    crExportOptions = crReportDocument.ExportOptions
    With crExportOptions
    .DestinationOptions = crDiskFileDestinationOptions
    .ExportDestinationType = ExportDestinationType.DiskFile
    .ExportFormatType = ExportFormatType.PortableDocFormat
    End With
    Dim parIDCase As ParameterValues = New ParameterValues
    Dim disIDCase As ParameterDiscreteValue = New ParameterDiscreteValue
    disIDCase.Value = idCase
    parIDCase.Add(disIDCase)
    crReportDocument.DataDefinition.ParameterFields("@ID_CASE_NMBR").ApplyCurrentValues(parIDCase)
    crReportDocument.Export()
    Response.ClearContent()
    Response.ClearHeaders()
    Response.ContentType = "application/pdf"
    Response.WriteFile(Fname)
    Response.Flush()
    Response.Close()
    System.IO.File.Delete(Fname)
    Catch ex As Exception
    lblMessage.Visible = True
    lblMessage.Text = "Error Load
    " & Convert.ToString(ex)
    End Try
    End Sub
    End Class
    Your help is greatly appreciated!

    Thanks for your help!
    I've now gotten past the "missing parameter values" error, and the report renders fine in the report viewer.  However, I've encounted another problem.  The data in my main report displays correctly, but the data in my subreport does not display.  Of course, when I view the report in the designer, both the main report and subreport display correctly.  What am I doing wrong?  Below is my vb.net code:
            Try
                idCase = Request.QueryString("id")
                nameRpt = Request.QueryString("prtName")
                Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")
                Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)
                Dim file As String = settings.File
                Dim dSource, iCatalog, userIs, passUser, appString As String
                dSource = Nothing
                iCatalog = Nothing
                userIs = Nothing
                passUser = Nothing
                appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()
                Dim AppArray() As String = Split(appString, ";")
                Dim arrayLgth As Integer = AppArray.Length
                Dim i As Integer
                For i = 0 To arrayLgth - 1
                    Dim pairIs() As String = Split(AppArray(i), "=")
                    Dim firstItem As String = pairIs(0)
                    Dim secondItem As String = pairIs(1)
                    If firstItem = "Data Source" Then : dSource = secondItem : End If
                    If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If
                    If firstItem = "UID" Then : userIs = secondItem : End If
                    If firstItem = "PWD" Then : passUser = secondItem : End If
                Next
                Dim crReportDocument As ReportDocument
                Dim crExportOptions As ExportOptions
                Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
                Dim crconnectioninfo As ConnectionInfo
                Dim crDatabase As Database
                Dim crtables As Tables
                Dim crtable As Table
                Dim crtablelogoninfo As TableLogOnInfo
                Dim Fname As String
                Dim Prtname As String
                Dim FPath As String
                Dim crSection As Section
                Dim crReportObject As ReportObject
                Dim crSubreportObject As SubreportObject
                Dim subRepDoc As New ReportDocument
                FPath = Server.MapPath("") + "\"
                Dim rptIs As String = nameRpt
                crReportDocument = New ReportDocument
                Prtname = FPath
                Prtname = Prtname + rptIs
                crReportDocument.Load(Prtname)
                Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"
                crconnectioninfo = New ConnectionInfo
                crconnectioninfo.ServerName = dSource
                crconnectioninfo.DatabaseName = iCatalog
                crconnectioninfo.UserID = userIs
                crconnectioninfo.Password = passUser
                crDatabase = crReportDocument.Database
                crtables = crDatabase.Tables
                For Each crtable In crtables
                    Try
                        crtablelogoninfo = crtable.LogOnInfo
                        crtablelogoninfo.ConnectionInfo = crconnectioninfo
                        crtable.ApplyLogOnInfo(crtablelogoninfo)
                        crtable.SetDataSource(Prtname)
                        crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
                        crtablelogoninfo.ConnectionInfo.UserID = userIs
                        crtablelogoninfo.ConnectionInfo.Password = passUser
                        crtable.ApplyLogOnInfo(crtablelogoninfo)
                        crtable.Location = iCatalog + ".dbo." + crtable.Name
                    Catch ex As Exception
                        Response.Write(ex)
                        Exit Sub
                    End Try
                Next crtable
                For Each crSection In crReportDocument.ReportDefinition.Sections
                    For Each crReportObject In crSection.ReportObjects
                        If crReportObject.Kind = ReportObjectKind.SubreportObject Then
                            crSubreportObject = CType(crReportObject, SubreportObject)
                            subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
                            For Each crtable In subRepDoc.Database.Tables
                                Try
                                    crtablelogoninfo = crtable.LogOnInfo
                                    crtablelogoninfo.ConnectionInfo = crconnectioninfo
                                    crtable.ApplyLogOnInfo(crtablelogoninfo)
                                    crtable.SetDataSource(Prtname)
                                    crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
                                    crtablelogoninfo.ConnectionInfo.UserID = userIs
                                    crtablelogoninfo.ConnectionInfo.Password = passUser
                                    crtable.ApplyLogOnInfo(crtablelogoninfo)
                                    crtable.Location = iCatalog + ".dbo." + crtable.Name
                                Catch ex As Exception
                                End Try
                            Next
                        End If
                    Next
                Next
                crDiskFileDestinationOptions = New DiskFileDestinationOptions()
                crDiskFileDestinationOptions.DiskFileName = Fname
                crExportOptions = crReportDocument.ExportOptions
                With crExportOptions
                    .DestinationOptions = crDiskFileDestinationOptions
                    .ExportDestinationType = ExportDestinationType.DiskFile
                    .ExportFormatType = ExportFormatType.PortableDocFormat
                End With
                crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase)
                crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase, "MemberName")
                crReportDocument.Export()
                Response.ClearContent()
                Response.ClearHeaders()
                Response.ContentType = "application/pdf"
                Response.WriteFile(Fname)
                Response.Flush()
                Response.Close()
                System.IO.File.Delete(Fname)
            Catch ex As Exception
                lblMessage.Visible = True
                lblMessage.Text = "Error Load<br>" & Convert.ToString(ex)
            End Try
    Edited by: LaShandra Knox on Sep 17, 2008 7:59 PM

  • Crystal Reports XIR2 performance problem with Sybase IQ 15.2

    Dear all,
    we are facing a performances pb with Crystal reports and Sybase IQ 15.2, Does anyone have a similar issues and have a solution as ( design , or sybase IQ configuration...)
    regards,
    Eric

    Wow, not so much info please... for starters:
    Is this in the designer or in an app?
    Depending on the above, the following may, or may not apply:
    What are you comparing the performance to?
    What is the exact version of CR or what CR Service Packs have you applied?
    If in an app , what your development language?
    What CR SDK are you using?
    Web or Win app?
    How are you connecting to the database (OLE DB, ODBC, etc .)?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • BW BCS cube(0bcs_vc10 ) Report huge performance issue

    Hi Masters,
    I am working out for a solution for BW report developed in 0bcs_vc10 virtual cube.
    Some of the querys is taking more 15 to 20 minutes to execute the report.
    This is huge performance issue. We are using BW 3.5, and report devloped in bex and published thru portal. Any one faced similar problem please advise how you tackle this issue. Please give the detail analysis approach how you resolved this issue.
    Current service pack we are using is
    SAP_BW 350 0016 SAPKW35016
    FINBASIS 300 0012 SAPK-30012INFINBASIS
    BI_CONT 353 0008 SAPKIBIFP8
    SEM-BW 400 0012 SAPKGS4012
    Best of Luck
    Chris
    BW BCS cube(0bcs_vc10 ) Report huge performance issue

    Ravi,
    I already did that, it is not helping me much for the performance. Reports are taking 15 t0 20 minutes. I wanted any body in this forum have the same issue how
    they resolved it.
    Regards,
    Chris

  • Crystal report layout printing issue

    Hi Experts
    I have a bit of an urgent issue which I can't seem to solve.
    I have created a print spec using crystal reports 2008 sp3.  I am trying to print it using an epsom dot matrix printer which is brand new. When I print from crystal reports itself, I have managed to get it printing perfectly. However, as soon as I run it through SAP, the orientation either goes out or it only prints 3/4 of the width of the page and to much as far as the being goes...
    There are other print specs which have been created using pld which print fine.
    Does anyone know the solution to this issue?

    Hi,
    To print Crystal report correctly on dot matrix printer is really a challenge for B1. You have to try everything possible to make it happen. Try search the forum first. There are quite a few discussions about it. However, solution is rare.
    Thanks,
    Gordon

  • Crystal Reports for Eclipse issues running under Oracle Jdeveloper.

    <p>I am having issues trying to get a small application that I developed in eclipse that uses Crystal Reports to work with Oracle&#39;s JDeveloper OC4J embedded server.  I can run the application fine and when I try to view  a report I get a partial report rendering and then get the following exception:</p><p> </p><p>2006-10-03 06:55:38.778 NOTIFICATION  J2EE JSP0008 Unable to dispatch JSP Page : java.lang.IllegalStateException: Writer already retrieved<br />    at com.evermind.server.http.EvermindHttpServletResponse.getOutputStream(EvermindHttpServletResponse.java:882)<br />    at com.evermind.server.http.EvermindHttpServletResponse.getJspOutputStream(EvermindHttpServletResponse.java:877)<br />    at com.evermind.server.http.EvermindJSPWriter.initServletOut(EvermindJSPWriter.java:480)<br />    at com.evermind.server.http.EvermindJSPWriter.writeOut(EvermindJSPWriter.java:492)<br />    at com.evermind.server.http.EvermindJSPWriter.jspflush(EvermindJSPWriter.java:391)<br />    at com.evermind.server.http.EvermindJSPWriter.close(EvermindJSPWriter.java:361)<br />    at oracle.jsp.runtime.OracleJspRuntime.extraHandlePCFinally(OracleJspRuntime.java:1574)<br />    at sample20_reports._MartyRpt_2d_viewer._jspService(_MartyRpt_2d_viewer.java:143)<br />    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)<br />    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416)<br />    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)<br />    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)<br />    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<br />    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)<br />    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)<br />    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)<br />    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)<br />    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)<br />    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)<br />    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)<br />    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)<br />    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)<br />    at java.lang.Thread.run(Thread.java:595)</p><p> </p><p>Does anyone have any idea of what is causing this?  </p><p>I really need help fixing this issue.  Any help would be much appreciated.</p><p>Marty </p>

    <p>I agree with Rob that it is likely the OutputStream object throwing the error. Another option is to try the following code for your viewer code:</p><p> </p><p class="MsoNormal"><font face="Courier New" size="2" color="#3f7f5f"><span style="font-size: 10pt; font-family: "Courier New"; color: #3f7f5f">// ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************<span>  </span></span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black">{</span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="#3f7f5f"><span style="font-size: 10pt; font-family: "Courier New"; color: #3f7f5f">// Create the CrystalReportViewer object</span></font></p>  <p style="margin-right: -0.75in" class="MsoNormal"><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black">CrystalReportViewer crystalReportPageViewer = </span></font><strong><font face="Courier New" size="2" color="#7f0055"><span style="font-size: 10pt; font-family: "Courier New"; color: #7f0055; font-weight: bold">new</span></font></strong><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black"> CrystalReportViewer();</span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New""> </span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="#3f7f5f"><span style="font-size: 10pt; font-family: "Courier New"; color: #3f7f5f">//<span>    </span>set the reportsource property of the viewer</span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black">IReportSource reportSource = clientDoc.getReportSource();<br />crystalReportPageViewer.setReportSource(reportSource);</span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New""> </span></font></p>      <p class="MsoNormal"><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black">// set viewer attributes<br />crystalReportPageViewer.setOwnPage(</span></font><strong><font face="Courier New" size="2" color="#7f0055"><span style="font-size: 10pt; font-family: "Courier New"; color: #7f0055; font-weight: bold">true</span></font></strong><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black">);<br />crystalReportPageViewer.setOwnForm(</span></font><strong><font face="Courier New" size="2" color="#7f0055"><span style="font-size: 10pt; font-family: "Courier New"; color: #7f0055; font-weight: bold">true</span></font></strong><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black">);</span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New""> </span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="#3f7f5f"><span style="font-size: 10pt; font-family: "Courier New"; color: #3f7f5f">// Apply the viewer preference attributes</span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="#3f7f5f"><span style="font-size: 10pt; font-family: "Courier New"; color: #3f7f5f">// Process the report</span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black">String output = crystalReportPageViewer.getHtmlContent(request, response, application); </span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black">out.print(output);</span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="black"><span style="font-size: 10pt; font-family: "Courier New"; color: black">}</span></font></p>  <p class="MsoNormal"><font face="Courier New" size="2" color="#3f7f5f"><span style="font-size: 10pt; font-family: "Courier New"; color: #3f7f5f">// ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************<span>  </span></span></font></p>  <p> </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p>

  • Crystal Reports for Eclipse issues running under Oracle Jdeveloper(10g)

    Hi  All,
    I am having issues trying to get a small application that I developed in eclipse (CR4E)that uses Crystal Reports to work with Oracle's JDeveloper OC4J embedded server.  I can run the application fine and when I try to view  a report I get a partial report rendering and then get the following Exception:
    Also while inserting on the page Showing error on the page
    java.lang.IllegalStateException: Writer already retrieved at com.evermind.server.http.EvermindHttpServletResponse.getOutputStream(EvermindHttpServletResponse.java:880) at com.evermind.server.http.EvermindHttpServletResponse.getJspOutputStream(EvermindHttpServletResponse.java:875) at com.evermind.server.http.EvermindJSPWriter.initServletOut(EvermindJSPWriter.java:525) at com.evermind.server.http.EvermindJSPWriter.writeOut(EvermindJSPWriter.java:537) at com.evermind.server.http.EvermindJSPWriter.jspflush(EvermindJSPWriter.java:436) at com.evermind.server.http.EvermindJSPWriter.close(EvermindJSPWriter.java:406) at oracle.jsp.runtime.OracleJspRuntime.extraHandlePCFinally(OracleJspRuntime.java:1689) at NEWPROJECTR.jspService(_NEWPROJECTR.java:89) [/NEWPROJECTR.jsp] at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:598) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:522) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
    Can any boby tell me another way to integate Crystal report with Jdeveloper
    Sincerely,
      Amol

    Something is writing out to both the JSP Response Writer and OutputStream.  Writer is for text and OutputStream is for binaries.
    This typically happens, especially on WebSphere and Oracle OC4J, when exporting a Crystal Report in the viewer.  The DHTML view is HTML text, but the exports are binaries.
    I'd recommend putting Crystal Report Viewer object in a Servlet - there you'd have full control over what goes in Writer and OutputStream.  Once in the Servlet, ensure you don't write anything out yourself, but let the viewer have full control over what goes out.
    Sincerely,
    Ted Ueda

  • Crystal Report dialog box issues

    I am very new at .NET, and this is my second post to this forum.
    I've created a Crystal Report within a project using Visual Studio 2005 Professional Edition, on a Windows XP machine.
    The report is handled by a CrystalReportViewer, which has its ReportSource set to the report.
    Via a dialog box, the report asks for a signon and password for a SQL Server database.  Then, via a second dialog box, it prompts for a parameter required by the report.
    All of this works ok, but I have two issues:
    1) I would like to set the database signon and password so that the user doesn't have to enter them each time he runs the report.
    2) If the Cancel button is clicked on any of the dialog boxes, it renders the report unusable until I shut down the application and reopen it.
    I have looked online for two days, but have not been able to find a solution to these above problems.  It is probably simple, but I'm not seeing it.
    I am attaching the relevant code for the button that runs the report.
        Private Sub cmdChecks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdChecks.Click
                CrystalReportViewer2.DisplayToolbar = True
                CrystalReportViewer2.Visible = True
                CrystalReportViewer2.Height = 600
                CrystalReportViewer2.Width = 1000
                CrystalReportViewer2.Left = 10
        End Sub
    Can anybody help me with this?
    Thank you!

    Hi,
    I would like you to know the code of the logon based on the object models-
    If you are using the ConnectionInfo then use the below code:-
    //For web application
    ConnectionInfo crConnection = new ConnectionInfo();
    // Connection Information
    crConnection.ServerName="D-2818-W2K";
    crConnection.DatabaseName="Northwind";
    crConnection.UserID="sa";
    crConnection.Password="sa";
    crReport.Load(Server.MapPath("CrystalReport1.rpt"));
    Tables crTables=crReport.Database.Tables;
    foreach(CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
              TableLogOnInfo crTLOI = crTable.LogOnInfo;
              crTLOI.ConnectionInfo=crConnection;
              crTable.ApplyLogOnInfo(crTLOI);
              crTable.Location=crTable.Location;// for multiple table selection
    CrystalReportViewer1.ReportSource=crReport;
    ====================================================================================
    //For desktop application
    ConnectionInfo crConnection = new ConnectionInfo();
    // Connection Information
    crConnection.ServerName="D-2818-W2K";
    crConnection.DatabaseName="Northwind";
    crConnection.UserID="sa";
    crConnection.Password="sa";
    crReport.Load(Application.StartupPath + "//CrystalReport1.rpt");
    Tables crTables=crReport.Database.Tables;
    foreach(CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
              TableLogOnInfo crTLOI = crTable.LogOnInfo;
              crTLOI.ConnectionInfo=crConnection;
              crTable.ApplyLogOnInfo(crTLOI);
              crTable.Location=crTable.Location;// for multiple table selection
    CrystalReportViewer1.ReportSource=crReport;
    =====================================================================================
    If using ReportDocument object model
    //For web application
    ReportDocument crReport= new ReportDocument();
    crReport.Load(Server.MapPath("CrystalReport1.rpt"));
    crReport.SetDatabaseLogon("sa","sa");
    CrystalReportViewer1.ReportSource =crReport;
    =====================================================================================
    //For desktop application
    ReportDocument crReport= new ReportDocument();
    crReport.Load(Application.StartupPath + "//CrystalReport1.rpt");
    crReport.SetDatabaseLogon("sa","sa");
    CrystalReportViewer1.ReportSource =crReport;
    To download sample code click [here|https://boc.sdn.sap.com/codesamples].
    You can also take help from [Dev library|https://www.sdn.sap.com/irj/boc/sdklibrary]
    Hope this helps!!
    Regards
    Amit

Maybe you are looking for

  • Running Two Systems with a Single PSU?

    Interesting setup by MSI in Computex Taipei 2006. http://sg.hardwarezone.com/articles/view.php?id=1928&cid=19&pg=1

  • Hiding files in external library when PC offline

    Like i sai before i imported (but not copied) names to my library though when the library source is offline it still shows the files in library. So its hrder for me to play music on my own mac! Is there a setting that can change this?

  • Subscription Service Product Activation Process

    If the subscription service for Adobe InDesign CS5.5 is purchased how often does the product activation process occur, every time the application is launched, or once a month after the subscription payment has been processed? In other words, if I am

  • Get DATA with BSP Application

    Hello Everyone, I want to get data from table SFLIGHT with BSP Application. I have used <htmlb:tableView and tableViewColumn tags but i am only getting the structure displayed in the browser, not the data, pls suggest some code to achieve that. Thank

  • Error -1309 when exporting 720 resolution (Quicktime format)

    Any insight on why I keep getting error -1309 when I try to export at higher definitions? First of all, it consumes my computer for 6 hours (for a 20 minute video)! But then I come back and I've been knocked out...have to start all over again!