Incorrect CrystalDecisions.CrystalReports.Engine.Table.Location

Hi All,
I'm doing a project where my report developer team is developing reports in Crystal reports XI.
This report use oledb provider to connect to sql server 2000. 
I have tables name like
"abcowner.xyztable"
"pqrowner.xyztable"
so same table in different owner/schema.
Crystal report is using "pqrowner.xyztable" and it runs fine in crystal report. 
I'm have embedded this report in asp.net 3.5 and using 11.5.37.0 runtime. When this report is run in asp.net application using
CrystalDecisions.CrystalReports.Engine.ReportDocument() , it's using table in different schema i.e. "abcowner.xyztable".
I have to manually change the location of the table to point to correct owner.  I can't fix like this becuase the application wouldn't know which owner/schema to pick.
foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
                    crTableLogonInfo = crTable.LogOnInfo;
                    crTableLogonInfo.ConnectionInfo = crConnectionInfo;
                    string strLocation = crConnectionInfo.DatabaseName + "SCHEMA/OWNER." + crTable.Location.Substring(crTable.Location.LastIndexOf(".") + 1);
                    crTable.ApplyLogOnInfo(crTableLogonInfo);
                    crTable.Location = strLocation;
Any suggestion ?
Thanks
Thanks in advance.

One thing I'd do 1st is make sure you are on [SP 6|https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe]. Eventually you'll need the SP 6 runtime:
CR XI r2 (SP6) MSM     
https://smpdl.sap-ag.de/~sapidp/012002523100000634042010E/crxir2sp6_net_mm.zip
CR XI r2 (SP6) MSI     
https://smpdl.sap-ag.de/~sapidp/012002523100000633302010E/crxir2sp6_net_si.zip
Perhaps using the InProc RAS SDK will be better also. See KB [1553921  - Is there a utility that would help in writing database logon code?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333933323331%7D.do].
- Ludek

