Cannot change Datasource location in report

Post Author: TomS
CA Forum: Data Connectivity and SQL
I have a CR report that I am working on (inherited from another developer). For the life of me, this report will NOT let me change the database location! I need to point it to another database (MS SQL Server) that is the same thing (same tables, etc) but a different name/data. I go to Database...Set Data Location; however, when I try to do the Update to update the data location, I get the message
Database Connector Error: '42S02:[Microsoft][ODBC SQL Server Driver][SQL Server][Invalid object name 'Old_database_name_here.dbo.table_name', [Database Vendor Code: 208]
It is as though the database name(s) is hard coded somewhere in the report. I have tried and tried to get this to point to another DB while developing in Crystal (using Print Preview) but it will not work. So I am stuck using my development database and not my production database.
I feel as though I am going to have to rewrite this report entirely to allow me to test against different databases. Anyone got any idea as to why this will not let me change database sources? Any help appreciated. Thanks in advance.
Tom

Post Author: sharonmtowler
CA Forum: Data Connectivity and SQL
if it uses a stored procedure, it may be hardcoded in the dataset.
you can export the report in crystal to a report definition select application and you can see where all your hidden items etc are.

Similar Messages

  • Change datasource of Crystal Report via code

    Hi all!
    I'm developing partner solution for SAP B1 8.8 in C# and prepared some nice crystal reports. But they are bound to my default database for now. I want to include them to my installation file and change saved datasource location (Server, Company Name, User name, User password) in my installation script as soon as I get this values, entered by user. But I don't know the way how to change datasource in rpt file. I've tried the following:
    using CrystalDecisions.CrystalReports.Engine;
    ReportDocument rDoc = new ReportDocument();
    rDoc.Load(@"C:\Temp\Report2.rpt");
    rDoc.DataSourceConnections[0].SetConnection("Server", "SBOTest", "manager", "manager");
    rDoc.SaveAs(@"C:\Temp\Report3.rpt");
    rDoc.Close();
    but it save no changes to rpt file.
    I think, this thread belongs mostly to Development/SDK thread, because here most of the people make programs and potentially met this problem in the past.

    public void SetCrystalLogin(string sUser, string sPassword, string sServer, string sCompanyDB, CrystalDecisions.CrystalReports.Engine.ReportDocument oRpt)
                CrystalDecisions.Shared.ConnectionInfo oConnectInfo = new CrystalDecisions.Shared.ConnectionInfo();
                oConnectInfo.DatabaseName = sCompanyDB;
                oConnectInfo.ServerName = sServer;
                oConnectInfo.UserID = sUser;
                oConnectInfo.Password = sPassword;
                // Set the logon credentials for all tables
                SetCrystalTablesLogin(oConnectInfo, oRpt.Database.Tables);
                // Check for subreports
                foreach (CrystalDecisions.CrystalReports.Engine.Section oSection in oRpt.ReportDefinition.Sections)
                    foreach (CrystalDecisions.CrystalReports.Engine.ReportObject oRptObj in oSection.ReportObjects)
                        if (oRptObj.Kind == CrystalDecisions.Shared.ReportObjectKind.SubreportObject)
                            // This is a subreport so set the logon credentials for this report's tables
                            CrystalDecisions.CrystalReports.Engine.SubreportObject oSubRptObj = oRptObj as CrystalDecisions.CrystalReports.Engine.SubreportObject;
                            // Open the subreport
                            CrystalDecisions.CrystalReports.Engine.ReportDocument oSubRpt = oSubRptObj.OpenSubreport(oSubRptObj.SubreportName);
                            SetCrystalTablesLogin(oConnectInfo, oSubRpt.Database.Tables);
                oRpt.Refresh();
                oRpt.SetDatabaseLogon(sUser, sPassword, sServer, sCompanyDB, false);
                oRpt.VerifyDatabase();
                oRpt.Refresh();
            private void SetCrystalTablesLogin(CrystalDecisions.Shared.ConnectionInfo oConnectInfo, Tables oTables)
                foreach (CrystalDecisions.CrystalReports.Engine.Table oTable in oTables)
                    CrystalDecisions.Shared.TableLogOnInfo oLogonInfo = oTable.LogOnInfo;
                    oLogonInfo.ConnectionInfo = oConnectInfo;
                    oTable.ApplyLogOnInfo(oLogonInfo);
    Edited by: Konstantin Rakhuba on May 6, 2010 11:44 AM
    Edited by: Konstantin Rakhuba on May 6, 2010 11:45 AM

  • Changing Datasource Location Does not Change Procedure Name

    <p>Is there a way to change the name of the stored procedure in the field explorer after changing the datasource location? I&#39;ve changed stored procedures in my report but it keeps the old name.</p><p> Crystal Reports 11 v2</p>

    -Database/Database Expert
    -Highlight SP on right hand database tree
    newSP
    ...this renames sp prefix across all<br /> formula and output fields in report<br />It&#39;s really an alias: it does not physically <br />change the SP name.

  • How to change datasource location in CR V10

    How to change the datasource location in CR10, I need to use same table in different database. I tried in "Set Datasource Location" but it is not updating to the new one which i have selected. please help me on this.
    Thanks,
    S Aravind.

    Hi Try like this,
    Go to the Database option on the top > Select Set data source option.
    The top portion of the Set Data source Location window shows the current connection and part at the bottom is where you would make a connection to the new database
    Once the connection has been made, select 'one' table from the current connection and then select a matching table in the new connection and click on the 'Update' button. Do this for all the tables one by one.

  • Changing Datasource Location

    Hi,
    CR 2011
    I have an existing Invoice report, very straightforward, using a single table: BW_AUFTR_KOPF (Orders Header)
    Now I need the "same" data from the Credits side.  BW_GUTSCH_KOPF (Credits Header) has exactly the same structure as the Orders Header.
    I change the Datasource from BW_AUFTR_KOPF to BW_GUTSCH_KOPF, and the report looks great, life should be so simple, but I notice that all the table references remain the same.  By all appearances it still looks like I'm using the BW_AUFTR_KOPF table, even when I close and reopen.
    I'm surmising that this is deliberate, so that all formula references just remain as is.
    Are there any caveats in doing this?  Where can I see the actual table being used to verify?
    Thanks,
    Matt

    Hi Matthew,
    As per your description, I understyand that you have updated data source even though it is showing old table name. Kindly correct me if I am wrong.
    If you expand the Connection name(BW_AUFTR_KOPF) then it will show the Table Name which is used in report.
    You can change Conncection Name by using Database > Database expert option.
    -Praveen G

  • Run report from forms - Cannot change file name in report node

    I am running a report (9i) from forms (9i) and I changed the name of the report in the filename field in the report node (in object navigator).
    I noticed that I get the error FRM-41214 on the RUN_REPORT_OBJECT line when I run the form, if I've changed the filename from what it originally was. e.g. It was originally rep44.rdf and I changed it to rep55.rdf, but I get this error unless I keep the rep44.rdf filename. Why? Is there somewhere else I should change this filename?

    To view the reports queue open this URL:
    http://<server>:<port>/reports/rwservlet/showjobs?server=<repserver>
    Also, try running the report stand alone, not from Forms.
    http://<server>:<port>/reports/rwservlet?server=<repserver>&report=rep55.rdf&userid=<un>/<pw>@<db>&destype=cache&desformat=PDF

  • Change datasource in existing report

    Hi,
    I have created a WebI report (SAP Business Objects BI Platform 4.0 Client Tools (version 14.0.2.364)), on top of a BEx query. The report has one crosstab table with additional variables created. I now want to change the original BEx query to a new BEx query. Is it possible to make that change without changing the entire report? Is it possible to change just the underlying query? Please help! Thanks!
    -Janice

    Hi,
    the workflow you need to follow is:
    Data -> Data Provider -> Tools -> Change Source -> Query -> Specify new source -> Select data Source -> BEx  etc..
    This will bring up a wizard where it will make assumptions about object mappings. you need to confirm or modif these.
    Providing that the master and meta data isn't too radically different in the new target BEx, you're report may survive
    Regards,
    H

  • HT4995 I cannot change my location services on my ios 7 grayed out?

    Just go tmy new 5s and I synced but all my location services is grayed out and I cannot change

    ooops sorry, its settings, general,restriction passcode 0000. have a good day

  • Issue with changing database location at runtime

    I am having a similar issue to:
    Re: Issue with changing database location at runtime
    where I am using Crystal Reports 2008 SP 3 fix pack 3.3 and a OLE DB connection to a SQL 2008 R2 server. Running on a computer on the network where the report can see the original development server is fast, other computers where that server is not available are hanging 20 seconds before coming up.
    I am using the same code from the Crystal Sample app to change the connection on each table. I found that the slowness comes the first time the ReportDocument object is accessed to get the collection of database tables, before the connection info is set.
    Fix pack 3.4 was mentioned in that post.  Does fix pack 3.4 fix that issue? I don't see fix pack 3.4 on the downloads page (https://websmp130.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/bobj_download/main.htm)

    I just found on the reports that were having the issue there was a SQL Expression.  Per this thread:
    Re: Report load is slow after changing database servers
    There was an issue with that and the fix is not out til the end of Feb so I found a way not to use the SQL Expression and the speed is much better.
    However, your information provided led me to this post:
    Cannot Change Table Location, but Only for One Report
    And I am also experiencing an issue where the table location is not changing on one subreport and I will look into that as a possible solution.
    Thanks so much for your help.

  • Set datasource location command at runtime

    Post Author: Jamal
    CA Forum: Semantic Layer and Data Connectivity
    Dear Folks,
    I have crystal report 10 and MS access, I need to change my datasource location at runtime without having to type code other than crystal report like VB or C++, Do crystal report have this possibility to change datasource location at runtime without needing to code other than crystal report ???
    Basicly I have multiple MS access database files and need one Crystal report to read from all of them at the same time, how can I do that without coding in a language other than crystal report.
    Best Regards
    Jamal

    Post Author: matthewh
    CA Forum: Semantic Layer and Data Connectivity
    Get a copy of BO Server and use a Business View.   Don't know of any way in Crystal Reports  itself.  BO Server is good but it ain't cheap.  Depends on how many users you have and what sort of budget you have.  I'm using it here and it has a lot of benefits. Alternatively build a data warehouse just for reporting using a proper DB engine and get a single report off that.  Use something like MySQL - fast, and above all - free!   If you don't need bang-up-to-the-second reports then run a scheduled data extraction and upload over night, load the data into the new warehouse and then run your reports against it.  I'm in the process of doing just that.  Read Ralph Kimball's books "The Data Warehouse Toolkit" and "The Data Warehouse ETL Toolkit" to get the idea.  The MySQL forum has a good Data Warehouse section.  A warehouse also gives you many advantages in that your production databases are not too heavily loaded, all your data conforms to set standards (eg data formats are all the same) and you have a historical record that can build over the years to many GB of data - I think Access will struggle with that ;0) - to name but a few.  Hope this helps.  BTW - thought of this last night - MySQL also has the Federated engine - so you could hook all your databases into it and query it with Crystal as though they were a single database.  Not sure if it'll connect to Access though.

  • Crystal Reports 10 Datasource Location and SQL Query update

    I am running Crystal Reports 10 accessing SQL Server 2008 database on Windows 7. Our product changed database names and I'm trying to update reports to point to the new database. Sounds nice and simple. The database has no structure changes yet, it's just a copy and rename of the old database. Both databases exist, same SQL instance, same permissions, etc. ...
    Existing working report:
       Has an ODBC (RDO) location to database DbVersion1
       If I run Show SQL Query, the database name is in the query text (i.e. FROM DbVersion1.dbo.MyTable)
    Attempted:
       In Set Database Location popup, I created a new ODBC (RDO) connection to database DbVersion2
       Updated Current Data Source for report to this new ODBC (RDO) connection.
       Ran Verify Database. Popup stated "The database is up to date."
    But when I run "Show SQL Query", is still shows DbVersion1 in the text, and the report displays data from DbVerison1. When I display the Datasource Location for the report, it shows DbVersion2 as I changed to above. How do I "refresh" the SQL Query to recognize the new Datasource Location?
    Thanks,
    Gary

    Hi Gary,
    A possible couple of issues, CR 10 doesn't support SQL Server 2008 and it doesn't support Windows 7. We had to update CR XI R2 SP 6 and above to make SQL 2008 work. MS changed the name of their client dll so CR is not aware of the new drivers.
    MDAC native driver may work but not sure....
    Try OLE DB, it may work better.
    Thanks
    Don

  • Crystal Reports 2008 - ERROR when changing datasource

    Hi, I have a report that is connected to a test database that needs to have the datasource changed to the production database.
    The Crystal Report has 2 "on-demand" subreports that the datasource has been changed for as well.
    SQL 2000 Databases on 2 different servers (W2003) used the "Set Datasource Location" and followed steps listed previously in the forum.
    Databases have different names but all tables are same in both.
    Database Expert is showing all tables coming from new datasource BUT when report is run parameter prompt comes up, click ok
    Error message - "Failed to retrieve data from the database" - click OK
    Error message - "Invalid Argument provided"
    Does anyone have an ideas on how to track down the issues.
    Please let me know if you need any other information

    Ok answers below:-
    1. Crystal Reports 2008 Cersion 12.1.0.892
    2. Connecting via OLEDB
    3. Yes able to refresh newly created report without sub reports enclosed
    4. Didn't know that this could be done - this report was done for us by a consultant who doesn't know how to fix this issue and reckons there is a bug in Crystal
    5. Sub reports are accessed after main report is run (I think that means that they are linked)
    6. Not sure how to do this as am newbie to Crystal Reports and we are relying on the person that we contracted to write the reports to know what he is doing.
    Any help appreciated I will try to go into the sub report and unlink - think I have found out how to do this.
    Thanks for the help so far!!

  • Database structure changed. Mapping Crystal reports to new datasource

    There are several crystal reports that need to be remapped to a new database we have in place. The data structure has quite changed. I started using the 'Set datasource Location' option to map the new database fields to existing fields in the report. The problem shows up when trying to map fields from multiple tables to existing fields in the report from a single table. To elaborate, the old database structure has only one table used for a report and the new database structure has these same fileds coming from two different tables. The 'Set datasource Location'  option is leting me map the existing table used in the report to only one report. Is this how this functionality works or am I missing something. Please advise the best way to do this mapping.
    VJ

    hi VJ,
    when you're dealing with reports where the data source can change along with the number of tables or the table names or the field names etc. then this is a method that you can design with to avoid issues associated with datasource changes.
    you can also change existing reports to use this formula only method but of course there's a bit of work involved in changing reports vs. designing them like this from the ground up.
    -jamie

  • Crystal Reports 2008 - Error setting new datasource location

    Hi All,
    We are experiencing an issue while trying to set datasource location for our RM 3.0 reports in Crystal Reports 2008 designer. As per guide "SAP BusinessObjects Process Control 3.0 and Risk Management 3.0 - How to build and Personalize Custom Crystal Reports" (step 11), after opening the desire report we go to DataBase-->Set DataSource Location and when selecting our RM system (which actually has the BI content addon installed on it), we got the following error message:
    "Some tables could not be replaced, as no match was found in the new data source. Please verify the table required for any unmodified tables"
    I'm new on this so I'm not sure if the table indicated in the original datasource should exist in my DB (new datasource) before doing this? If so, how those tables are imported or created in our DB?
    Could you please help me on this issue?
    Please let me know if any other detail or data is required.
    Regards

    Hi Don,
    Thanks for the update.
    Actually I've installed SAP Integration Kit and its Fixpack in both....BOE Server (which is the same as the SAP server) and in client pc.  In all cases we have select a typical installation which supposes the required drivers are available. Also I've followed Ingo's documentation to activate and publish standard Risk Management reports (RM reports). Everything works ok with them. We are able to access reports through the application.
    The issue appears when trying to customize one of these standard reports through CR Designer. For example if we select the "GRRM_Risk_by_Risk_Category" and try to customize it as indicated in the "SAP BusinessObjects Process Control 3.0 and Risk Management 3.0 - How to build and Personalize Custom Crystal Reports"...the table behind this report (table GRFN_CY_API_GRRM_R1) it's not in our RM System. My main concern or question is regarding this....Did I miss something while importing transports files, activating or publishing RM reports, etc....and thatu2019s the reason why this (and any other) table is not already in my system? I was not able to find where those tables are supposed to be or how they should be imported in my system. The odd thing is...that we are trying to customize and set the new data source for these reports to the same system from where they are being opened. Put in this way...RM reports have been activated in system A (RM System) and published to system B (BOE System). While customizing reports through CR Designer...we are actually opening reports from system A. These reports have as their original data source...a demo SAP system info (uxcir1p.wdf.sap.corp) and when we want to update this data source with our RM system....the error appears. The whole process is explained in the above mentioned guide for your reference.
    Hope being clear enough..
    Thanks for your help

  • VS2010 Crystal Report Crashes System when using 'Set DataSource Location..'

    Runtime ASP.NET 3.5
    VS 2010
    Under Database Fields (rt click) try Set DataSource Location... causes VS2010 to crash.
    This is on an imported report from VS2008.  VS2008 has no problem with the report.
    Since this is a ASP.NET 3.5 program the internal property field
    <ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture>
    has been set in the project in order to allow the code to compile w/out errors.
    What is solution for Crystal Report Set DataSource Location?

    Hi Ken,
    Here's one link on the issue: CRVS2010 RTM: Database Expert / External Component has thrown an exception
    The reason is Old OS's used c:\temp as the default, now you are require to use %user%\temp as your temp folder as well as using the AppData folder for your app. If CR finds c:\temp it uses it and depending on what is in there it can cause Cr to crash, XML files have been know to do this.
    Following MS's new rules on users temp folder should make your app Windows Compliant.
    Thanks again
    Don

