Export Crystal to excel

I have written the following code for windows application to export crystal report to excel. When I run this code, I get the following error :
Error in File Item_Master {104SW232-6fwe-4ber....}.rpt: Invalid export DLL or export format.
I can export to any other format except excel. I am using VS2005 windows app with Crystal reports 2008.
Following is my code :
            Dim rptExcel As New ReportDocument
            Dim strExportFile As String = "C:\RT_Interface\RT_Interface\test.xls"
            rptExcel.Load("C:\RT_Interface\RT_Interface\Item_Master.rpt")
            rptExcel.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
            rptExcel.ExportOptions.ExportFormatType = ExportFormatType.Excel
            Dim objExcelOptions As ExcelFormatOptions = New ExcelFormatOptions
            objExcelOptions.ExcelUseConstantColumnWidth = False
            rptExcel.ExportOptions.FormatOptions = objExcelOptions
            Dim objOptions As DiskFileDestinationOptions = New DiskFileDestinationOptions
            objOptions.DiskFileName = strExportFile
            rptExcel.ExportOptions.DestinationOptions = objOptions
            Dim crLogin As New ApplyCRLogin
            crLogin.c_dbName = rptExcel.DataSourceConnections.Item(0).DatabaseName
            crLogin.c_serverName = rptExcel.DataSourceConnections.Item(0).ServerName
            crLogin.c_userID = "user1"
            crLogin.c_passWord = "pw!2wer"
            crLogin.ApplyInfo(rptExcel)
            rptExcel.Export()
            objOptions = Nothing
            rptExcel = Nothing
Edited by: Don Perera on Feb 15, 2011 5:47 PM
Edited by: Don Perera on Feb 15, 2011 5:48 PM

Yes I can export with CR designer. Following is the login code. If I assign the report to crystal report viewer control, the report get displayed. So nothing wrong with the login code.
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports Microsoft.VisualBasic
Public Class ApplyCRLogin
    Public c_dbName As String
    Public c_serverName As String
    Public c_userID As String
    Public c_passWord As String
    Public c_integratedSecurity As Boolean
    Public c_reportType As Integer
    Public Sub ApplyInfo(ByRef _oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
        Dim oCRDb As CrystalDecisions.CrystalReports.Engine.Database = _oRpt.Database()
        Dim oCRTables As CrystalDecisions.CrystalReports.Engine.Tables = oCRDb.Tables()
        Dim oCRTable As CrystalDecisions.CrystalReports.Engine.Table
        Dim oCRTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
        Dim oCRConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
        oCRConnectionInfo.ServerName = c_serverName
        oCRConnectionInfo.UserID = c_userID
        oCRConnectionInfo.Password = c_passWord
        oCRConnectionInfo.IntegratedSecurity = c_integratedSecurity
        If c_reportType = 2 Then
            '_dbName = _serverName
            SetDBLogonForReport(oCRConnectionInfo, _oRpt)
            SetDBLogonForSubreports(oCRConnectionInfo, _oRpt)
            _oRpt.DataSourceConnections(0).SetConnection(c_serverName, c_dbName, c_userID, c_passWord)
            Return
        End If
        For Each oCRTable In oCRTables
            oCRTableLogonInfo = oCRTable.LogOnInfo()
            oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo
            oCRTable.ApplyLogOnInfo(oCRTableLogonInfo)
        Next
        oCRTables(0).TestConnectivity()
        If Len(Trim(c_dbName)) = 0 Then
        Else
            _oRpt.DataSourceConnections(0).SetConnection(c_serverName, c_dbName, c_userID, c_passWord)
        End If
    End Sub
    Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo, ByVal myReportDocument As ReportDocument)
        Dim myTables As Tables = myReportDocument.Database.Tables
        For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
            Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
            myTableLogonInfo.ConnectionInfo.AllowCustomConnection = True
            myTableLogonInfo.ConnectionInfo = myConnectionInfo
            myTable.ApplyLogOnInfo(myTableLogonInfo)
        Next
        myReportDocument.DataSourceConnections(0).SetConnection(c_serverName, c_dbName, c_userID, c_passWord)
    End Sub
    Private Sub SetDBLogonForSubreports(ByVal myConnectionInfo As ConnectionInfo, ByVal myReportDocument As ReportDocument)
        Dim mySections As Sections = myReportDocument.ReportDefinition.Sections
        For Each mySection As Section In mySections
            Dim myReportObjects As ReportObjects = mySection.ReportObjects
            For Each myReportObject As ReportObject In myReportObjects
                If myReportObject.Kind = ReportObjectKind.SubreportObject Then
                    Dim mySubreportObject As SubreportObject = CType(myReportObject, SubreportObject)
                    Dim subReportDocument As ReportDocument = mySubreportObject.OpenSubreport(mySubreportObject.SubreportName)
                    SetDBLogonForReport(myConnectionInfo, subReportDocument)
                End If
            Next
        Next
    End Sub