Similar Messages

  • CrystalDecisions.CrystalReports.Engine.InternalException Error

    Post Author: crash75k
    CA Forum: .NET
    I am getting the following error when generating and printing a crystal report from my .net project.  It's rather intermitant, that is i know the data isn't the problem as have re-run a record which caused the error and it printed successfully.  Little bit confused as to actually what is causing the problem?  One thing i did try is moving to a different printer which helped, that is the problem happens less frequently but still occurs. Any ideas Ta  CrystalDecisions.CrystalReports.Engine.InternalException: Error in File F:\DOCUME1\ADMINI1.RIM\LOCALS1\Temp\Omgeo Import Print {7AE4245E-AC71-47F2-BEDB-C76014B48B83}.rpt:The request could not be submitted for background processing. ---> System.Runtime.InteropServices.COMException (0x800002AD): Error in File F:\DOCUME1\ADMINI1.RIM\LOCALS1\Temp\Omgeo Import Print {7AE4245E-AC71-47F2-BEDB-C76014B48B83}.rpt:The request could not be submitted for background processing.   at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault)   at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type)   at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)   --- End of inner exception stack trace ---   at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)   at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)   at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataTable dataTable)   at OmgeoImporter.CrystalComponent.setDataSetTable(DataTable dsp)   at OmgeoImporter.Importer.printCrystal(DataSet txtds)

    Post Author: MJ@BOBJ
    CA Forum: .NET
    Intermittent issues can be very difficult to troubleshoot and solve.  This particular error typically occurs when trying to process data (not necessarily a particular row of data), but it could be related to other things (as you noticed when changing printer drivers).  I would make sure you have the latest patch for the version of CR you are using as there have been fixes done for this error.
    Otherwise, I recommend working with the BOBJ support team to help troubleshoot the issue as there are a lot of things that can be investigated to find the root of the issue.

  • CRVS2010 Beta - .CrystalReports.Engine.Table.Friend  -BUG Coding ERR

    Table is is a Constructor in System.Web.UI.WebControls
    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.table.aspx
    Yet you are using this reserved word in CrystalDecisions.CrystalReports.Engine.Table.Friend Sub New()
    try
    Imports CrystalDecisions.CrystalReports.Engine
    Partial Class tablerror
        Inherits System.Web.UI.Page
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim tbl As Table = New Table()
        End Sub
    End Class
    Updated to inform it's CRVS2010 issue
    Edited by: Don Williams on Oct 30, 2010 8:44 AM

    What other information are you looking for? This is an extremely simple issue to track down.
    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.table.aspx - is all you need.
    Imports CrystalDecisions.CrystalReports.Engine
    Dim tbl As Table = New Table()
    Try it...
    This IS a BUG with CRVS2010 Beta.

  • CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.

    Post Author: olabisi
    CA Forum: .NET
    Hello All,
    i am working on a project and try to come up with a report using crystal report that is embedded with vs 2003.net and the following error was generated.
    this is the error in detail:
    Server Error in '/BISI' Application.
    Logon failed.
    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.LogOnException: Logon failed.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:
    [LogOnException: Logon failed.]
        . I(String   , EngineExceptionErrorID   )
        . D(Int16   , Int32   )
        . C(Int16   )
       CrystalDecisions.CrystalReports.Engine.FormatEngine.GetLastPageNumber(ReportPageRequestContext reqContext)
       CrystalDecisions.ReportSource.LocalReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
       CrystalDecisions.Web.ReportAgent.get_LastPageNumber()
       CrystalDecisions.Web.ReportAgent.u(Boolean  n)
       CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e)
       System.Web.UI.Control.PreRenderRecursiveInternal()
       System.Web.UI.Control.PreRenderRecursiveInternal()
       System.Web.UI.Control.PreRenderRecursiveInternal()
       System.Web.UI.Page.ProcessRequestMain()
    Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
    Note: this report has a main report that have three subreport in it. It was working fine until i added the third sub report to the main form.I will be glad if a solution could come up fast. This is  my email : [email protected] or [email protected]
    Jacobs

    I would recommend looking at this White paper on how to logon to a database:
    http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf
    Right now, looking at your code, it's quite convoluted. E.g.; you se the connection info, then load the report, then set it to the viewer, then do setdatabaselogon...
    You may also want to see the sample app vbnet_win_dbengine sample app in this download:
    https://smpdl.sap-ag.de/~sapidp/012002523100006252822008E/net_win_smpl.exe
    Finally, I'd recommend that you search these forums as there are a  number of great solutions here also.
    Ludek

  • Pls Help Out: Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.

    Post Author: olabisi
    CA Forum: .NET
    Hello All,
    i am working on a project and try to come up with a report using crystal report that is embedded with vs 2003.net and the following error was generated.
    this is the error in detail:
    Server Error in '/BISI' Application.
    Logon failed.
    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.LogOnException: Logon failed.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:
    [LogOnException: Logon failed.]
        . I(String   , EngineExceptionErrorID   )
        . D(Int16   , Int32   )
        . C(Int16   )
       CrystalDecisions.CrystalReports.Engine.FormatEngine.GetLastPageNumber(ReportPageRequestContext reqContext)
       CrystalDecisions.ReportSource.LocalReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
       CrystalDecisions.Web.ReportAgent.get_LastPageNumber()
       CrystalDecisions.Web.ReportAgent.u(Boolean  n)
       CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e)
       System.Web.UI.Control.PreRenderRecursiveInternal()
       System.Web.UI.Control.PreRenderRecursiveInternal()
       System.Web.UI.Control.PreRenderRecursiveInternal()
       System.Web.UI.Page.ProcessRequestMain()
    Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
    Note: this report has a main report that have three subreport in it. It was working fine until i added the third sub report to the main form.I will be glad if a solution could come up fast. This is  my email : [email protected] or [email protected]
    Jacobs

    Post Author: mewdied
    CA Forum: .NET
    You need to make sure that you are passing the database logon code to the third sub-report correctly.  If you are currently only passing database logon to the main report, it may be that the other two subreports are using the same connection as the main, but the third one is using something different.

  • CrystalDecisions.CrystalReports.Engine version 9.1.5000 assembly missing

    Hi I'm a potential employee for a software developing company called Data Futures. I recently applied for the Quality Assurance Specialists job and they gave me a project to work on to determine If I'm a good fit for their company. The project is to write and execute a test plan for an application program. When I try to run this application program it runs fine until I click the reports option. When I click it the program throws an exception saying it's missing the CrystalDecisions.CrystalReports.Engine version 9.1.5000. I did alot of googling on the net and I think I know the problem but I'm not 100% sure. I think according to the assembly version it shows that I need the Crystal Reports for Visual Studio 2003 .NET runtime files. Am I correct in assuming that? I don't have either CR or VS 2003 on my computer. Because I don't have VS 2003.NET  I don't think I can use merge files(.msm). If I find msi files will I need to enter a product key to install them? The application program they gave me didn't come as a deployment package. All they gave me was the executable, some dlls and some other files with it but no runtime files to make it run properly. Please Help! Here is the exact error I get:
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.
    Exception Text **************
    System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
    File name: 'CrystalDecisions.CrystalReports.Engine, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
       at SlickSellCustomerInvoicesSystem.DisplayForm..ctor(DataSet dataset)
       at SlickSellCustomerInvoicesSystem.RunReports.RunInvoiceReport()
       at SlickSellCustomerInvoicesSystem.MainForm.menuItemAllInvoiceRpt_Click(Object sender, EventArgs e)
       at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
       at System.Windows.Forms.MenuItem.MenuItemData.Execute()
       at System.Windows.Forms.Command.Invoke()
       at System.Windows.Forms.Command.DispatchID(Int32 id)
       at System.Windows.Forms.Control.WmCommand(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    SlickSellCustomerInvoicesSystem
        Assembly Version: 1.0.1867.16218
        Win32 Version: 1.0.1867.16218
        CodeBase: file:///C:/Documents%20and%20Settings/Tommy/Desktop/Sample%20Test%20Project/SlickSellSolution/SlickSellSolution/SlickSellSolution/SlickSellCustomerInvoicesSystem/obj/Release/SlickSellCustomerInvoicesSystem.exe
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    For example:
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    I assume this is posted in error as it is the same as:
    CrystalDecisions.CrystalReports.Engine version 9.1.5000 assembly missing
    Thus marking as answered and locking
    Ludek

  • Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine.dll

    Hi there,
    I am going through the process of migrating an existing web solution from Visual Studio 2008 to Visual Studio 2010.
    As part of that I have installed the recently released Crystal Reports for Visual Studio 2010.
    One of our projects has a reference to  'CrystalDecisions.CrystalReports.Engine and everything seems fine within Visual Studio 2010, but when I try to run the solution I get the following error.
    System.BadImageFormatException: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine.dll' or one of its dependencies.  is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
    I have set up the projects to target .net framework 4 and started by setting them to compile for 32 bit....
    This is quite frustrating so any ideas would be very much appreciated.
    Kind Regards
    Robert

    Hi Don,
    Yes, it is set to the full framework... I am running on a 64 bit Windows 7 machine. 
    One thing I have noticed is that if I try to load the crystal library through Depends (an application that shows the library dependancies), the different libraries that CrystalDecisions.CrystalReports.Engine.dll depend on are listed as 64 bit (on my machine), yet  'CrystalDecisions.CrystalReports.Engine.dll  is a 32 bit library... this is flagged as an error in depends... In fact the first time I ran it it also couldn't find IESHIMS.DLL (because it is not in the PATH) by default.  Anyway, there is no 64 bit CrystalDecisions.CrystalReports.Engine.dll that I can see so I'm a bit confused.  In fact I am a lot confused.
    I have not as yet tried to building a fresh simple test solution with a crystal reference in it..
    Thanks
    Robert

  • CrystalDecisions.CrystalReports.Engine.DataSourceException with VS 2010 4.0

    Hi All,
    i have converted my Windows 2.0 Application to 4.0 framework & installed Crystal Reports For VS 2010.
    we have also upgraded to 64 bit.
    But i am not able to open the Reports at runtime it throws an error :
    "Failed to Load Database information".
    CrystalDecisions.CrystalReports.Engine.DataSourceException
    i m using Dataset as a datasource which i set at runtime
    & xml as Schema for Report Design it was working fine before i upgraded to 4.0 Framework.
    m i missing some Reference or Assembly??
    Edited by: Varsha Ramnani on Mar 15, 2011 6:50 AM

    Moved to .NET SDK forum....
    Search first, lots of info available.
    Go to the bottom of this page to get the distribution packages for your updated app:
    http://www.sdn.sap.com/irj/boc/crystalreports-dotnet
    You also need to set the CPU to x86 or X64 depending on which platform your WEB server is running in, 32 or 64 bit mode.
    And set the Framework to for the Full version, not the client only.
    CR for VS 2010 is the only version supported in VS 2010.
    Don

  • 'Load report failed' msg reported by CrystalDecisions.CrystalReports.Engine

    Dear member,
    We are using Crystal Report viewer (Version 11.5) from our Web based product on Windows Server 2003.
    Sometime when we run the report generating application we get the error message 'Load report failed'.
    So far, we don't find any problem in our product.
    Has someone experienced a similar problem?
    How did you solve the issue?
    Thanks and best regards,
    Makoto
    Below are the error messages detail logged on event logs.
    Event Type:     Error
    Event Source:     AvantGard eTreasury
    Event Category:     None
    Event ID:     140
    Date:          4/02/2011
    Time:          2:21:31 PM
    User:          N/A
    Computer:     JP0010SWFIN41
    Description:
    The description for Event ID ( 140 ) in Source ( AvantGard eTreasury ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Source: CrystalDecisions.CrystalReports.Engine
    Target: EnsureDocumentIsOpened
    Function: .Initialise
    Message: Load report failed..
    Event Type:     Error
    Event Source:     AvantGard eTreasury
    Event Category:     None
    Event ID:     140
    Date:          4/02/2011
    Time:          2:14:18 PM
    User:          N/A
    Computer:     JP0010SWFIN41
    Description:
    The description for Event ID ( 140 ) in Source ( AvantGard eTreasury ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Source: CrystalDecisions.CrystalReports.Engine
    Target: PEOpenEngineEx
    Function: .Initialise
    Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt..

    Make sure you are closing and disposing of the report object once you are finished with them.
    What Service Pack are you on?
    Thank you
    Don

  • CrystalDecisions.CrystalReports.Engine.ReportDocument - missing ReportOptions properties

    Post Author: N11689
    CA Forum: .NET
    We are using standalone Crystal Reports XI Release 2 with Service Pack 2 to write our reports.  We have created a VB.NET 2005 application that our own software will run to execute the Crystal Reports we have developed.
    One of the options is to allow the user to Preview the report.  We do this using the CrystalReportViewer.
    We have noticed that not all of the ReportOptions from the report, specifically, Create Group Tree, is not available.
    We need this property to conditionally enable the Toggle Group Tree icon in the viewer.  We have 500+ reports that our users can select to print from our software, so we need to conditionally display the group tree based on how the report's Create Group Tree property is set.
    I have two questions:
    1)  Does anyone know how to access the report's Create Group Tree property from withing VB.NET 2005 using the Crystal Reports for .NET assemblies?
    2)  Where do I find the list of Business Object's open issues for the Crystal Reports for .NET assemblies?
    Thank you

    Post Author: N11689
    CA Forum: .NET
    Thank you for confirming that the group tree report option property is not there.
    Do you know where I can go to request an enhancement without having to open a $195.00 incident to tell Business Objects that they have left some functionality out of the Crystal Reports for .NET assemblies?
    Business Objects recommended we move to the .NET assemblies rather than RDC because the RDC has very limited support in the .NET environment.  Sounds like they are phasing it out.  So, we have move to using the .NET assemblies (per their recommendation), but keep coming across situations such as this.
    Thank you.

  • CrystalDecisions.CrystalReports.Engine.dll not installed on client

    I developped a small test application in VS 2010 that uses a reportviewer. The report has its own connection to a database and only accepts parameters at startup. When I try to run this program on a client computer, the program fails with an error message that the above mnetioned dll cannot be found. That is correct, as the .dll is not present. On my development computer it is present in the C:\Program Files\SapBusinessObjects\...\dotnet folder. On the client this folder contains just one .dll. I installed .Net 4 on it and I used the 32 bit runtime installer. The client's OS is win 7 starter.
    What is wrong?

    Fairly new to VS 2010.  I have the exact same issues that were described in this discussion. 
    However, I do not understand how to make a deployment project, and I especially don't understand what you included in your deployment project.
    What, exactly, was installed using the deployment project?  Did it have the runtime installer .msi?  The results of the runtime installer?
    Any help would be appreciated.

  • Crystal Reports 2008 - Changing Table Locations

    Hello,
    we have several reports which we use by different customers. The customers use different name spaces (table locations) for the same data. To use the same reports with different table locations, we wrote a piece of software replacing the connection strings and table locations. 
    Example:
    A report should be used in a test environment as well as in a production environment:
      The original SQL is (using a DB2 database on a AS400):
        SELECT alias.name FROM as400.production.users alias
      The modified SQL looks like:
        SELECT alias.name FROM as400.test.users alias
    Up to now we used Crystal XI and developed using RDC. We solved the above described problem by reading the report SQL string, replacing the table location in this string and assigned it back to the report object. Modifying the SQL string has the advantage that it works fine also for reports which contain a SQL command.
    Since Crystal Reports 2008 this is not possible anymore (no RDC, no direct way to modify the report SQL string).
    My first approach was to use the CrystalDecisions.CrystalReports.Engine.Table object. First I just wanted to see what really was the content of the Location and Name property:
    for (int i = 0; i < rdReport.Database.Tables.Count; ++i)
      Table rt = rdReport.Database.Tables<i>;
      Console.WriteLine("Table Nr : {0}", i);                   
      Console.WriteLine("  Table Loc  : {0}", rt.Location);
      Console.WriteLine("  Table Name : {0}", rt.Name);
    My problem with this is that the output for the report with the SQL in the above example is:
    Table Nr: 0
      Table Loc : users
      Table Name: alias
    So obviously not the real table location and table name is returned, but instead the table name for the table location and the alias for the table name. Unsurprisingly setting the location had not the originally desired effect.
    Furthermore if the report was designed using a SQL command, the location and in the name property contain the string COMMAND. Therefore the table object doesn't seems to be the solution to my problem.
    Thanks to the help of a user in this forum here, I figured out how to read the SQL string of a report. Unfortunately I did not found a way to assign it back to the report.
    Has anybody here an idea how to solve my problem? I'm open for every kind of hint.
    Thanks in advance,
    Ron

    My solution looks like this:
    ReportDocument rdReport = new ReportDocument();                   
    rdReport.Load(sReportName, OpenReportMethod.OpenReportByTempCopy);
    CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rcDocument = rdReport.ReportClientDocument;                   
    for (int i = 0; i < rdReport.Database.Tables.Count; ++i)
        CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable rctTable = rcDocument.DataDefController.Database.Tables<i>;
        if (rctTable.ClassName == "CrystalReports.CommandTable")
            Console.WriteLine("Processing CommandTable {0}",rctTable.Name);
            Console.WriteLine("  Old Qualified Name: {0}", rctTable.QualifiedName);
            Console.WriteLine("  Old Alias:          {0}\n" , rctTable.Alias);
            CrystalDecisions.ReportAppServer.DataDefModel.CommandTable tbOldCmd = (CrystalDecisions.ReportAppServer.DataDefModel.CommandTable) rctTable;
            CrystalDecisions.ReportAppServer.DataDefModel.CommandTable tbNewCmd = new CrystalDecisions.ReportAppServer.DataDefModel.CommandTable();
            tbNewCmd.Name = tbOldCmd.Name;
            tbNewCmd.Alias = tbOldCmd.Alias;
            tbNewCmd.CommandText = sNewSql;
            tbNewCmd.ConnectionInfo = tbOldCmd.ConnectionInfo.Clone(true);
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbAttr = tbNewCmd.ConnectionInfo.Attributes;
            // set dlls
            pbAttr["Database DLL"] = "crdb_ado.dll";
            pbAttr["QE_DatabaseName"] = "NL67S021OUD";
            pbAttr["QE_DatabaseType"] = "OLE DB (ADO)";
            pbAttr["QE_ServerDescription"] = "192.0.5.24";
            pbAttr["QE_SQLDB"] = "True";
            pbAttr["SSO Enabled"] = "False";
            // set connection string                  
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbLogOnProp = (CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag)pbAttr[sAttrLogOnProp];
            pbLogOnProp.RemoveAll();
            // strangely comma seperated values instead of semicolon seperated values are needed here
            pbLogOnProp.FromString("Provider=IBMDA400,Data Source=" + sServerName + ",Initial Catalog=" + sDBName + ",User ID=" + sUserId + ",Password=" + sPwd + ",Convert Date Time To Char=TRUE,Catalog Library List=,Cursor Sensitivity=3");
            tbNewCmd.ConnectionInfo.UserName = sUserId;
            tbNewCmd.ConnectionInfo.Password = sPwd;
            rcDocument.DatabaseController.SetTableLocation(tbOldCmd, tbNewCmd);                           
        else
            Console.WriteLine("Processing Table {0}",rctTable.Name);                           
            Console.WriteLine("  Old Qualified Name: {0}", rctTable.QualifiedName);
            Console.WriteLine("  Old Alias:          {0}\n", rctTable.Alias);
            CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable rctNew = new CrystalDecisions.ReportAppServer.DataDefModel.Table();
            rctNew.Name = rctTable.Name;
            rctNew.Alias = rctTable.Alias;
            rctNew.QualifiedName = sDBName + ".V41TSTDBF.CRGUOPF";
            rctNew.ConnectionInfo = rctTable.ConnectionInfo.Clone(true);
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbAttr = rctNew.ConnectionInfo.Attributes;
            // set dlls
            pbAttr["Database DLL"] = "crdb_ado.dll";
            pbAttr["QE_DatabaseName"] = "NL67S021OUD";
            pbAttr["QE_DatabaseType"] = "OLE DB (ADO)";
            pbAttr["QE_ServerDescription"] = "192.0.5.24";
            pbAttr["QE_SQLDB"] = "True";
            pbAttr["SSO Enabled"] = "False";
            // set connection string                  
            CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag pbLogOnProp = (CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag) pbAttr[sAttrLogOnProp];
            pbLogOnProp.RemoveAll();
            // strangely comma seperated values instead of semicolon seperated values are needed here
            pbLogOnProp.FromString("Provider=IBMDA400,Data Source=" + sServerName + ",Initial Catalog=" + sDBName + ",User ID=" + sUserId + ",Password=" + sPwd + ",Convert Date Time To Char=TRUE,Catalog Library List=,Cursor Sensitivity=3");
            rctNew.ConnectionInfo.UserName = sUserId;
            rctNew.ConnectionInfo.Password = sPwd;                         
            rcDocument.DatabaseController.SetTableLocation(rctTable, rctNew);
            Console.WriteLine("  New Qualified Name: {0}", rctTable.QualifiedName);
            Console.WriteLine("  New Alias:          {0}\n", rctTable.Alias);
    Console.WriteLine("\nSetting parameter {0} to value {1}", rdReport.ParameterFields[0].Name, iDataId);
    rdReport.SetParameterValue(0, iDataId);
    Console.WriteLine("\nShow SQL: ");
    CrystalDecisions.ReportAppServer.Controllers.RowsetController rsController;
    CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rdClient = rdReport.ReportClientDocument;
    CrystalDecisions.ReportAppServer.DataDefModel.ISCRGroupPath rdGroupPath = new CrystalDecisions.ReportAppServer.DataDefModel.GroupPath();
    string temp;
    string sql;
    rsController = rdClient.RowsetController;
    sql = rsController.GetSQLStatement(rdGroupPath, out temp);
    Console.WriteLine(sql);
    Console.WriteLine("Printing");
    PageMargins pmMargins = rdReport.PrintOptions.PageMargins;
    pmMargins.bottomMargin = 350;
    pmMargins.leftMargin = 350;
    pmMargins.rightMargin = 350;
    pmMargins.topMargin = 350;
    rdReport.PrintOptions.ApplyPageMargins(pmMargins);
    rdReport.PrintOptions.PrinterName = sPrinterName;
    rdReport.PrintToPrinter(1,     // copies
                            false, // collated
                            0,     // start page
                            0);   // end page
    rdReport.Close();
    Regards,
    Ron

  • Could not load file or assembly 'CrystalDecissions.CrystalReports.Engine, '

    Dear Experts,
    I am running crystal report viewer in SAP B1 2007A but one of my client machine will get the following error messages
    when I try to run the CR application:
    Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
    The client is not using any MS VS & CR in her machine. I also not so sure what is the main cause of this problem as I not so familiar with CR in SAP B1.
    Kindly help me to resolve the error. thx.
    Regards,
    xavier

    Hi xavier.rayne,
    Check following link.
    http://forums.asp.net/t/1388703.aspx/1?CouldnotloadfileorassemblyquotCrystalDecisionCrystalReports+
    http://social.msdn.microsoft.com/Forums/en/vscrystalreports/thread/c9df7a18-513e-4c26-8b65-9578d3bddef0
    SAP Crystal Solutions Support
    I hope this will help you
    Thanks,
    Srujal Patel

  • Set Table Location for Reports(Command Objects)

    Hi SAP Gems,
    I would like to thank TED,Merry,Jonathan, Shawn, and all the developers contributing to this community.
    I would really appreciate any help on following question:
    1. I have a report designed in CR 2008 against DB2(JDBC Connectivity).
    2. The report is working fine in the designer.
    3. There are five sub reports in the main report.
    4. The main report doesnt have any command object however every child/sub report has command object with paramaters.
    5. Every subreport is linked.
    6. I would like to change runtime datasource location for this report using CRJ 2.0 SDK'S.( from AIX to Windows BOX)
    7. Both BOX's have same database schema.
    8. I am able to view the report in the jsp page using SDK's, however "set table location doesnt works and prompts me the error:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected database connector error---- Error code:-2147467259 Error code name:failed
    *There is no problem with the code because the sample code is taken from sdn.sap as it is and it works for other report without subreport and command objects.
    I tried using the following code piece but again same problem.
    if(table instanceof com.crystaldecisions.sdk.occa.report.data.CommandTable)
                        IProcedure command = (IProcedure)table;
                        ParameterField commandParam = (ParameterField) command.getParameters().get(0);
                        Values values = new Values();
                        ParameterFieldDiscreteValue pfdv = new ParameterFieldDiscreteValue();
                        pfdv.setValue("ANTON");
                        values.add(pfdv);
                        commandParam.setCurrentValues(values);
    I would like to know if I dont want to set the command level param using:
    ParameterField commandParam = (ParameterField) command.getParameters().get(0);
                        Values values = new Values();
                        ParameterFieldDiscreteValue pfdv = new ParameterFieldDiscreteValue();
                        pfdv.setValue("ANTON");
                        values.add(pfdv);
                        commandParam.setCurrentValues(values);
    would the parameter would be prompted automatically?
    how do I find what paramaeter to set and how ?
    Regards,
    Jonathan Roy

    Hi ,
    Can any one help please?
    Ted !! I would really appreciate an answer from you.
    Regards,
    Jon

  • Table.Location error running Windows Vista (IIS 7)

    Post Author: surfhound
    CA Forum: Crystal Reports
    I am using crystal reports with ASP.NET 2 and I am trying to set the table location using the following code
    reportTable.Location = reportTable.Location.Substring( reportTable.Location.LastIndexOf(".") + 1 ) ;
    I get the following error:
    Failed to open the connection.\nDetails:  &#91;Database Vendor Code: 17 &#93;\rFailed to open the connection.\nC:
    Users
    jdoe
    AppData
    Local
    Temp
    Demo Chart {46D6F9EB-1D87-4972-9448-7C060D6FDBC5}.rpt\nDetails:  &#91;Database Vendor Code: 17 &#93;
    I'm using Windows authentication and set impersonate=true.  Any ideas?

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

Maybe you are looking for

  • MacBook Pro crashes after upgrading to Mountain Lion

    Since upgrading my MacBook Pro from Snow Leopard to Mountain Lion this morning, it has crashed without warning and rebooted (6 times). I never had any issues with Snow Leopard. Here is the latest crash report. Any ideas? Interval Since Last Panic Rep

  • How can I upload a pdf file into the application server?

    Hi, I have the otf data, which i have converted into pdf using the funcation module "Convert_otf". Is it possible to upload the pdf file in application server?

  • Getting an error message when I convert to .WMV

    So I have my project all done, I got to convert to a WMV file, and then it pops up the error message of "Insonsistent Audio Sample Rate" "The media you are exporting contains audio with multiple sample rates." Now when I check the sample rates on eve

  • Kernel panic updating to 10.7.1 or 10.7.2... (mac mini 4,1)

    I have this problem since 10.7.1 came up and tried to upgrade; mac restarts to a kernel panic and have to restore a backup. At first I thought that when 10.7.2 became available it would solve it but still get the kernel panic at startup. I've tried d

  • I can not see my facetime corresponding

    Good afternoon, I try to contact a friend with facetime. I can hear him but I can't see him. What I have to do to can see friend on ficetme with an macbook pro 13 without retina. Thank you for your help.