Change PowerPivot data source when deploying from Dev - Staging - Production

We have PowerPivot workbooks we store in SharePoint 2013 Libraries. 
We have a powershell script which automates the deployment of sites and pages. Is there a way using PowerShell (or any scripting language really) to look into the workbook and change the PowerPivot data source when deployment from one environment to
another? (Dev -> Stage -> Prod) We need to update the workbooks to point to our SSAS cubes Dev -> Stage -> Prod respectively.
Thank you for any expert advice you may offer,
Sincerely,
-Craig

Basically, it's an excel file (XLSX) file and you can use excel OM for this.
A simple program (in C# or any language of your choice) can be written to do the following and achieve what you need.
using XLS = Microsoft.Office.Interop.Excel;
string info = null;
XLS.Application application = null;
try
 application = new XLS.Application();
 var book = application.Workbooks.Open(filepath);
 foreach (XLS.WorkbookConnection wc in book.Connections)
  switch (wc.Type)
   case XLS.XlConnectionType.xlConnectionTypeOLEDB:
    info = wc.Name + " " + wc.OLEDBConnection.Connection.ToString() + "\r\n";
    break;
 book.Close();
finally
 if (application != null)
  application.Quit();
Hopefully, this was helpful.

Similar Messages

  • Best practices for deployment from Dev /Staging /Production in SharePoint ?

    Hi All,
    What is a best practices to deploy SharePoint Portal to dev / staging / Production.
    I have custom solution deployed using WSP file. But I have done some changes using sharepoint designer.
    Like as Designer workflow, master pages etc.
    How can I deploy my document libraries and list to dev to prod using best practices?
    Thanks
    Balaji More

    Hi,
    According to your post, my understanding is that you wanted to know the best practices to deploy SharePoint Portal in different SharePoint environment.
    If the site is not existing in the production server, we can save the site from the development server, and then import it to the production server.
    But if the site is already existing in the production server, we should follow these steps to just add the taxonomy and content types to the production server:
    Save the site from Dev as a template
    Import the template as solution in Visual Studio
    Remove unnecessary items from the solution(Please pay more      attention on it. If a content type/list... in the solution is existing in      the production site too, it will replace the
    same object existing in the      production after deployment)
    Package the solution
    Deploy the solution in the production
    For more detailed, please see:
    http://ahmedmadany.wordpress.com/2012/12/30/importing-sharepoint-solution-package-wsp-into-visual-studio-2010/
    There is a similar thread for your reference.
    http://social.technet.microsoft.com/Forums/en-US/7dcf61a8-1af2-4f83-a04c-ff6c439e8268/best-practices-guide-for-deploying-sharepoint-2010-from-dev-to-test-to-production?forum=sharepointgeneralprevious
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to change the Data sources after deploying the application ??

    Hi All,
    i want to know how to change the Data sources after deploying the application to the application server ???
    I'm using Oracle Application Server 10g Release 3 (10.1.3.1.0)

    Can you access the Enrprise Manager website of the target Application Server from your location? If so, you can change the datasource in it. If not, yo can bundle the datasource definition in your archive and use that one instead of the one configured in the target OC4J container. Or this will just be the responsability of your customer: whenever you send a new WAR file, they have to modify the datasource if needed and deploy the application?

  • EPM Architect - Missing Data Source when deploy

    Hi,
    I have an application on EPM which status is at the moment Not Deployed. It once worked but now when I try to deploy it's Data Source is missing, nor i can associate one to it. How can I recover this situation? The application was working until yesterday and the Data Source for the underlying application is present.
    The Diagnostic does not show me the option to find suitable datasource for this application.
    The Planning application works correctly, I tried to restart Planning and EPMA Services but without success.
    Is there something I can do working on the tables in the EPMA schema?
    Thank you,
    bidi

    Hi Celvin,
    no I didn't play with the underlying tables. I ran the Diagnostic and it fails two tests:
    - Not deployed but in Shared Services
         - a) Delete from EPMA only
         - b) Manually delete application from Shared Services
    - Not Deployed status in EPMA, but in product
         - a) Delete from EPMA only. May run the Transform Classic to EPM Architect Wizard manually aftwrwards
         - b) Manually delete the application from the productnd
    I think that Delete from EPMA and reverse from the underlying planning application would in a certain sense "fix" my issue, but I'm not so confident in this operation, I don't want for some reason override something on the Planning application.
    In the forum I found that when the Data Source is set to NONE the diagnostic is able to recognize a data source that could fit. I don't know if in that case NONE is "NONE" as a string or is just missing, in my case I see an empty drop down list.
    Thanks

  • Deployment from DEV to Production environment

    Hi,
    What are the best possible ways to deploy the visual web parts and Pages from development environment to Production environment.
    As I am very much new to Sharepoint, I would like to have the safest methods to do the deployment into production. Please also suggest the prerequisites.
    I have a solution with number of visual web parts in the development environment which is working fine. Need to move the Visual web parts to production (Existing site). So please suggest the safest methods.
    Thanks and Regards,
    Satish
    Sathiish Reddy

    Hi Satish,
    From your description, my understanding is that you want to deploy your solution from development environment to production environment with a safest method.
    These links below about moving content from environment to another environment could be helpful to you:
    SharePoint 2013 Dev/Test/Production environment - Moving content
    http://sharepoint.stackexchange.com/questions/78483/sharepoint-2013-dev-test-production-environment-moving-content
    How to deploy webpart on production (not debugging) server?
    http://sharepoint.stackexchange.com/questions/17779/how-to-deploy-webpart-on-production-not-debugging-server
    you could also have a look at this link below about SharePoint Content Deployment Wizard:
    How do you deploy your SharePoint solutions?
    http://stackoverflow.com/questions/9543/how-do-you-deploy-your-sharepoint-solutions
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Issue with data source after deploying

    We are experiencing an issue with our data source after deployment of a cube. On the datasource properties in Visual Studio 2012, we have the max connections set to 0 before the deployment. Once the cube is deployed, I can navigate to the <name>.0.ds.xml
    file and open it and see that the <MaxActiveConnections>0</MaxActiveConnections> is indeed set to 0. At some point over the next couple days, a process of the cube or some other action causes that value to get updated to some number too large to
    be converted to an int, and makes the datasource invalid. At that point we cannot view the datasource properties in SSMS, we cannot open the cube project from Visual Studio, and we’ve even had failures when trying to process the cube.  Is there a config
    somewhere that would cause this value to get overwritten, or some other behind the scenes process that we can look at?
    Our server information is:
    Microsoft SQL Server 2012 (SP1) - 11.0.3153.0 (X64)
                    Jul 22 2014 15:26:36
                    Copyright (c) Microsoft Corporation
                    Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    Chad Dotzenrod SWC | TECHNOLOGY PARTNERS 1420 Kensington Road, Suite 110 Oak Brook, Illinois 60523-2144 http://www.swc.com

    Typically you would import the metadata from the source location and either use that location as the data source (and so not need to redeploy), or deploy it to a separate target location.
    The replace action is destructive as you've found, and effectively performs a drop table followed by create table. Hence any data in the table is lost.
    If you just want the Control Center Manager to correctly display that the table is deployed, try setting the action to "Upgrade". This will try to upgrade the deployed object to match the definition in OWB, but as the two are identical this will result in no changes. However, it will update the deployment records to indicate that the object is deployed.
    Nigel.

  • Trying to change the data source for a Crystal Report.

    <p>The method below represents my best attempt to programatically change the data source of a Crystal Report. The goal is to have a routine that will update the data source for reports after they have been distributed to production servers. So far I have not been successful in saving the report back to the CMS. No exceptions are thrown, but when I view the Database Configuration of the report in the CMC nothing has changed.
    </p>
    <p>
    Am I missing a step, or is there another way to accomplish this?
    </p>
    <p>
    Thank you.
    </p>
    <hr />
    <pre>
    private void test(String reportName)
       throws SDKException, ReportSDKException, java.io.IOException
       IInfoObjects newInfoObjects;
       IInfoObject reportObj;
       ReportClientDocument clientDoc = new ReportClientDocument();
       DatabaseController dc;
       PropertyBag pBag;
       PropertyBag logonProps;
       ConnectionInfo newConInfo;
       ConnectionInfo oldConInfo;
       ConnectionInfos conInfos;
       int connOptions = DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB; //0;
       Fields connFields = null;
       String queryStr = "Select * From CI_INFOOBJECTS " +
          "Where SI_NAME='wfr.rpt' AND SI_KIND='CrystalReport' AND SI_INSTANCE=0";
       newInfoObjects = getCms().executeQuery(queryStr);
       if(newInfoObjects.size() > 0)
          reportObj = (IInfoObject)newInfoObjects.get(0);
          try
             clientDoc = getCms().getReportAppFactory().openDocument(
                reportObj
                , OpenReportOptions._refreshRepositoryObjects
                , java.util.Locale.US);
             dc = clientDoc.getDatabaseController();
             conInfos = dc.getConnectionInfos(null);
             for(int i = 0; i < conInfos.size(); ++i)
                oldConInfo = (ConnectionInfo)conInfos.getConnectionInfo(i);
                newConInfo = (ConnectionInfo)oldConInfo.clone(true);
                pBag = newConInfo.getAttributes();
                pBag.putStringValue("QE_ServerDescription", "alio");
                logonProps = new PropertyBag();
                logonProps.putStringValue("Trusted_Connection", "false");
                logonProps.putStringValue("Server", "alio");
                pBag.put("QE_LogonProperties", logonProps);
                newConInfo.setUserName("admin");
                newConInfo.setPassword("password");
                dc.replaceConnection(
                   oldConInfo
                   , newConInfo
                   , connFields
                   , connOptions);
          catch(ReportSDKServerException Ex)
             String msg = "A server error occured while processing the " + reportObj.getKind()
                + " object, " + reportObj.getTitle() + " (" + reportObj.getCUID() + "), from the CMS.";
             Utility.errorOut(msg, Ex);
          catch(Exception Ex)
             String msg = "An error occured while processing the " + reportObj.getKind()
                + " object, " + reportObj.getTitle() + " (" + reportObj.getCUID() + "), from the CMS.";
             Utility.errorOut(msg, Ex);
          finally
             clientDoc.save();
             getCms().commitToInfoStore(newInfoObjects);
             clientDoc.close();
    </pre>
    Edited by: Mark Young on Sep 10, 2009 2:16 PM

    <style type="text/css">
    /<![CDATA[/
        body
            font-size: 1.125em;
              font-family: helvetica,arial,"sans-serif";
          .code{font-family: "courier new",courier,mono,monospace}
          .bi{font-style: italic; font-weight: bold;}
    /]]>/
    </style>
    <p>Justin,</p>
    <p>
    Thank you for the reply. Time constraints have not allowed me to post back to this tread
    till now. I will try your suggestion. My assumption is that <i>Save the report back to the
    info store</i> refers to <span class="code">IInfoStore.commit(IInfoObjects)</span>.
    </p>
    <p>
    I'm afraid that I do not understand why I don't want to change the report client document,
    or why <i>successfully exporting the report with the new login/password</i> is not what I
    want to do. Any explanation on that statement would be appreciated.
    </p>
    <p>
    I did find a way to accomplish my goal. It involved adding the SSOKEY property to the
    logon property bag. Below you'll see my revised code which modifies the report logon and
    server. I have no idea what
    this does, and SAP support has not been able to tell me why it works. However, what I
    discovered is that if I changed the report option, <b>Database Configuration -> When
    viewing report:</b>, in the CMS to <span class="bi">Use same database logon as when report
    is run</span> from <span class="bi">Prompt the user for database logon</span>, then the
    SSOKEY property had been added to the logon property bag having an empty string as its
    value. This allowed me to successfullyupdate and save the modified logon back to the CMS.
    </p>
    <p>
    So I took a chance and added code to always add the SSOKEY property with an empty string
    as its value, and I could then successfully modify and save the report's logon info
    and server. Again, I don't know what this means, but it has worked so far. If anyone has
    some insight or comments, either are welcome. Thank you in advance.
    </p>
    <br />
    <hr />
    <pre>
    private void changeDataSourceOfAWFCrystalReports()
       throws SDKException, ReportSDKException, java.io.IOException
       IInfoObjects newInfoObjects = null;
       IInfoObject reportObj = null;
       IReport curReport = null;
       ReportClientDocument clientDoc = new ReportClientDocument();
       DatabaseController dbController;
       PropertyBag pBag;
       PropertyBag logonProps;
       ConnectionInfo newConInfo;
       ConnectionInfo oldConInfo;
       ConnectionInfos conInfos;
       int connOptions = DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB;
       Fields connFields = null;
       String outputStr;
       int numOfReports;
       int numOfQueryPages;
       double progressIncrementPerPage = 30;
       int progressIncrementPerReport = 0;
       // Path query to reports is in a .properties file.
       String queryStr = getAppSettingsFile().getWscAwfCrystalReportPathQuery();
       try
          // Executes IInfoStore.getPageingQuery() and generates a list of queries.
          getCms().setPathQueryQueries(queryStr, 100);
          numOfQueryPages = 0;
          // Gets a List&lt;String&gt; of the IPageResult returned from IInfoStore.getPageingQuery().
          if(getCms().getPathQueryQueries() != null)
             numOfQueryPages = getCms().getPathQueryQueries().size();
          if(numOfQueryPages &gt; 0)
             // Use 30% of progress bar for the following loop.
             progressIncrementPerPage = Math.floor(30.0/(double)numOfQueryPages);
          for(int queryPageIndex = 0; queryPageIndex &lt; numOfQueryPages; ++queryPageIndex)
             // Gets the IInfoObjects returned from the current page query
             newInfoObjects = getCms().getPathQueryResultSetPage(queryPageIndex);
             numOfReports = newInfoObjects.size();
             if(newInfoObjects != null && numOfReports &gt; 0)
                progressIncrementPerReport =
                   Math.round((float)Math.floor(progressIncrementPerPage/(double)numOfReports));
                for(int reportIndex = 0; reportIndex &lt; numOfReports; ++reportIndex)
                   reportObj = (IInfoObject)newInfoObjects.get(reportIndex);
                   curReport = (IReport)reportObj;
                   clientDoc = getCms().getReportAppFactory().openDocument(
                      reportObj
                      , OpenReportOptions._refreshRepositoryObjects
                      , java.util.Locale.US);
                   dbController = clientDoc.getDatabaseController();
                   conInfos = dbController.getConnectionInfos(null);
                   for(int conInfosIndex = 0; conInfosIndex &lt; conInfos.size(); ++conInfosIndex)
                      oldConInfo = (ConnectionInfo)conInfos.getConnectionInfo(conInfosIndex);
                      newConInfo = (ConnectionInfo)oldConInfo.clone(true);
                      pBag = newConInfo.getAttributes();
                      pBag.putStringValue(
                         "QE_ServerDescription"
                         ,getConfigFile().getDBDataSourceConnections());
                      logonProps = new PropertyBag();
                      logonProps.putStringValue("Trusted_Connection", "false");
                      <b>logonProps.putStringValue("SSOKEY", "");</b>
                      logonProps.putStringValue(
                         "Server"
                         ,getConfigFile().getDBDataSourceConnections());
                      pBag.put("QE_LogonProperties", logonProps);
                      newConInfo.setUserName(getConfigFile().getUNVConnectionUserName());
                      newConInfo.setPassword(getConfigFile().getUNVConnectionPasswordDecrypted());
                      dbController.replaceConnection(
                         oldConInfo
                         , newConInfo
                         , connFields
                         , connOptions);
                      newConInfo = (ConnectionInfo)conInfos.getConnectionInfo(conInfosIndex);
                   } // end for on conInfosIndex
                   clientDoc.save();
                } // end for on reportIndex
             } // end if on newInfoObjects
          } // end for on queryPageIndex
       } // end try
       catch(ReportSDKServerException Ex)
          // handle...
       catch(Exception Ex)
          // handle...
       finally
          getCms().commitToInfoStore(newInfoObjects);
          if(clientDoc != null)
             clientDoc.close();
    </pre>

  • Can we change the Data source in AO ?

    Hi Folks,
    Environment: SAP HANA on AO
    I have the following scenario , Am creating a report on one Calculation View: CV and have done some analysis where I have pulled in some dimensions and kept some background filters.
    Now I have to generate the same report on another Calculation View: CV2 ( Similar to structure of CV ) and compare the reports. Is there any way to edit copy the previous report and change the data source? Can you guide me on that?
    Regards,
    Krishna Tangudu

    Hi,
    You can exchange the calc view by clicking on the button next to the data source name in the tab "components", but when you do this, the new data source will overwrite the settings and filters from the previous data source. So no, there is not a supported way of exchanging the datasource and keeping the filters of the previous data source.
    Best regards,
    Victor

  • Changing the Data source in Business Objects XI

    Hi,
      Is it possible to change the data source(not universe) in runtime to generate business objects reports. I am using BOXI 3.1.
    Below is the code I am using to change the universe in runtime. I would like to change this so that i can change the data source instead of changing the universe. My intention is to generate report from multipple database using same universe. Right now I am using multipple universes connected to multiple datasources to achieve this. I am using Report Engine SDK(Java).
               if("Webi".equals(mDocKind))
                   // Added for multiple database support
                   DataProviders dataProvs = documentInstance.getDataProviders();
                try{
                    //To support multiple queries in BO reports
                 for(int count=0;count<dataProvs.getCount(); count++){
                   DataProvider dp=dataProvs.getItem(count);
                   DataSource ds= dp.getDataSource();
                   infoUniverseObjects = getUniverseObject(infoStore,NewUniverseName);
                   infoUniverseObject = (IInfoObject)infoUniverseObjects.get(0);
                   String newDsCuid = infoUniverseObject.getCUID();
                   dataProvs.changeDataSource(ds.getID(), "UnivCUID=" + newDsCuid, true);
                   if(dataProvs.mustFillChangeDataSourceMapping())
                        // Re-map data source to target Universe objects
                        ChangeDataSourceMapping mapping = dataProvs.getChangeDataSourceMapping();
                        ChangeDataSourceObjectMapping[] maps = mapping.getAllMappings();
                        dataProvs.setChangeDataSourceMapping();
                    }//for dataProvs.getCount()
                }catch(Exception e)
                      mLogger.info("BOReportObject","createReport","Inside multiple data providers loop"+e.getMessage());
    Thanks in advance
    Shameer
    Edited by: Shameertaj on May 20, 2009 3:08 AM

    Hi Shameer,
    I think this is only possible with the Universe Designer SDK (which is only available in COM).
    Please kindly refer to the API reference for the Universe Designer SDK for more details:
    http://help.sap.com/businessobject/product_guides/boexir31/en/bodessdk.chm
    Also, please note that changing the universe connection when viewing a document on-demand is not recommended because this could lead to possible issues.
    For example:
    Two users trying to view documents that uses the same universe at approximately the same time.
    But user A wants to use connection X and user B wants to use connection Y.
    This could lead to an error while openning the document or while refreshing/retrieving the the data.
    Hope this helps.
    Regards,
    Dan

  • Problem changing SQL data source at runtime with VB6 and CR XI

    Hello All,
    We have several VB6 programs using CR XI and are able to pass a DSN to change data source with Access DB that works just fine.
    We are using similar code in another program to change the data source in an SQL DB and get an error... Failed to Open the Connection.
    This is a sample of what works with Access but not SQL DB:
    Dim crxApplication As New CRAXDRT.Application
    Public Report As CRAXDRT.Report
    Global DSN_STRING
    DSN_STRING = "DSN = JC Crystal Reports"
    Dim crxDatabaseTable As CRAXDRT.DatabaseTable
    Set Report = crxApplication.OpenReport(App.Path & "\Test11.rpt", 1)
    'change location of each table in report
    For Each crxDatabaseTable In Report.Database.Tables
            crxDatabaseTable.Location = DSN_STRING
    Next crxDatabaseTable
    FormCrystal.Show vbModal
    We have tried other things from the web, still get error.
    Any help would be greatly appreciated.
    C Reid

    Hi Carole,
    When using SQL types you need more than just the DSN name. CR does keep the password in the report file and all SQL types are usually password protected.
    Try this simple code:
    First log onto the server:
    rpt.database.LogOnServerEx("crdb_odbc.dll, pServerName, [pDatabaseName], [pUserID], [pPassword], [pServerType], [pConnectionString])
    The ConnectionString is the complete line. Run in debug mode and display what the reprot is using and you can see the format it requires.
    Once logged on now you can set the location for each table:
    'report connection properties
            With rpt.Database.Tables(1)
                .ConnectionProperties("User ID").Value = "sa"
                .ConnectionProperties("Password").Value = "YourPassword"
                .ConnectionProperties("Data Source Name").Value = "Your DSN Name"
                '.ConnectionProperties("Data Source Name").Value = "ServerName" ' can be used if specifying a new connection
                .ConnectionProperties("Database").Value = "Northwind"
            End With
            Set rpt.Database.Tables(1).Location = "Northwind.dbo.CustOrderHist"
    I'm only using one table so easy enough to create the loop or use for all...
    Thank you
    Don

  • Crystal ActiveX Runtime Lib: Change text data source path at run time.

    We have some PCs running Crystal Reports 10 and some running CR 9 and 8.5. For each PC, we set up a System DSN ODBC data source (in Control Panel - Administrative Tools) for pulling data from text files to
    generate reports.
    Recently we wrote some routines (see the Visual Basic example at the
    end of this message) to change the path of the data files at runtime.
    According to the Crystal Reports Technical Reference Guide, we may use
    the method LogOnServer() of an Application object or an DatabaseTable
    object. However, we find that this does not work: the PrintOut()
    method only pulls data from the default path as configured for the
    System DSN, not from the path passed as the third parameter of
    LogOnServer(). It does not return any error message.
    We have also tried to use SetTableLocation() method, and it still does
    not work.
    Would any experts examine our code below and advise what we are missing? Thanks.
    For the following VB example, we have:
    System DSN Name: AP_WORKSHEET
    Driver: Microsoft Text Driver
    Database Directory: D:\0ood2 (i.e. the default path)
    Crystal Report Document: D:\3g\run\Vision\apcyto\Reports\crBlockWS.rpt
    (Which specifies that the data source text file name is BlockWS.txt)
    Purpose : We would like to read the data source text file from
    D:\0ood1 instead of the default path.
    Following is the code of the VB macro:
    Sub test()
    Rem In this version of the subroutine, we call
    Rem DatabaseTable.LogOnServer() and "Rem"ed out
    Rem Application.LogOnServer() and SetTableLocation().
    Rem We have un"Rem"ed each of them and "Rem"ed others and try to run.
    Rem In all runs, data are pulled from the default file
    Rem D:\0ood2\BlockWS.txt instead of D:\0ood1\BlockWE.txt.
    Dim crxapp As CRAXDRT.Application
    Dim crxRep As CRAXDRT.Report
    Dim crxDB As CRAXDRT.Database
    Dim crxTab As CRAXDRT.DatabaseTable
    Dim crxConnPs As CRAXDRT.ConnectionProperties
    Dim crxConnP As CRAXDRT.ConnectionProperty
    Dim apropSubLoc As String
    Dim apropConnBufStr As String
    Set crxapp = CreateObject("CrystalRuntime.Application")
    Rem
    crxapp.LogOnServer "p2sodbc.dll", "AP_WORKSHEET", "<CRWDC>DBQ=D:\0ood1",
    Set crxRep = crxapp.OpenReport
    ("D:\3g\run\Vision\apcyto\Reports\crBlockWS.rpt")
    Set crxDB = crxRep.Database
    Set crxTab = crxRep.Database.Tables(1)
    apropConnBufStr = crxTab.ConnectBufferString
    apropSubLoc = crxTab.SubLocation
    crxDB.LogOnServer "p2sodbc.dll", "AP_WORKSHEET", "<CRWDC>DBQ=D:\0ood1",
    Rem crxTab.SetTableLocation "D:\0ood1\BlockWS.txt", apropSubLoc, "DSN="
    Rem Set crxConnPs = crxTab.ConnectionProperties
    Rem Set crxConnP = crxConnPs.Item("DSN")
    Rem crxConnP.Value = "AP_WORKSHEET"
    Rem Set crxConnP = crxConnPs.Item("Database")
    Rem crxConnP.Value = "D:\0ood1\BlockWS.txt"
    Rem crxTab.Location = "BlockWS.txt"
    crxRep.DiscardSavedData
    crxRep.PrinterSetup (0)
    crxRep.PrintOut
    End Sub
    For VB macros, the problem exists in all of CR 8.5, 9 and 10. However,
    for another platform we are using, Unify Vision 4GL, it works for CR
    8.5 while not working for CR 9 and 10.
    Following is the source code in Unify Vision 4GL. This language may
    not be popular, but I thin you are about to see how it calls the
    Runtime Library methods LogOnServer(), OpenReport(), PrinterSetup() and
    PrintOut().
    %gfPrintCrystalReport
    BOOL FUNCTION gfPrintCrystalReport($reportName)
    BEGIN
    if NOTMKNOWN(GF:$oSeagateId) then
    create service of activex
    class 'CrystalRuntime.Application'
    object_ref into GF:$oSeagateId;
    if MKNOWN(GF:$oSeagateId) then
    begin
    /* TD23013: Database directories are dynamic to
    accommodate multiple user requirement of Citrix */
    send message LogOnServer to GF:$oSeagateId
    using
    ( 'PDSODBC.DLL', 'AP_WORKSHEET', '<CRWDC>DBQ='+GF:$WinTempDir,'','')
    identified by $msgHandle;
    if $msgHandle:MSG_STATE 'RESPONSE_PROCESSED'
    then
    begin
    display 'Crystal Reports cannot connect
    to the datasource ' for fyi_message wait;
    return (FALSE)
    end
    send message OpenReport to GF:$oSeagateId using
    ($reportName, 1)
    identified by $msgHandle returning
    $oCrystalReport
    if MKNOWN($oCrystalReport) then
    begin
    if (NOTMKNOWN(GF:$printerName)) then
    set GF:$printerName to
    $oCrystalReport->PrinterName;
    if GF:$printerName $oCrystalReport-
    PrinterName then
    send message SelectPrinter to
    $oCrystalReport
    using
    (GF:$driverName,GF:$printerName,GF:$portName)
    identified by $msgHandle;
    set $oCrystalReport-
    DisplayProgressDialog to FALSE;
    while TRUE
    begin
    DISPLAY NOTICE 'Print to : ' +
    GF:$printerName
    LABELS 'Ok'
    DEFAULT, 'Cancel', 'Printer Setup'
    RESULT INTO $userOption
    switch ($userOption)
    begin
    case 0 :
    send
    message PrintOut to $oCrystalReport
    using
    (PROMPT_USER, NUMBER_OF_COPIES, COLLATED, START_PAGE, STOP_PAGE)
    identified by $msgHandle;
    set
    $oCrystalReport to UNDEFINED
    return
    (TRUE);
    case 1:
    set
    $oCrystalReport to UNDEFINED
    return
    (FALSE);
    case 2:
    send
    message PrinterSetup to $oCrystalReport
    using
    (0)
    identified by $msgHandle;
    if
    GF:$printerName $oCrystalReport->PrinterName then
    begin
    set GF:$printerName to $oCrystalReport->PrinterName;
    set GF:$driverName to $oCrystalReport->DriverName;
    set GF:$portName to $oCrystalReport->PortName;
    end
    break;
    end
    end
    end
    end
    return
    (FALSE);
    END

    Hi Sydney,
    If you search the Developers help file you'll find info on using the method:
    How to change the data source
    This example demonstrates how to change the data source from native Access to an OLEDB (ADO) data source by using the ConnectionProperty Object, as well as how to change the table name by using the Location property of the DatabaseTable Object. CrystalReport1 is connected to the xtreme.mdb database found in the \Program Files\Crystal Decisions\Crystal Reports 10\Samples\En\Databases folder. The report is using the Customer table. A copy of the Customer table is added to the pubs database on Microsoft SQL Server.
    ' Create a new instance of the report.
    Dim Report As New CrystalReport1
    Private Sub Form_Load()
    ' Declare a ConnectionProperties collection.
    Dim CPProperties As CRAXDRT.ConnectionProperties
    ' Declare a DatabaseTable object.
    Dim DBTable As CRAXDRT.DatabaseTable
    ' Get the first table in the report.
    Set DBTable = Report.Database.Tables(1)
    ' Get the collection of connection properties.
    Set CPProperties = DBTable.ConnectionProperties
    ' Change the database DLL used by the report from
    ' native Access (crdb_dao.dll) to ADO/OLEDB (crdb_ado.dll).
    DBTable.DllName = "crdb_ado.dll"
    '  The connection property bags contain the name and value
    ' pairs for the native Access DLL (crdb_dao.dll). So we need
    ' to clear them, and then add the name and value pairs that
    ' are required to connect to the OLEDB data source.
    ' Clear all the ConnectioProperty objects from the collection.
    CPProperties.DeleteAll
    ' Add the name value pair for the provider.
    CPProperties.Add "Provider", "SQLOLEDB"
    ' Add the name value pair for the data source (server).
    CPProperties.Add "Data Source", "ServerA"
    ' Add the name value pair for the database.
    CPProperties.Add "Initial Catalog", "pubs"
    ' Add the name value pair for the user name.
    CPProperties.Add "User ID", "UserName"
    ' Add the name value pair for the password.
    CPProperties.Add "Password", "password"
    ' Set the table name. ' for SQL types it would be "database.dbo.table"
    DBTable.Location = "Customer"
    Screen.MousePointer = vbHourglass
    ' Set the report source of the viewer and view the report.
    CRViewer1.ReportSource = Report
    CRViewer1.ViewReport
    Screen.MousePointer = vbDefault
    End Sub

  • Change the data source connection of existing reports in web analysis

    Hi
    I have developed certain reports in web analysis 9.3.1, now I need to point these reports to a new cube with same layout. Can anyone let me know how to change this data source. There are lot many reports so it will take lot of time for me to recreate them.
    Please suggest any good approach
    ---xat

    You can edit the Database connection from Web Analysis. Perform the below tasks to edit the database connection..
    1) Login to Web Analysis
    2) Select the Database Connection which needs to be modified.
    3) Right Click then Edit..
    Hope this helps you..
    Regards,
    Manmohan Sharma

  • Problems when transporting from DEV to PROD

    Hi experts, I have problem during transport from DEV to Production.
    We have a  DEV, QAS and PRODUCTION and we have transport from DEV to QAS very well. But when we transport from DEV to PROD, recibe an error  like:
    After beginning the import method RS_IOBC_AFTER_IMPORT for Objects types IOBC mode (activation)
      Failed to verify catalog InfoObjetos ZCM_UNIMET_CHA01
      The InfoObjeto ZCM_RENC version does not exist in active
      The InfoObjeto ZCM_RENM version does not exist in active
    1.The Query is: Wy if the transport go OK from DE to QAS, then The transport from DEV to PROD terminated in error?.
    2. There are any items to check in production before to transport?.
    PD: All of the Objects in DEV are in ACTIVE status
    Tanks,
    Ramon Sulvaran

    The transport ended in QAS with error code (4) and ended in Producion with error code (8), the detal of the error in Production begin with:
    Home After import RS_ODSO_AFTER_IMPORT method for type (s) ODSO object (trigger mode)
    Activation of DataStore objects of type Object
    Check DataStore objects of type Object
    DataStore Object Verification ZCM_DS01
    The DataStore object is consistent ZCM_DS01
    Burning the DataStore objects of type Object
    Internal activation (DataStore Object)
    Pretreatment / Creating DDIC objects to DataStore Object ZCM_DS01
    Table / View / BIC/AZCM_DS0100 (type 0) DataStore object recorded ZCM_DS01
    Create / Delete the indexes for the active table
    Table / View / BIC/AZCM_DS0140 (type 4) recorded ZCM_DS01 DataStore object
    Type of table / BIC/WAZCM_DS0100 recorded
    Table / View / BIC/VZCM_DS012 (type VIEW) recorded ZCM_DS01 DataStore object
    Log ZCM_DS01 DataStore object changes was recorded successfully
    Writing Object Catalog entries (Tadiran)
    He has written the object TABL / BIC/AZCM_DS0100 in catálgo objects (Tadiran)
    He has written the object TABL / BIC/AZCM_DS0140 in catálgo objects (Tadiran)
    He has written the object TABL / BIC/VZCM_DS012 in catálgo objects (Tadiran)
    He has written the object TTYP / BIC/WAZCM_DS0100 in catálgo objects (Tadiran)
    Activate all ABAP Dictionary objects (5):
    Error / Warning in progr.activación Dict., Detailed log> Detail
    Activate table / BIC/AZCM_DS0100.
    Lack of expansion to the category table
    Lack of extension category for include or subtype .......
    When i go to BW Production to check teh object. I see tha the Object was create but in inactive status (grey color). When y Try to Actiavate it y see the error:  Error/ Warning in program Activation Dcit. Detailed Log -> Detail

  • Need to change report data source on reports in a copied universe

    We are setting up a new testing environment.  So I made a copy of our BO universe so we could have two different testing universes.  I then created a copy of the data source database that will be used as the data source for the reports in the copied universe.  The two different databases have the exact same tables, columns and indexes as the development database.   The only difference will be the data inside the tables. 
    I now need to change the reports to use the new universe since the reports were written using the universe instead of using the database.  I am not changing anything else in the reports.  I just need them to run against a different Oracle database. 
    So I go into Crystal Reports version 11.5.0.313 and open the report up.  I then go into Database fields in Field Explorer to change the data source.  I then go to the Set Datasource Location screen.  I open up the universe label by clicking on the plus sign and I select the copied universe.  When I do that, the Business Objects Query panel screen opens up.  Because I have switched universes, Crystal Reports wants me to reselect the columns and rebuild the query.
    We have over three thousand reports so we are trying to avoid rebuilding them.  I am looking for a better way to change what database a report runs against. 
    Note: All of the reports will be run ion demand.  Nothing will be scheduled.
    Any suggestions and information will be greatly appreciated. 
    Has anyone run into this?   What was your solution to this problem?

    Hi Joe,
    Moved your post to the Universe Forum.
    First you are using the original release of XI R2. You need to upgrade to Service Pack 6 by:
    Run License Manager first to get the keycode if you don't have it on paper somewhere.
    Then download these and uninstall then run full build first:
    https://smpdl.sap-ag.de/~sapidp/012002523100011802732008E/crxir2_sp4_full_build.exe
    https://smpdl.sap-ag.de/~sapidp/012002523100013876392008E/crxir2win_sp5.exe
    https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe
    Try again
    Don

  • Changing the data source of a Crystal Report

    Post Author: starmizzle
    CA Forum: Crystal Reports
    We're running a trial of BusinessObjects XI Release 2 to see if it fits our needs.
    We were told that we could import and publish our existing Crystal Reports and then later on go back and change their data sources to point to new universes as they're built.
    So I've published a simple Crystal Report that I can run and modify through Infoview. And I've created a universe with the appropriate fields and calculations that it needs. So how do I force my published report to use the new universe as its data source instead of the system DSN it had when it was made?

    Post Author: starmizzle
    CA Forum: Crystal Reports
    We're running a trial of BusinessObjects XI Release 2 to see if it fits our needs.
    We were told that we could import and publish our existing Crystal Reports and then later on go back and change their data sources to point to new universes as they're built.
    So I've published a simple Crystal Report that I can run and modify through Infoview. And I've created a universe with the appropriate fields and calculations that it needs. So how do I force my published report to use the new universe as its data source instead of the system DSN it had when it was made?

