How to switch database at runtime usign OpenDoc

Hello,
We are using crystalreport 2008 and BOE XI 3.1.
I open crystal report from crystalreport using hyperlink and opendoc in java. This is working fine if I define db credentials in CMC, but I need to use different databases based on the parameter.
How can I achieve switching database using opendoc?
Thank you.
Julia

Hello,
I've created jsp that handles db switch and it perfectly opens correct report, but if I have 2 hyperlinks open and use subreports in them, then they overwrite each other.
What am I doing wrong?
Thank you.
Julia

Similar Messages

  • Switch databases during runtime

    Hi
    We work with JDeveloper 10g Build 1929 and Oracle 10g as database.
    We use JDBC Datasources as Connection Type, which obviously means that the database connection parameters are set via data-sources.xml.
    DataSources.xml:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
    <data-source
         name="jdev-connection-DB1" username="test1" password="test1" url="jdbc:oracle:thin:@test1:1521:test1" inactivity-timeout="30"/>
    <data-source
         name="jdev-connection-DB2" username="test2" password="test2" url="jdbc:oracle:thin:@test2:1521:test2" inactivity-timeout="30"/
    </data-sources>
    In my application I have an applicaiton module named "TestAM". During runtime, I want the TestAM to be connected to "jdev-connection-DB1" for some time and I want to switch to "jdev-connection-DB2" for some time.
    Is it possible to switch databases during runtime?
    Thanks
    Shoba

    Hi
    I used dynamic JDBC credentials in my application (i.e.) user enters the username and password for the database before entering into the application.
    I was using "JDBC data source" as Connection Type. But dynamic database credentials did not work. But it worked for the Connection Type "JDBC url".
    But if I have the connection type as "JDBC URL" and if I use
    Configuration.createRootApplicationModule
    in my code I get the following error:
    oracle.jbo.JboException: JBO-29000: DB Connection Failure
    at oracle.jbo.JboException.<init>(JboException.java:343)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1772)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2611)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
    at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:230)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
    at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1505)
    at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1463)
    at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1435)
    07/09/20 12:54:19 JBO-30003: DB Connection Failure
    at com.dags.view.controller.PageAction.changeApplicationUserContext(PageAction.java:429)
    at com.dags.view.controller.PageAction.processComponentEvents(PageAction.java:192)
    at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:430)
    at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:126)
    at oracle.adf.controller.struts.actions.StrutsUixLifecycle.handleLifecycle(StrutsUixLifecycle.java:70)
    at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:222)
    at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:153)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
    at com.dags.view.admin.DynamicJDBCBindingFilter.doFilter(DynamicJDBCBindingFilter.java:31)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:669)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    So, if I have the connection type as "JDBC url", then dynamic database credentials works, but "Configuration.createRootApplicationModule" doesn't work.
    if JDBC data source, then dynamic database credentials doesn't work, but "Configuration.createRootApplicationModule" works.
    Has any one faced the same issue?
    Please help....
    Thanks
    Shoba

  • How to switch database

    Hello Friends,
    I am new to Oracle & I am using oracle Enterprise Manager Console for creating a new database.While creating new database it asks for Hostname & SID.The Hostname of my system is neha & SID is also neha.So The name of new database is appearing in Tree view as neha_neha - system as sysdba.
    I am confused now.Is neha_neha the name of my new database???& Suppose if I want to create another database so will I give the same hostname & SID again? Coz Hostname & SID will remain same.
    After that I want to use this neha_neha database from sql plus.How to switch the database from my previous database to this new database???Please help me I am stuck here.Thanx in advance.
    Neha

    Every database within the same Oracle instance requires a unique sid. Let's say you install oracle to a server (ONE) and create database with sid A. You would be required to enter a unique sid, like B, the next time you tried to create a new database.
    Sid is not required to match the hostname of the computer. You can name an oracle database whatever you wish as long as it adheres to the Oracle guidelines.
    However, if you have a separate oracle environment on a different server (TWO) then you can create a database with the same name as one which resides on server ONE. Oracle maps each particular database to it's host using a file called the TNSNames.ora...and this is how you'd switch between the two. Pls look at the documentation for information about it.
    Hope this helps.

  • How to set database information runtime with delphi 2007 vcl11

    hi
    i'm trying to set database information runtime. I'm using mssql express 2005 and doing the following to set database information at runtime.
    for x  := 1 to crpe1.Tables.Count do
    begin
      crpe1.LogOnInfo.Items[x].ServerName := server.text;
      crpe1.logoninfo.items[x].DatabaseName := database.text;
      crpe1.logoninfo.items[x].UserID:=username.text;
      crpe1.logoninfo.items[x].Password := pass.text;
    end;
    is above code correct to set the database information?
    Thanks in advance,
    Parv

    hi all,
    i resolved it somehow. thanks.
    Parv

  • Switch database in Crystal Report 2013

    Hi All,
    I have Crystal Report 2013 and my client require to connect multiple database with single report. I have more than 10 MySql database and all database structure are same.
    E.g. Create one report Employee Detail and connect using ODBC (RDO) I have successfully connected my single MySql database. Now I need to use this report for another database.
    My question is how to switch database at runtime?
    Anybody help me please.
    Thanks.

    You can create either a .NET or a Java app to schedule or view the report - it would connect in to the CMS and handle things from there.  It's not difficult to set the database connection in code.  Your best bet for additional help will be to look here:  http://scn.sap.com/community/bi-platform/microsoft-net-sdk or here:http://scn.sap.com/community/bi-platform/java-sdk.  There is sample code available in both places as well.
    Also, while I know that the utility Ido is referring to  will work with Crystal reports, I'm not entirely sure it will work with reports that reside in CRS.  So, you'll need to review it closely to determine whether it will work for you.
    -Dell

  • How to dynamic order of groups & How to fetch data at runtime from database

    Post Author: ferikpatel
    CA Forum: Formula
    I am using visual studio .net application having inbuilt crystal report feature. Now, what I want to do is, i have create 5 groups in crystal report, but dynamically want to change the order of those reports as per user's selection.
    How to do that?
    Also, how to fetch database item on runtime which is not selected through data expert as its relation is depends on situation. Say if one field's value is 5 than i want to get name of customer, but if same field's value is 6 than i want to get name of suppliers. In database both supplier and customers tables are different however they are connected with base table.
    I'm bit new in crystal report. Please help me out if it is possible.

    Post Author: Charliy
    CA Forum: Formula
    You don't actually change the order of the groups.  You group on a formula and change contents of the formula based on the parameter.
    IF {?Group1} = "Manager" then {table.Manager}
    else if {?Group1} = "Invoice Date" then Totext({table.InvDate},"yyyyMMdd")    note all options must be the same date type, so numbers and dates are converted
    else . . .

  • How to change a connection with the database in Runtime?

    How to change a connection with the database in Runtime?
    My connection was made using ADF Business component (ApplicationModule).
    ADF Swing.
    JDeveloper Studio 11.1.1.4.0.

    When deploying ADF applications with database connection, you should be using JDBC data sources configured in the weblogic server.
    You could change the JDBC data sources to a different DB instance or location - by changing the JDBC data source and restarting the weblogic server.
    For more details, check
    http://techiecook.wordpress.com/2010/12/02/oracle-weblogic-adf-datasources/
    Thanks,
    Navaneeth

  • If the production database i down, how to switch to standby database using the replication environment in ASsE

    This question is in Business Continuity Plan (BCP)
    if the production database is down, how to switch to standby database using the replication environment in ASE

    Assuming you're referring to Sybase's Replication Server (repserver) product ...
    Repserver moves data changes from one database to another.
    Repserver can't 'switch' your application to use a different database; something outside of repserver has to do the actual switching.
    If your application happens to be connecting to your ASE via Sybase's OpenSwitch (or similar) product, then OpenSwitch would be responsible for switching your application to use the standby database.  Whether you have OpenSwitch perform the switch automatically, or via a manual command, is up to your BCP requirements.
    If your application connects directly to ASE then you'll have to decide how/when to get your application to switch to the standby database.  In the simplest form this would require shutting down the application, making sure replication is quiesced (ie, all in-flight transactions have been applied to the standby database), modify the interfaces/sql.ini file (used by your application) to point to the standby database, make any customized changes to the standby dataserver/database (eg, unlock application logins, take databases out of 'dbo use only' mode, etc), and startup the application (at this point it should connect to the standby database per the changes to the interfaces/sql.ini file).

  • How to display images at runtime in a web appplication

    i use C#. and also, how do i get an image to be downloaded from mysql database at runtime upon request. here is a bit of my declaration code and conditional construct code
     byte [] f = (byte[])(read["Passport"]); // this reads d byte data from the column passport in the database and assigns it to byte f.
    if (f == null)
           admin1pass.ImageUrl = null;
     else
           MemoryStream ms = new MemoryStream(f); // this holds the image gotten from the database
           admin1pass.ImageUrl = System.Drawing.Image.FromStream(ms);
    'now thats where i'm stuck. i hv used the
    using System.Drawing;
    using System.Data;
    namespaces but none contains the class Image which is oftren what i use in windows form apps.

    They'll help you over here.
    Microsoft C# ASP.Net forum
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Facing problem while changing the database at runtime

    hi everyone,
    Before posting this thread, i have gone through the various posts addressing the problem....but still iam unable to get the solution for this problem.
    The report has been generated in one system, so the database properties (connection string....) are hardcoded in the report file...
    Now when iam trying to change the database, it is still connecting to the system where the report file was created.
    I have tried the changeDatasource() method, but it didnot worked....
    here is the code for changeDatasource() method
    public static void changeDataSource(ReportClientDocument clientDoc,
                    String reportName, String tableName,
                    String username, String password, String connectionURL,
                    String driverName,String jndiName) throws ReportSDKException {
            PropertyBag propertyBag = null;
            IConnectionInfo connectionInfo = null;
            ITable origTable = null;
            ITable newTable = null;
            // Declare variables to hold ConnectionInfo values.
            // Below is the list of values required to switch to use a JDBC/JNDI
            // connection
            String TRUSTED_CONNECTION = "false";
            String SERVER_TYPE = "JDBC (JNDI)";
            String USE_JDBC = "true";
            String DATABASE_DLL = "crdb_jdbc.dll";
            String JNDI_DATASOURCE_NAME = jndiName;
            String CONNECTION_URL = connectionURL;
            String DATABASE_CLASS_NAME = driverName;
            // The next few parameters are optional parameters which you may want to
            // uncomment
            // You may wish to adjust the arguments of the method to pass these
            // values in if necessary
            // String TABLE_NAME_QUALIFIER = "new_table_name";
            // String SERVER_NAME = "new_server_name";
            // String CONNECTION_STRING = "new_connection_string";
            // String DATABASE_NAME = "new_database_name";
            // String URI = "new_URI";
            // Declare variables to hold database User Name and Password values
            String DB_USER_NAME = username;
            String DB_PASSWORD = password;
            System.out.println("DB_USER_NAME......."+DB_USER_NAME);
            System.out.println("DB_PASSWORD......."+DB_USER_NAME);
            // Obtain collection of tables from this database controller
            if (reportName == null || reportName.equals("")) {
                Tables tables = clientDoc.getDatabaseController().getDatabase().getTables();
                System.out.println("Tables in reports........"+tables.size());
                for(int i = 0;i < tables.size();i++){
                    origTable = tables.getTable(i);
                    System.out.println("origTable........"+origTable.getQualifiedName());
                    if (tableName == null || origTable.getName().equals(tableName)) {
                        newTable = (ITable)origTable.clone(true);
                        // We set the Fully qualified name to the Table Alias to keep the
                        // method generic
                        // This workflow may not work in all scenarios and should likely be
                        // customized to work
                        // in the developer's specific situation. The end result of this
                        // statement will be to strip
                        // the existing table of it's db specific identifiers. For example
                        // Xtreme.dbo.Customer becomes just Customer
                        newTable.setQualifiedName(origTable.getQualifiedName());
                        System.out.println("newTable........"+newTable.getQualifiedName());
                        // Change properties that are different from the original datasource
                        // For example, if the table name has changed you will be required
                        // to change it during this routine
                        // table.setQualifiedName(TABLE_NAME_QUALIFIER);
                        // Change connection information properties
                        connectionInfo = newTable.getConnectionInfo();
                        // Set new table connection property attributes
                        propertyBag = new PropertyBag();
                        // Overwrite any existing properties with updated values
                        //propertyBag.put("Trusted_Connection", TRUSTED_CONNECTION);
                        //propertyBag.put("Server Type", SERVER_TYPE);
                        propertyBag.put("Use JDBC", USE_JDBC);
                        propertyBag.put("Database DLL",DATABASE_DLL );
                        propertyBag.put("JNDI Datasource Name",JNDI_DATASOURCE_NAME );
                        propertyBag.put("Connection URL", CONNECTION_URL);
                        propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);
                        //propertyBag.put("Server Name", SERVER_NAME); //Optional property
                        // propertyBag.put("Connection String", CONNECTION_STRING); //Optional property
                        // propertyBag.put("URI", URI); //Optional property
                        connectionInfo.setAttributes(propertyBag);
                        // Set database username and password
                        // NOTE: Even if the username and password properties do not change
                        // when switching databases, the
                        // database password is *not* saved in the report and must be set at
                        // runtime if the database is secured.
                        connectionInfo.setKind(ConnectionInfoKind.SQL);
                        connectionInfo.setUserName(DB_USER_NAME);
                        connectionInfo.setPassword(DB_PASSWORD);
                        // Update the table information
                        clientDoc.getDatabaseController().setTableLocation(origTable,newTable);
    Also i tried with replaceConnection() method...........it displayed the report, but with not column names and data
    need help regarding.......
    Edited by: abhishek.c1984 on Jun 25, 2009 10:02 AM

    In the report i have two tables.............so before changing the database properties for each table iam printing their names.
    The names are dispalyed correctly.......but once i set the table location...i.e through the following method..
    clientDoc.getDatabaseController().setTableLocation(tables.getTable(i),newTable);
    every time i can see only one table i.e. properties are set for the first table ........and each time the properties are being set for the first table only.....i dont no what is happening to the rest of the tables..
    I have posted the method in the above post.....can any one please trace out the problem
    Note: when i comment the following code, i can see all the tables
    clientDoc.getDatabaseController().setTableLocation(tables.getTable(i),newTable);
    when i uncomment it, i can see only first table repeating every time...
    Edited by: abhishek.c1984 on Jun 25, 2009 1:03 PM

  • How do I fix a runtime error?

    How do I fix a runtime error?

    See this tech note for rebuilding the media database and general troubleshooting tips.
    http://helpx.adobe.com/photoshop-elements/kb/microsoft-c-runtime-error-launcing.html

  • Change Location of Database at Runtime for Report based on a Command

    Post Author: srr
    CA Forum: Crystal Reports
    I am using Crystal Reports Developer XI 11.5.8.826 - My database is MS Access 2003
    I have created a report definition that is based on a query of multiple tables in the database, which is saved in Crystal Reports as a Command.
    The report runs fine inside the Crystal Reports report designer.
    I have a VB.NET 2.0 Windows Form application that contains a CrystalReportViewer control. I need to be able to set the location of the database at runtime. When I try to set the Table Location property to a different location than the design time location at runtime I get the login screen and no matter what I enter in the login screen I get a Login Failed error.
    How do I set the DB location at runtime, when the report is based on a command?

    Hi,
    When you run the Interactive Report, go to Actions drop down:
    Actions->Format->Highlight
    Name: (Give a name to the highlight operation)
    Sequence: (The sequence in which multiple highlights should work)
    Enabled: (Enabled/Disabled)
    Highlight Type: (Row/Cell)
    Background Color: (Background Color you want to set)
    Text Color: (Text Color you want to set)
    Highlight Condition:
    1) Column: (Column on whose value you want to set the highlight)
    2) Operator: (use appropriate operator)
    3) Expression: (Value on which the highlight should appear)
    Hope it helps!
    Regards,
    Kiran

  • Giving input to jtable from a database in runtime

    friends
    previously i have posted an query asking how to intilize the row size of jtable in run time for which i got good rewsponce to direct me to an page in sun/components,i read the jtable page in specifie link provided in sun,but i could not figure out how to give input to jtable from a database on runtime.In that page they have used by giving input in an array and then displaying it, by that they set the no of rows in the table ,but i want to set the row size based on number of records fetched from the oracle database.kindly guide me
    Arjun

    What you need is to develop a table model which uses a database as the data source.
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#data

  • [OSB] Oracle Service Bus: select database DBadapter runtime

    Suppose you have 2 databases DB1 and DB2 and both have the SCOTT scheme with the EMP table. The default way to gain access to the databases in the Oracle Service Bus (OSB) is by defining 2 database adapters and defining a business service on each adapter:
    - BS1 DBadapter1 DB1.SCOTT.EMP
    - BS2 DBadapter2 DB2.SCOTT.EMP
    With this setup you can define a proxy service and let the message flow decide which adapter to call.
    Now change this configuration a little and suppose you have 25 databases, you can define 25 database adapters and 25 business services, but that involves a lot of repeating work of defining adapters and business services. A more elegant configuration is one business service with one database adapter, and the database connection is set runtime in stead of design time.
    PS BS DBadapter DB1.SCOTT.EMP ... DB25.SCOTT.EMP
    The challenge is: how do you configure the database adapter runtime (called by an OSB business service).
    With kind regards,
    Jornica

    Oracle Service Bus 10gR3 contains the JCA framework which will eventually allow us to exploit the whole set of JCA adapters currently in use in BPEL Process Manager. Over the next few months several JCA adapters will be certified to be used with Oracle Service Bus - the Database adapter is one of the first of these.
    As for SOA Suite and WebLogic bundling, let me explain. SOA Suite contains the following products:
    BPEL Process Manager
    Business Activity Monitoring
    Business Rules
    Web Services Manager
    Complex Event Processing
    B2B
    ESB (the old Oracle ESB product)
    Service Bus (formerly AquaLogic Service Bus from BEA)
    This does not come with an application server as the suite is hot-pluggable (i.e. can be used with a number of application servers). However, the preferred (and cheaper) approach is to purchase SOA Suite and WebLogic Suite (which contains iAS, WebLogic Enterprise Edition, Coherence, JRockit with 100ms deterministic garbage collection and WebLogic Operations Control). This is because some of the elements of the SOA Suite only currently run on iAS (B2B) and some only run on WebLogic Server (Oracle Service Bus) although in the future these will also become hot pluggable.
    To find out more, check out the SOA Suite and WebLogic Suite pages below:
    [SOA Suite|http://www.oracle.com/technologies/soa/soa-suite.html]
    [WebLogic Suite|http://www.oracle.com/appserver/weblogic/weblogic-suite.html]
    You will find the DataSheets are particularly useful for giving you an overview of the suite.
    Hope that helps.
    Chris

  • How to install database firewall 5.0

    I download Oracle Database Firewall 5.0.0 Media Pack v1 for Linux x86 from edelivery, and I readed the document "Installation Guide Release 5.0 E18693-03".
    Then I installed oracle enterprise linux 5.4 x86, But I can't find the "Welcome to Enterprise Linux screen" when I login to linux.(page 18 on document)
    how to install database firewall 5.0?
    Thanks.

    Hi
    The DB Firewall acts as a bridge when using in inline mode. You should not have to change anything on the Client nor on the DB Server. The Client, DB Firewall and DB Server are in the same IP Network but not "physically" connected. This mean's the DB Server is connected with the DB Firewall on one side and the Client with the DB Server on the other side.
    I've configured a test environment with VMWare. To have to separated network I created a second host only network with the same IP range. DB Server and on Network Interface of the DBFW is in vmnet2 while Client, DBFirewall Console and second Network Interface is in vmnet1. When the DB Firewall or Bridge is switched off the client can not "see" the DB Server anymore. I've documented my Test Environment at http://www.oradba.ch/2011/04/oracle-database-firewall-test-environment/
    I saw a test configuration from Oracle based on Virtualbox. There they used the internal network for the DB Server / DBFW NIC1 and the host only network for the client, DBFW Console and DBFW NIC2.
    1. Why I am not able to see all tabs in DBFW console?
    => no idea.
    2. How to integrate Oracle Database with this Firewall setting?
    => no change on the DB nor on the Client. Setup an enforcement Point to integrate it in the DBFirewal.
    3. Will user access DBFW or DBFW-MS or Database?
    => The do not have to access DBFW unless they want to see the console
    4. What will be the change in the TNS entries on client side?
    => no change
    Cheers
    Stefan

Maybe you are looking for

  • Universal dock s-video out to tv

    Does anyone know if you can use the video out on the universal dock to see what music/song is currently playing? I wanted to use my ipod like a jukebox and display everything on my tv. I have everything hooked up right and the settings are right. I w

  • Re:Profit center re-organisation

    Hi All, My client wants to change the whole profit centers and its hierarchy. Now we are maitaining product wise profit centers in 4.7c and getting upgraded to ECC 6.0. In this course we need to change the locations as profit centers. How can we achi

  • Function module to find the external reference number in CRM?

    hi all,       Is there any function module available to find the process_types for a given external reference number?

  • Business Rules Security Disappears

    We have a strange problem in 11.1.2.1 Version. When we assign access to BR's in the planning application to few Groups and Refresh the application. These Groups access to BR's works well after sometime the Groups access to BR's disappears even withou

  • Speaker does no longer work since updated to Mac OS X 10.6.8

    Hi, my Bose speaker no longer work with my MacBookPro since I've updated to Mac OS X 10.6.8. When I connect them to my iPod they work as usual. Any Ideas? Thank you, Michael