Maybe you are looking for

  • Hp smart print firefox 3.6 or 4.0 series

    Is there any news about support for the new series of Firefox Internet Explorers? For now HP Smart Print only work with the 3.5 series of Firefox. This is outdated software. Now available is 3.6 and 4.0 versions. Please let me know when the new versi

  • Key based authentication issue in SFTP adapter

    Dear Experts, We have a scenario ECC -->SAP PI 7.0-->SFTP server where we are trying to connect to the SFTP server with a Advantco(3rd Party) SFTP adapter. We have placed our private key in a local folder in PI server (not using Net Weaver Key Store)

  • Where can I find the CRIO-9102 Calibration and ADC to Voltage Conversion VIs ?

    I am working through the "Developing High Speed Continuous Buffered Data Acquistion Applications with CompactRIO" tutorial located at http://zone.ni.com/devzone/cda/tut/p/is/3268  I am using a CRIO-9201 analog input module instead of the cRIO-9215 sh

  • Action Script 3.0 fro Flash Professional CC running on Windows

    Hi everybody, I am trying to learn Action Script 3 on Flash Professional CC. The video courses I am following are on Lynda.com and they all talk about when referencing an instance of a movie clip that typing that instance name followed by the (dot) w

  • TS2634 Home button and voice command problems

    The home button stopped working today on our iPhone 4 and voice command keeps coming on.  I have done a hard restore to no avail.  Any ideas what I should try next?