Maybe you are looking for

  • Latest Software update has shut down my mac - cant boot it up anymore

    can anybody shed any light on this issue - i have just (stupidly) run the latest software update (about an hour ago) and now my macbook pro wont boot past the grey screen, it restarted the 1st time but no softwarew would work- then i restarted and no

  • Error RW:50004 during install of R12 on win 2003

    Hello, I'm trying to install EBS R12 Express install with Vision DB via edelivery. Had some issues with MSVC and cygwin paths, but it was resolved thanks to posts on the forum. After about 20% of the installation [about 1hr 30mins into it], I get the

  • How to make image transparent to background in Web Dynpro...

    Hi Experts, IN our web dynpro application, we need to have some fonts and sizes of texts to be displayed on the layout. Since web dynpro has limited options for the design and color of a Textview, we have decided to use the image instead. This image

  • ITunes 6.x.x.x

    hey, is there anywhere where i can download an OLDER version of iTunes, i have just reformatted my computer so have got iTunes 7.0 and it is literally a pile of crap!! the song quality is sh*t! when i play a game whatever button i press skips through

  • Is there a plugin/convertor to convert MOV to AVCHD?

    I want to burn a AVCHD DVD with MOV or Mpeg file. Is there any plugin in FCP that can export the video to AVCHD? Or any convertor for Mac?