Set datasource location and remapping fields in code instead of designer

Dear all,
We are currently migrating a VS6 reporting project to VS2010. The old project has like 133 Crystal Reports XI release 2 reports.
All of these .rpt files need to have their datasource location changed and fields remapped because of a change in naming convention.
The datasource location is currently set to a stored procedure in an Oracle database and this will remain; only the name of the
stored procedure and the name of the fields returned are changed (due to new naming conventions).
Is there a way, and I really hope so, to programmatically change the datasource location and remap the fields (mind that these fields are also used in formulas, grouping, total, ...).
Doing this manually in the designer for like 133 times would be very time consuming.
After some research I stumbled upon the CrystalDecisions.ReportAppServer.Controllers.DatabaseController but I'm looking for some example usage, if this is the correct way.
The end result should be that all these 133 .rpt files have their datasource location changed and fields remapped.
Any assistance or pointers in the right direction would be kindly appreciated.
Thanks.

Not aware of how you can do this in code.
However, there are third party products which you can use to mass update reports with datasource and table mapping.
RptInspector is a product I know of that can do what you want.
Ian

Similar Messages

  • 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

  • Set Datasource Location does nothing???

    I dont get it...
    I have reports that are fed by SQL Server stored procedures.  Every now and then the developers will change some minor thing in one of the procedures (maybe a Group by or Order by change) and then rename the stored procedure.  So for example....
    USP_RPT_MYREPORT gets a minor update and gets renamed to USP_RPT_MYNEWREPORT...
    (I am over-simplifying, but you get the idea...)
    I go into Crystal Reports in Visual Studio and select the "Set Datasource Location" choice off the menu.  There, right on the darn screen that comes up it says "highlight the new datasource and click the Update button"...  I do that, and absolutely NOTHING happens, NOTHING changes, NOTHING gets updated.  I've done this about 20 times and now and every time, same thing - NOTHING happens.
    But if I go into the Database Expert, highlight my existing stored proc, and then hit "F2" to rename the alias, and set it to the new stored proc name - BING!!!  Everything works just fine.
    I looked in the Crystal documentation but of course, nothing there to illuminate whats going on with this seemingly useless "Set Datasource" selection...  So...
    What is this for?  What is it all about?  ...and why doesnt it work?
    Any help would be appreciated and sorry in advance for being frustrated - I work in Crystal...

    Thanks for the response and the attemp to help, but this cannot be quite correct - at least it does not seem so.  How do I know this?....
    Well, I have 2 stored procedures that are almost exactly alike - the only difference is the ORDER BY clause in the SQL itself (so this should have NO effect on Crystal)...
    I use the Set Datasource selection and yes, you are right, it DOES NOT change the name from my old Stored Procedure to the new one.  But if you are suggesting that it DID actually change where its pointing I dont believe you are correct because of this...
    The report itself has 3 Groups - these group headers are "tied" to the first stored procedure and even though I change the datasource (supposedly), these groups DO NOT change and thus when I run the report I get an error stating that the "Groupings do not exist"...
    In other words lets say the first stored procedure is called "SP1" and I am changing to a virtually identical stored procedure called "SP2".  Sure enough, when I use Set Datasource, the name DOES NOT change - it still says SP1...  But when I run the report the Grouping dies because nothing changed it to "SP2".  In fact, the Groups now say "???"
    What is particularly odd and frustrating about this (and also the sign of a very poorly QA'd product) is that if I go into the Database Expert and simply press "F2" and change the alias from SP1 to SP2, that seems to do the very thing that Set Datasource seems entirely unable, undesigned and unwilling to do.
    Bear in mind here that I have worked with Crystal for 3 very painful years and when any fields (columns) change in the backend SQL, I understand that it takes hours to rework the entire report - its stupid, it shouldnt take that long, but I have just accepted it with this klunky product - but when NO fields change it seems to me that should be very easy to manage and yet the only way I have found to do it is to try Set Datasource, watch it fail again and again and then use the Database Expert (and the F2 key in there) to rename the alias.
    In all the Crystal documentation I have (downloaded, and came with product) there is not one line I can find that talks about what Set Datasource is supposed to do, and should be doing.
    Anything that would make my life easier with this sometimes beastly product would be most appreciated.

  • Set Datasource Location - Crystal XI to Access 2007 DB

    Hi all,
    Is it possible to Set Datasource location for a Crystal XI report to an Access 2007 DB?  I have reviewed the postings and can not find an answer.
    Edited by: Karen Arena on Jun 23, 2009 3:24 PM - I have resolved this on my own, it is possible, see library documentation.

    Resolved through documentation in Library.

  • Error in setting datasource location from oracle to sql server

    Post Author: jonathanaramburo
    CA Forum: Data Integration
    Hello,
    I have an application that uses a table named "events" which conflicts the sys.events view in master database in sql server. The error i was encountering is that, whenever i tried to set the datasource location of my crystal report from its previous connection oracle to sql server, i get an error saying that some of the fields has not been updated because theres no matching fields to the current connection. It seems that crystal is pointing on sys.events view on master db and not on the events table in myDb database. How can I tell crystal reports to not pick up sys.events and get only myDB.events table.
    Thank you in advance,
    Thanks,
    Jonathan

    The exact statement in oracle side which causing this error (O2SS0050:
    Conversion of identifier 'to_date(VARCHAR2, CHAR)' is not supported.) is below:
    dStartDate:= to_date(sStartDate,'MON-YYYY');
    Statement causing error O2SS0050:
    Conversion of identifier 'regexp_replace(VARCHAR2, CHAR)' is not supported is below.
    nCount2:= length(regexp_replace(sDataRow,'[^,]'));
    So there is no statement which is using to_date(VARCHAR2,
    CHAR) and regexp_replace(VARCHAR2, CHAR) in as such. 'MON-YYYY'  and '[^,]'
    are CHAR values hence SSMA is unable to convert it from varchar2 to char.
    Regarding SYSDATE issue, you mean to put below code in target(SQL) side in SSMA ?
    dDate date := sysdate;
    Thanks.

  • 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 crashes when trying to "Set Datasource Location"

    Hi,
    My client's Crystal app (version 9) crashes when she attempts to remap a report using the "Set datsource Location". Basically, as soon as she selects it, she gets a msg ..something like "CRw32.exe error" and the app bombs.
    Any ideas on what may cause this folks ??
    thx a lot,
    Steve

    Open the report up and Click on Database, Set Location, find ODBC in the list and connect using your DSN. Now select your DB and tables, varies so you may have just click on the OLE DB connection and the n DSN and click Update button or you may have to do this for each table also.

  • Crystal 10 set datasource location issue

    I am getting hung up when trying to set a datasource location in Crystal 10.  I have tried uninstalling and reinstalling the software.  Any ideas?

    Hi,
    Try with this:
    1. Reduce the 'Hardware acceleration' setting in Microsoft Windows.
    2. To access the 'Hardware acceleration' setting in Microsoft Windows:
    Click Start > Settings > Control Panel > System > Display > Settings > Advanced > Troubleshooting.
    There are typically six possible settings for 'Hardware acceleration': from 'None' to 'Full'.
    If you are using Dual monitor run the CR application on primary monitor cause Dual monitor is not tested with Crystal Reports.
    Regards,
    Shweta

  • I have just had my iPad stolen. I by mistake pressed delete rather than find and lock. It has not been activated. Can I remove delete and get it set to locate and lock now.

    Please can somebody help me. I have just had my iPad stolen. Used I could to try to locate it buy pressed delete by mistake. Any e
    Way to reverse this and then use locate and lock instead.

    What To Do If Your iDevice Is Lost Or Stolen
    If you activated Find My Phone before it was lost or stolen, you can track it only if Wi-Fi is enabled on the device. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. What to do if your iOS device is lost or stolen
      6. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      7. Find My iPhone
      8. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • Set Datasource location in Crystal XI not working

    I have what seems to be a common problem with the setting of a datasource in Crystal XI designer.
    I am converting my Crystal 8.5 reports to crystal XI.
    The connection I am using is an OLE DB(ADO) connection to SQL Server 2005.
    When I try to change the Datasource from a test database to a production database, absolutely nothing happens.
    The data displayed on the report is the data from the database from which the report was designed.
    I have scoured the internet and have found numerous complaints about this issue.
    The only semi-acceptable solution I have found is that you have to go into the properties of each table on the report (including subreports) and change the Overridden Qualified Table Name by typing in the name of the table.
    Is this the only solution?
    I have over 300 reports. Many with subreports.
    How archaic is this?
    Is there at least some sort of conversion program available that would help me with my existing reports.
    I have no problems during runtime. It is only the designer with which I am having an issue.
    Any help is appreciated.
    Leonard
    Edited by: Leonard Mann on Oct 13, 2009 4:25 PM
    Edited by: Leonard Mann on Oct 13, 2009 5:23 PM

    Hi Teri,
    Thanks for the input. I thought I would try this out in the simplest way possible.
    The results are a little bizaar but I think they may be helpful in finding a solution.
    I simply cannot understand how any one has been able to get this to work as I have tested this on various PCs using different crystal version and service pack combinations. Both crystal 10 and X1. XP and Windows 7. Nothing has worked.
    This is what I did.
    Create 3 databases, each with 1 table (COMPANY) and 1 Column (COMPANY_NAME).
    First database (LIVE_DB) on 'Server 1' with COMPANY_NAME = 'LIVE COMPANY S1'
    Second database (TEST_DB) on 'Server 1' with COMPANY_NAME = 'TEST COMPANY S1'
    Third database (TEST_DB) on 'Server 2' with COMPANY_NAME = 'TEST COMPANY S2'
    TEST #1 - USING ODBC (RDO) *********
    Setup 3 Datasources using 'Data Sources (ODBC)' in Administrative Tools.
    LIVE_DB_S1 - Points to Database LIVE_DB on Server 1
    TEST_DB_S1 - Points to Database TEST_DB on Server 1
    TEST_DB_S2 - Points to Database TEST_DB on Server 2
    Create report with 'Company Name' using DataSource LIVE_DB_S1
    Report name correctly shows 'LIVE COMPANY S1'
    Change data source to TEST_DB_S2
    Error occurs: Database Connection Error: '42S02:[Microsoft][ODBC SQL Driver][SQL Server] Invalid object name 'LIVE_DB.dbo.COMPANY'.[Database Vendor Code: 208]
    Crystal appears to be looking for the Database 'LIVE_DB' on server 2 and it does not exist.
    Changed the datasource at the table level
    Reran report - Report name correctly shows 'TEST COMPANY S2'
    Changed Datasource back to LIVE_DB_S1
    Reran report - Report name incorrectly  shows 'TEST COMPANY S1'
    Crystal appears to look for the Database TEST_DB on Server 1 and finds it and therefore displays the wrong Company Name.
    Scrap this report close crystal and start from scratch.
    Create report with 'Company Name' using DataSource TEST_DB_S1
    Report name correctly shows 'TEST COMPANY S1'
    Change data source to TEST_DB_S2
    Report name correctly shows 'TEST COMPANY S2'
    Change data source to LIVE_DB_S1
    Report name incorrectly shows 'TEST COMPANY S1'
    Crystal seems to have changed the server but not the database.
    TEST #2 - USING OLE DB (ADO) *********
    Setup 3 Datasources usong OLE DB after opening Crystal.
    Since the name of an OLE DB connection is the SERVER, for the purposes of this example let's pretend that each connection has a name the same as above.
    LIVE_DB_S1 - Points to Database LIVE_DB on Server 1
    TEST_DB_S1 - Points to Database TEST_DB on Server 1
    TEST_DB_S2 - Points to Database TEST_DB on Server 2
    Create report with 'Company Name' using DataSource LIVE_DB_S1
    Report name correctly shows 'LIVE COMPANY S1'
    Change data source to TEST_DB_S2
    Report name correctly shows 'TEST COMPANY S2'
    Crystal correcly switched the Server and the Database.
    Changed Datasource back to LIVE_DB_S1
    Reran report - Report name incorrectly  shows 'TEST COMPANY S1'
    Crystal appears to look for the Database TEST_DB on Server 1 and finds it and therefore displays the wrong Company Name.
    Scrapped this report and headed to the bar for a shot of SANITY.
    Leonard

  • How to set standalone model and create local company code

    HI,
    For  SRM5.0 or 7.0  , how to set standalone model ?,   when I check attribute , the system warn me I must fill company code for BUK.  I have no backend system .
    thanks a lot
    Jesse

    Jesse,
      You should define a Backend System using IMG setting 'Define Backend Systems' as a non-sap backend system and use it with BUK attribute.
    SG

  • Setting Datasource Location

    Hello,
    I have a complex report and I am trying to avoid having to re-create it.
    The report's driving table (the left-outermost table) stores data for each employee by period.  So say you have 3 periods, Jan09, Feb09, and Mar09,  you will have 3 records for 1 employee.  Basically it is a historical data warehouse table.
    The left outermost table is this very data warehouse table.  What I want to be able to do is bring back only those records for the period in which we are in.  If I use a select expert to filter on the period, it appears as though the reports still scans all the records in the table first and then filters when it already gets into Crystal.  A very poor performance resoluion.
    I tried creating SQL Command that says
    select *
    from table
    where period='{?Enter End Period}'
    Then use this as the main driving table and left outer join it to the previous driving table.  But it still appears as though it parses through all the records.
    I don't want to recreate the report so how can I do the filtering on the database level before it gets into Crystal?
    Thanks in advance,
    Zack H.
    Edited by: Zack H on Sep 4, 2009 11:23 AM

    This is showing as answered, but I don't see any responses, so I'll go ahead.
    In Crystal, go to the File menu and select "Report Options".  Make sure that "Use Indexes or Server for Speed" and "Perform Grouping on Server" are both checked.  You can also set these values to be your defaults by going to the File menu, selecting "Options" and going to the Database tab.
    However, some things will affect whether the sorting and grouping actually happen on the server.  For example, if you're using a Crystal function on a field in your selection criteria or as a group, it may cause Crystal to bring down all of the data and process it locally.
    -Dell

  • Clearing the History Folder on the Set Datasource Location dialog

    I am using Crystal Reports for .NET 2.0 and am using VS 2005 Pro. Does anyone know if there is any way of clearing out the items in the history folder in the SetDataSource Location dialog? I have been told there is no way to do this, but I figure VS is storing this information somewhere, right? Is it stored in the registry? If so, where is it? Thank you in advance!
    Ed Cohen

    Hi
    I have had a lot of failures with CR so I ended up with several datasource connections for CR. I wish to be able to clear them too. your answers that you can right-click them and select remove doesnt work for me. there is no option to remove them when you right click. also the path given for the key; i have tried searching my computer for a crystal decisions folder but couldnt find it. I use CR that comes with VS2005. could you be a little bit clearer on where that registry file would be found in my case: HKCU/?
    Thanks.
    Mambo

  • Setting USR01 SPDB and SPLD fields

    Hi All,
    I have to set the field SPLB (for Print Immediately) and SPLD( "release" or "delete after printing") of USR01 to "space" and i am using the following statements, before my program generates spool.
      usr01-spdb = 'H'.
      usr01-spld = ' '.
    The field SPLD (which i assume is for "Delete After Print") is still not set to value i am setting.
    Can anyone help me with this.
    Thanks,
    Sindhu

    Hi Amit,
    My requirement is to set the repective setting for the spool generated via this program alone and not for the entire set of spools generated. Hence i cant set using SU3. i have to achieve it programmatically for this spool alone and retain default after my program execution.

Maybe you are looking for

  • IPhone 5 created a backup larger than the phones capacity (16GB) and now I can't get anything back onto my phone after Restoring it!

    I had a few storage issues to start with, I basically deleted everything in my phone (media, messages, notes, calanders, apps etc) and my phone still said it was at capacity. The more I deleted the less I could put on there. So I took it the the Appl

  • E-Mail Access

    In the last couple of days I have been unable to access my e-mails, either through Outlook on my PC or through my Android phone.  My Phone tells me that my password has been changed at the server (not by me!), and Outlook doesn't recognise the passwo

  • Project in two languages.

    Hello, I have a help project to produce in two languages (English and french), I have two files with each version to be imported into my help project. Is it possible in a single file CHM display my help in English or french whichever is ask or I must

  • Recently Upgraded to leopard on 1.5ghz powerbook 1.5gb ram

    hi i upgraded to leopard a couple of months ago which caused problems when i did archive and install. there were some bugs with Mail that would not quit. so them i did a clean install and now slowly adding the software needed. everything seems to run

  • H264 exporting to ProRes

    Hi All, I use a 5DMK3 and record H264 files, which I then import and edit directly within the FCPX timeline. I have found that my system perfoms without any issues and no need to convert the footage into pro res. After I complete a project and will t