End Class

Similar Messages

  • Exporting Crystal to EXCEL

    Post Author: naissani
    CA Forum: Exporting
    I am trying to export the crystal report to Excel from Web but I am getting the following error. I would appreciate if anyone can help me out. when I tried to export to Word or PDF it works fine. I am using Crystal 9.
    Here is the Error:
    Error in File D:\webapps\Prod\LTCH_ARREC_ReportEngine\Report\ResidentSpouseCharge.rpt: Error detected by export DLL:
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: CrystalDecisions.CrystalReports.Engine.ExportException: Error in File D:\webapps\Prod\LTCH_ARREC_ReportEngine\Report\ResidentSpouseCharge.rpt: Error detected by export DLL: Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
    [ExportException: Error in File D:\webapps\Prod\LTCH_ARREC_ReportEngine\Report\ResidentSpouseCharge.rpt:
    Error detected by export DLL: ]
        . F(String       , EngineExceptionErrorID 
    ) +440
        . A(Int16   , Int32   ) +530
        . @(Int16  ) +10
       CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) +588
       CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType) +141
       Report_Engine._ReportView.ExportReport() in C:\WebApps\dev\Report_Engine\_ReportView.aspx.vb:200
       Report_Engine._ReportView.btnExport_Click(Object sender, EventArgs e) in C:\WebApps\dev\Report_Engine\_ReportView.aspx.vb:208
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
       System.Web.UI.Page.ProcessRequestMain() +1292
    Thanks

    Post Author: SHCrystal
    CA Forum: Exporting
    Hi,
    Thanks for replying.
    We do receive an error message as follows:
    Status:
    Failed
    Error Message:
    Information is needed before this report can be processed.
    And as I mentioned, this happens only when the parameter is selected as 'default'.
    The report is usually never that big, and in this case, if we run it with a specific parameter, say May2007, then it exports fine.. the problem starts with default..
    Thank you

  • Exporting Crystal Report data to the Excel Print Headers

    Hello everyone.  I am trying to do something with Excel headers that is a little more advanced than the usual.  I have multiple reports that are designed to export to Excel.  Normally I only export a report header.  However, I have a customer who wants a label to appear in each page header and footer in Excel. Here is the catch - they want the label to appear in the Excel print header and footer, not just on the main excel page.  The label contains an SBU marking, so there is a requirement that it gets printed on every page.
    If you are not familiar with the print header, it is a separate section of an Excel document that appears when you print the excel document.  For this operation, I don't think I can use the built-in Crystal Export options.  I have tried to Export to Microsoft Excel and I can send the page header and footer to the Excel data sheet, but not to the print header/footer. 
    Thanks for your help!
      - David

    Hi David,
    I haven't worked with Excel's headers and footers but you are correct that Crystal can't export to those sections.  I have though had to make modifications to an Excel file after exporting and I believe you will need to do something similar to what I did.
    After I exported the report to Excel, I had a program I wrote that opened the Excel file and modified it.  In my case I just had to encrypt it, zip it up and email it.  You may need to do something as well outside of Crystal and Excel.  Crystal doesn't export to an Excel template so automating it in Excel wouldn't work.
    Good luck,
    Brian

  • Error while exporting crystal report to excel format or word format

    i am using vs 2010 and sap crystal report(version 13.0.0.99) for vs 2010. when i export report to excel(97-2003 format) from crystalreportviewer, i am getting error that application has stopped working.  I also have ms-office 2007 install on my pc.
    when i see eventlog of system i notice following error:
    Faulting application name: NBFCForms.exe, version: 1.0.0.0, time stamp: 0x4e170b01
    Faulting module name: crxf_xls.dll, version: 13.0.0.99, time stamp: 0x4cc412ac
    Exception code: 0xc0000409
    Fault offset: 0x0009742e
    Faulting process id: 0xc60
    Faulting application start time: 0x01cc3e1e5657a4a4
    Faulting application path: C:\Users\Harshada\Desktop\NBFCDeploy\NBFCForms.exe
    Faulting module path: C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\crxf_xls.dll
    Report Id: f0bae850-aa11-11e0-a98e-0019d144259b

    Thanks Roberto and Kalpana.
    This link solved the problem:
    http://social.msdn.microsoft.com/Forums/en-US/bcf792f4-4da3-4dac-b689-60168e695683/error-internet-explorer-cannot-download-edreportviewerwebcontrolaxd-from-site?forum=vsreportcontrols

  • Problem with Exporting crystal report to Excel

    Hi !
    I am new to crystal world. I have an application which has csp code. From the csp code (internal website) we invoke crystal using viewer.cwr to view or export reports. Last week we upgraded from Crystal 10 to Crystal Reports XI Release 2. Due to this upgrade we did some modification to the Viewer.cwr url ( Changed to Viewer.asp too). Now the View option is working fine but when the report is exported to an Excel the columns are squeezed up.
    Here is the code for the viewer.asp :
    ExcelWindow = window.open("http://servername/crystalreportviewers115/viewrpt.asp?id=" + id + "&apstoken=" + escape(token) + <%Response.Write("'"&sReportLogin&"'")%>'&promptex-REPORTDATE='pRptDate'&promptex-State='pState'&promptex-usertype='pUserType'&promptex-startreport='pStartpSelect'&cmd=export&export_fmt=U2FXLS:3&',"ExcelWindow", windowprops);                                                         
    Is there any way to solve this formatting issue ? I tried changing the export format option as "export_fmt=U2FXLS:4" but this pulled up the data with the report header and sub heading in one row. Please help. 
    Nandita

    Hi Kedalene,
    Please check below links.
    Microsoft Visual C++ Runtime Library:
    VC++ runtime error
    C++ Runtime Error when installing addons | SCN
    Hope this help
    Regards::::
    Atul Chakraborty

  • Crystal reports show rows of a field in detail section in number of columns while exporting in ms excel

    Hi,
    I have a crystal report and a field called source.
    The source field can contain more than one records.
    When I export it to ms excel then source field is shown in three rows in excel.
    Name
    Source
    Batch No
    ABC
    A0001
    K1
    K2
    K3
    But now I want to export to excel in the following format
    Name
    Source
    Batch No
    ABC
    A0001
    K1
    K2
    K3
    The Name and Batch No field are in Group Header and Source in detail section.
    Also the Source field can vary in number i.e. there can be any number of Source.
    And I only want this type of output when exporting to MS Excel.
    Is there any way to do this?
    Please reply.
    Thanks.

    Try this:
    1) Create a formula with this code and place it on the Details Section:
    whileprintingrecords;
    numbervar x := x + 1;
    stringvar col1;
    stringvar col2;
    stringvar col3;
    if x = 1 then col1 = {Source}
    else if x = 2 then col2 = {Source}
    else if x = 3 then col3 = {Source};
    2) Create another formula and place this on the Group Header:
    whileprintingrecords;
    numbervar x := 0;
    stringvar col1 := "";
    stringvar col2 := "";
    stringvar col3 := "";
    3) Create three separate formulae - one each for the three Source columns and place these on the Group Footer:
    E.g. for first Source column:
    whileprintingrecords;
    stringvar col1;
    E.g. for second Source column:
    whileprintingrecords;
    stringvar col2;
    Drag and drop these formulae beside each other on the GF.
    4) Move the 'Name' and 'Batch No.' fields from the Group Header to the Group Footer
    5) Suppress Group Header and the Details Section.
    -Abhilash

  • Could not export Crystal report from SAP B1 to MS excel

    Hi Experts.
    Could not Export crystal report  which are created in .net crysta report to MS excel in SAP business one.
    Kindly give any solution.
    Thanks & Regards,
    Bhushan

    Hi,
    Crystal reports it self u can export data from MS excel .
    Regards,
    Siva

  • How to export crystal report to excel through progeam

    Hi,
    Can any help me how to export crystal report to excel through program(C#). I'm using VS2005.
    Also, the report should be in a pivot table format after exporting to the excel..please help me how to do this
    Thanks,
    Venky

    Hi Venkat,
    The link below provides the code C# in an ASP.NET codebehind file
    http://www.codeproject.com/KB/cs/Crystal_Report_Export.aspx
    http://aspalliance.com/478_Exporting_to_Excel_in_Crystal_Reports_NET__Perfect_Excel_Exports.2
    Regards,
    Abhijeet  T.

  • Problem in Exporting Crystal Report to MS-Excel 97-2000(data only)

    I have developed a crystal report using VS 2008 which has 12 columns, my question is when i export the report to MS Excel 97-2000 (data only) the report gets exported completely but some columns header names are missing i mean out of 12 column header names only 6 are getting displayed, kindly help me out.
    Thanks in advance
    Ramakrishna Reddy

    Hi Ramakrishna,
    When you export any report in data only format, all the formatting which has been applied to report fields will be lost.
    If you want the formatting as well then in export option check the box "Maintian object formatting".
    Or else you can export to MS EXCEL 97-2000 which will maintain all the formatting.
    Thank you
    Sumit

  • Issue with exporting line to excel on Crystal Report 2013

    Hi all,
    I got the issue when exporting to Excel
    I would like to export to excel with line border in cells. But it seems there is limitation when using "line" object. If I use line, in excel file, there is nothing. Then I changed to use border cells. It's exported fine to excel, but I got another issue.
    Because data is so long, so I use "can growth" function. But if I use "can growth" function. I got issue when export to excel file like the picture I attach here.
    There are a lot of empty cells when wrapping text, how can we remove empty cells? And the line was drawn incorrectly.
    Thanks so much.

    I need a report with border cell and do not merge cell or blank row/cell after exporting to Excel. Most of them are fine (using border cell instead of line object). But I got issue when using "CanGrow" option to extend height of text object automatically.
    Below is detail.
    1. If the "CanGrow" option is false
    - In preview report, the field does not extend the height to show all data if it is over
    - Then, export to Excel by "Microsoft Excel (97-2003)"=> it shows exactly what I saw in previewing (data has been truncated automatically).
    - If export to Excel by "Microsoft Excel (97-2003) Data only" => it shows all data but the formatting of cell (border, width) is missing
    2. If the "CanGrow" option is true
    - In preview report, the field extends automatically if the field is too long but other fields still remain
    - Then, export to Excel
    I expect I can see all data with the correct border cell and do not merge cell in the preview and Excel (the cell may be wrap text or not if it is over the size but the data need to be kept instead of truncating)
    Is there any solution to meet it?
    Many thanks.

  • Issue while exporting report in Excel Format

    Hello,
    I am facing problem while exporting the report in Excel Format. After analysis, I think that it could be due to two reasons, either we are using wrong versions of Jars, or we are using wrong API. Here is the code, approaches and problems we are facing. Please help.
    First approach we are using is:
    // using basic API
    import com.crystaldecisions.reports.sdk.ReportClientDocument;
    // get client document from crystal report API and open the report by specifying the report name, with path
                   ReportClientDocument reportClientDoc = new ReportClientDocument();
                   reportClientDoc.open( reportPath, 0 );
                   // give chance to extending classes to configure the report document by POJO or by sql parameter etc, just adding the parameters infromation using ParameterFieldController
                   configureReportDocument( reportClientDoc, reportMetadata, reportData, reportContext );
                   // get data source of crystal report
                   Object reportSource = reportClientDoc.getReportSource();
                   // export the data - we have also tried with MSExcel format
                   ReportExportFormat exportFormat =  ReportExportFormat.recordToMSExcel;
                   LOGGER.debug( "exportFormat[" + exportFormat + "]" );
                   ByteArrayInputStream byteArray = (ByteArrayInputStream) reportClientDoc.getPrintOutputController().export(
                             exportFormat );
    Problem Faced: Specified Excel format is not supported.
    Second Approach: We come to know that excel format is supported with new releases and with occa package.
    Then we tried with import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument; It ask to set the ReportServer. When we are trying to set the server as
                   reportClientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
    Application is unable to find 'ReportClientDocument.inprocConnectionString' property. It seems like we are using some old jars. However we have downloaded the latest released jars for eclipse 2.
    Please help for it. Issue is to export the report in excel format, which is currently working fine for PDF. If this problem is related to Jars, please suggest the path to download the latest jars. We also looking for the latest jars like rasapp and rascore etc. But these are not available with Crystal Report for Eclipse 2 release.
    Waiting for urgent help. Thanks you..
    Regards,
    Mohit

    Hi,
    Send me Environment Details .
    Here is the code  snippet for exporting report to excel format:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import="com.crystaldecisions.sdk.framework.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.managedreports.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <%
    String username ="Administrator";
    String password ="";
    String cmsname ="localhost:6400";
    String Authen ="secEnterprise";
         //connecting to Enterprise
         IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon(username,password,cmsname,Authen);
         //get the report App Factory form the Crystal Enterprise
         IReportAppFactory appFactory = (IReportAppFactory) es.getService("","RASReportService");
         //get the infostore service form the Crystal Enterprise
         IInfoStore istore = (IInfoStore) es.getService("","InfoStore");
         //get the report by name from crystal Enterprise
         IInfoObjects iobjects = istore.query("Select * From CI_INFOOBJECTS Where SI_NAME = 'sampleramz2.rpt' and SI_INSTANCE = 0 ");
         //open the report in the report doc object.
         ReportClientDocument Doc = appFactory.openDocument((IInfoObject)iobjects.get(0), 0, Locale.ENGLISH);
         // WORKING WITH THE PRINT OUTPUT CONTROLLER
         //Use the report documents PrintOutputController to export the report to a ByteArrayInputStream
         ByteArrayInputStream byteIS = (ByteArrayInputStream)Doc.getPrintOutputController().export(ReportExportFormat.recordToMSExcel);
         // EXPORTING THE REPORT
         //Create a byte[] (same size as the exported ByteArrayInputStream)
         byte[] buf = new byte[2000 * 1024];
         int nRead = 0;
         //Set response headers to indicate pdf MIME type and inline file
         response.reset();
         response.setHeader("Content-disposition", "inline;filename=ramz");
         response.setContentType("application/xls");
         //Send the Byte Array to the Client
         while ((nRead = byteIS.read(buf)) != -1)
              response.getOutputStream().write(buf, 0, nRead);
         //Flush the output stream
         response.getOutputStream().flush();
         //Close the output stream
         response.getOutputStream().close();
    %>
    Let me know any information is needed,
    Regards,
    Rameez

  • How to reserve the page size when exporting to MS Excel 2010

    Hello. I have a report which exports to MS Excel 2010. I applied the page size as legal in Crystal Report and would like to use the same page size in Excel
    However, MS Excel print preview says the page size is letter.
    How could I keep the same page size in Excel as I applied in Crystal Report. We have a lot of business reports and would like to avoid applying page setting manually in Excel when users print them out each time.
    Thank you.

    Hi Christine
    I am in the process of writing a doc on the different options in CR and the "No Printer" option sis one of those. Seeing this post, made me wonder as this looked like a questionable behavior. My testing does not support your observations. Now, I did a very simple test;
    Created a report, set "No Printer", set the paper size and legal orientation. Exported to XLS - any format, and the export maintained legal paper size in all instance. I did a few other variations, but I can never get the report to export anything other than Landscape.
    Can you  please let me know the version of CR you are using?
    You may also want to attach the report here with saved data (to attach rename the rpt to txt, then in the reply hit on the "Use advanced editor" link and attach.
    BTW.; I am using CR 2013.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Exporting report to Excel format

    We try to implement automated export to Excel Format but Crystal Report XI Java runtime doesnu2019t support export to Excel Format but pdf.
    Do I need to migrate to Crystal Report Eclipse 2.0 for exporting report in Excel format?
    Or I can deploy the Crystal Report Eclipse 2.0 Java runtime only for exporting to Excel Format?

    As I know, you can easily export the data from an MS Access Report to Excel, but it's really hard to get the formats exported along with the data, or just not doable at all. 
    Please see these links:
    http://www.howtogeek.com/howto/microsoft-office/export-an-access-2003-report-into-excel-spreadsheet/
    http://www.access-programmers.co.uk/forums/showthread.php?t=143884
    Also:
    https://social.msdn.microsoft.com/Forums/office/en-US/826a30c5-775e-4a51-b639-2ffb046bfe85/formatted-access-report-to-excel
    Also, keep in mind...it's easy to export the data from a report to Excel.  You can certainly setup Excel as a template, which has all the formatting applied and just sits on your disk drive...somewhere...waiting for you to dump new data into it from
    a new report...whenever you need it.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Error While Exporting Crystal Report in XLS

    Hi
    when i am exporting crystal report in PDF or MS-Word its working fine
    When i am going to export crystal report to Microsoft-Excel 97-2000 (XLS) i am encountering ....
    Error in File C:\WINNT\TEMP\{6A5FE727-7FDE-479F-A7D0-96EE33EF5A4F}.rpt: The request could not be submitted for background processing.  this error...
    Can anybudy plz have its solution??
    Edited by: vishal patil on Sep 29, 2008 3:21 PM

    Hi Visahal,
    Try to re-install the export excell dll files.  Go in Controll pannel Add and Remove ProgaramsClick on Crystal Reports Click on ChangeSelect Add/RemoveThen expend ExportSelect Excel export and click on ok to reinstall the excel export dlls.
    After re-installation try to export to excel.
    Thanks,
    Sastry

  • "The process cannot access the file ..." occurs when export crystal report

    We are using a web application developed in VS 2005, .NET 2.0 with the bundled Crystal Reports version 10.2.3600.0 running on a Windows 2003 Standard server with 4GB Ram and Dual CPU's. Periodically we are still receiving the following error in our production environment:
    InnerException:
    The process cannot access the file because it is being used by another process.
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)
    This is occuring at the point on the code where the report is being exported to a PDF. Exporting the report to Excel does not appear to cause the error.
                    Stream outStream = report.ExportToStream(ExportFormatType.PortableDocFormat);
                    byte[] charStream = new byte[outStream.Length];
                    outStream.Read(charStream, 0, (int)outStream.Length);
                    if ((charStream != null) && (charStream.Length > 0))
                        HttpContext.Current.Response.ContentType = "application/pdf";
                        HttpContext.Current.Response.OutputStream.Write(charStream, 0, charStream.Length);
                        HttpContext.Current.Response.End();
                report.Close();
                report.Dispose();
                ds.Dispose();
                GC.Collect();
    Closing and disposing of the report and dataset (xsd) are followed by a call for garbage collection. We are unable to produce the error in our development environmennt and have not at this point been unable to pinpoint a problematic report. The development team members do have SP1 installed. The report limit has not been changed from the standard of 75 jobs.  Reviewed the following document, Re: "The process cannot access the file ..." occurs when export crystal report However this applies to VS 2008. Any suggestions to resolve the issue would be greatly appreciated.
    Thanks,
    Joe

    Good morning Joe
    For more details re. loading please see the following resources:
    [Crystal Reports 2008 Component Engine Scalability|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7025839b-00d4-2b10-33b4-cf0aa9e08412?quicklink=index&overridelayout=true]
    [How Can I Optimize Scalability?|http://msdn.microsoft.com/en-us/library/ms225519.aspx]
    [Choosing the Right Business Objects SDK for Your Needs|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40bccdfd-88a6-2b10-1da1-c47a54b625a7]
    To answer your questions:
    Is it correct to presume that the physical number of CPU's is not factored into the CPL? So that a Server with 2 or more processors does not increase the 3 concurrent requests? Therefore 2 CPU's would not increase the CPL limit to 6 processes?
    - Server with 2 or more processors does not increase the 3 concurrent requests.
    What would be an alternate solution to this limit be, considering the report requests could increase significantly?
    - Only way around this would be to web farm the solution
    If only only 3 reports can be processed at the same time. If one or more of the reports currently processing is taking longer due to receiving large amounts of data, how does that affect the queue? And what is stored in the queue, data and/or the report? Is this something that could consume memory?
    - The report can take as much time as it needs. The result is that one license will not be released until the report is done. There is no data stored, just a pointer to the report. However queued apps will chew up memory, some times to the point of the server becoming unresponsive
    I have read in the documentation on this site, that the dataset sent to the engine is copied in memory during report construction. So if a large amount of data is requested for a report (as an example 10+ MB) Could enough users requesting reports drive the memory up because memory usage doubled due to the dataset?
    - Absolutely. See [Crystal Reports Guide to ADO.NET|http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/401c4455-a31d-2b10-ae96-fa57af5aec20].
    Understanding the the CR DLL's are loaded on the first report request, do they get released at some point time due to inactivity or garbage collection? How much memory usage could be consumed when they load and stay resident?
    - No they do not. Not as long as the application is running.
    Ludek

Maybe you are looking for

  • Error while activating function module

    Hi, I copied a standard SAP function module L_TO_CREATE_DN. When i activated the function group it throws an error saying that " Field "I_COMMIT_WORK" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement". All th

  • Is it possible to copy the artists that I added through iTunes to my music files to the actual files? If so, how?

    Hello community, I edited the artists through iTunes, but it did not edit the actual mp3 file on my computer. Is it possible to convert the artists I have edited through iTunes to be able to have the artists on the actual mp3 files instead of just in

  • How to I get the apple TV to connect to my NAS drive (network drive)

    HI, I have a NAS dive on my network which I use to store all my files/music on. Currently, I have ALL my itunes content on the nas drive which is fine for my pc/laptop to access via itunes but, I would like to configure my Apple TV to do the same. Ca

  • PKCS12 - Different resutls on JDK1.4 and JDK 1.5 and above

    Hi guys, i've recieved a PKCS12 file which contains a certificate and private key that i am supposed to extract. As im new to certificates and the whole PKI infrastructure i attempted to write a small program to try and view the contents of the PKCS#

  • ALE Configuration Questions

    Hello Experts, I have a few questions regarding ALE Configuration, help appreciated 1) Is it necessary to create user for ALE transfer in both sender and receiver system ? 2) Is it necessary to create logical system for both sender and receiver in bo