Changing Database Oracle Reports Connection.

Hi Fellows.
I would like to know if it is possible to Change Oracle Reports Connection (Ver2.5) after the end user fill in the Parameter Form. I have about 21 agencies with a Database in each one and the end user have to choose the agency what he wants to query. Send some ideas to see what can i do.
Thanks for your Help!
P.D. I had reading Oracle Reports help and I had found something about but did not work (CONNECT DB scott/tiger@inventory).

Don't know how to do that, but I have a suggestion (not a very good one, i agree). You can use lexical parameters to achieve this.
You may have all of your Report client connecting to the same "dummy" database. In this DB you'll create database links for all other agencies (databases).
In the parameter form, you create a DB_LINK parameter listing all available agencies (DB Links).
In your report query, you'll use a lexical parameter. I'd look something like that:
select bla bla bla
from TABLE_NAME@'&DB_LINK'
As I said, it's not a very good idea, but I don't know an alternative either. If you already have lots of reports, you'll have to alter each one. I don't know if DB Links are a feasible solution for your environment. Don't know if you have the time for that...
Regards,
Marcos

Similar Messages

  • How to Change Database of Report before Exporting?

    I am having difficulties changing the database that the report should run against.
    We are using Oracle.  In the past when scheduling a report through CE, I would manipuate the Desktop.ReportLogons object.  For Oracle I simple changed the CustomServerName, CustomUserName, and CustomPassword properties.  Everything worked fine when the report was scheduled and ran.
    Now I am doing an on-demand report without an interactive viewer.  I am doing everything in code using RasAppFactory and the ReportClientDocument.
    I am looking at the DatabaseController of ReportClientDocument.  I thought I could just use the LogonEx method passing in the server, user, password, and an empty string for the database since for Oracle connections you only specify server and not database.  However, it is still trying to connect to the defined database.
    Can someone point me to an Oracle specific example of how to properly change database info when report runs?
    Do I need to be using other methods like one of the SetTableLocation methods?
    Thanks in advance for any help.

    Hello, Stephen;
    You are correct, with Oracle you do not need the Database property.
    The person logged on to Business Objects Enterprise through the RAS .NET application would need rights to make the change in database connections. Can the usr with the same logon make the change directly in Enterprise?
    The ReportClientDocument separates the Server Name and Database from the User ID and Password with the PropertyBag. The convenience methods such as LogonEx will only change the User ID and Password. To change all four properties you need the full RAS logon code.
    The full logon for RAS would use code as shown below.
    Elaine
    ==========================================
    Imports System
    Imports Microsoft.Win32
    Imports CrystalDecisions.Enterprise
    Imports CrystalDecisions.Enterprise.Desktop
    Imports CrystalDecisions.CrystalReports.TemplateEngine
    Imports CrystalDecisions.ReportAppServer.ClientDoc
    Imports CrystalDecisions.ReportAppServer.Controllers
    Imports CrystalDecisions.ReportAppServer.ReportDefModel
    Imports CrystalDecisions.ReportAppServer.DataDefModel
    Imports CrystalDecisions.ReportAppServer.CommonObjectModel
    Imports CrystalDecisions.ReportAppServer.ObjectFactory
    Partial Class Logon
        Inherits System.Web.UI.Page
        Dim mySampleReportName As String = "SimpleSetLogonInfo.rpt"
        Dim crServerName As String = "myOracle"
        Dim crDatabaseName As String = ""
        Dim databaseUserName As String = "tester"
        Dim databasePassword As String = "tester"
        Dim crDatabaseController As DatabaseController
        Dim crDatabase As Database
        Dim crTableOld, crTableNew As Table
        Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
            ConfigureCrystalReports()
        End Sub
        Private Sub ConfigureCrystalReports()
            DatabaseLogon_managedRAS()
        End Sub
        Private Sub DatabaseLogon_managedRAS()
            Dim mySessionMgr As New SessionMgr()
            Dim myEnterpriseSession As EnterpriseSession
            Dim myReportAppFactory As ReportAppFactory
            Dim myInfoStore As InfoStore
            Dim myInfoObjects As InfoObjects
            Dim myInfoObject As InfoObject
            Dim myReportClientDocument As ReportClientDocument
            Dim myEnterpriseService As EnterpriseService
            Dim myObject As Object
            myEnterpriseSession = mySessionMgr.Logon("administrator", "", "CMS_Server", "secEnterprise")
            myEnterpriseService = myEnterpriseSession.GetService("InfoStore")
            myInfoStore = New InfoStore(myEnterpriseService)
            myInfoObjects = myInfoStore.Query("Select SI_ID From CI_INFOOBJECTS Where SI_NAME='" + mySampleReportName + "' And SI_INSTANCE=0")
            myInfoObject = myInfoObjects(1)
            myObject = myEnterpriseSession.GetService("", "RASReportFactory").Interface
            myReportAppFactory = CType(myObject, ReportAppFactory)
            myReportClientDocument = myReportAppFactory.OpenDocument(myInfoObject.ID, 0)
            'Convenience methods not to change Database or Server name from what is in the report
            'myReportClientDocument.DatabaseController.logon("UID", "PWD")
            'myReportClientDocument.DatabaseController.LogonEx("myServerName", "myDatabase", "UID", "PWD")
            crDatabase = myReportClientDocument.DatabaseController.Database()
            crDatabaseController = myReportClientDocument.DatabaseController()
            ' Loop through all the tables in the main
            ' report and set their new table information.
            For Each crTableOld In crDatabase.Tables
                crTableNew = GetNewTable(crTableOld, crServerName, crDatabaseName, databaseUserName, databasePassword)
                crDatabaseController.SetTableLocation(crTableOld, crTableNew)
                crTableNew = Nothing
            Next
            crDatabase = Nothing
            crTableOld = Nothing
            myCrystalReportViewer.ReportSource = myReportClientDocument
        End Sub
        Private Function GetNewTable(ByVal crTableOld As Table, ByRef serverName As String, ByRef databaseName As String, ByRef userName As String, ByRef password As String) As Table
            ' Create crTableNew as a new table, then fill its properties.
            Dim crTableNew As New Table
            Dim crAttributes, crLogonInfo As PropertyBag
            ' Set some of the properties of the new table object.
            crTableNew.ConnectionInfo.UserName = userName
            crTableNew.ConnectionInfo.Password = password
            crTableNew.ConnectionInfo.Kind = crTableOld.ConnectionInfo.Kind()
            crTableNew.Name = crTableOld.Name
            crTableNew.Alias = crTableOld.Alias
            ' Make a copy of the connectionInfo.Attributes and apply them to the new table.
            crTableNew.ConnectionInfo.Attributes = crTableOld.ConnectionInfo.Attributes.Clone(True)
            crAttributes = crTableNew.ConnectionInfo.Attributes()
            ' Check to ensure the connection info Kind is correct then change the a
            ' appropriate properties in the PropertyBag.
            ' These will vary from report to report using ODBC, OLEDB or Native drivers
            ' To find out your properties
            ' open your report in the Crystal Reports Designer and go to Database,
            ' Set Location menu. Check the properties of your connection and note
            ' the name of the properties that will change.
    'ODBC to Oracle "Data Source Name" and "Table Name" with "Owner"
    'OLEDB to Oracle "Provider" "Data Source" and "Table Name" with "Owner"
            If crTableNew.ConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE Then
                crLogonInfo = CType(crAttributes("QE_LogonProperties"), PropertyBag)
                crLogonInfo("Data Source") = crServerName
                'MS SQL Server OLEDB
                'Leave out for Oracle
                'crLogonInfo("Initial Catalog") = crDatabaseName
            End If
            ' Adjust the qualified name, then return the new table object if the table name has changed
            crTableNew.QualifiedName = "Owner." & crTableNew.Name
            Return crTableNew
        End Function
    End Class

  • AutoConfig rolling back the changes for Oracle Report Services

    Hi Gurus,
    I am putting some properties in $INST_TOP/ora/10.1.2/reports/conf/rwbuilder.conf in R12.0.6 EBS instance to fix a report related issue. Whenever I ran the auto config, my changes are going away. Can you please help how can I preserve my changes please.
    Thanks
    Asif

    user12142193 wrote:
    Hi Gurus,
    I am putting some properties in $INST_TOP/ora/10.1.2/reports/conf/rwbuilder.conf in R12.0.6 EBS instance to fix a report related issue. Whenever I ran the auto config, my changes are going away. Can you please help how can I preserve my changes please.
    Thanks
    AsifPlease apply the patches mentioned in these docs.
    Intermittent Oracle Reports REP-0069: REP-57054: Error [ID 1237834.1]
    Patch 11669923 Post Patch Instructions Would Get Overridden By Autoconfig [ID 1322704.1]
    Reports Cache Directory in Oracle E-Business R12 is Growing Rapidly [ID 859255.1]
    EBS R12 Oracle Reports Cache Directory Not Being Cleaned Up [ID 1062825.1]
    Thanks,
    Hussein

  • How change database from mode MTS (Shared) to mode Dedicated?

    How change database (Oracle 8.1.7) from mode MTS (Shared) to mode Dedicated?

    Did you try it ? Look at this :
    TEST =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = test)
          (SERVER=SHARED)
    SQL> show parameter mts
    NAME                                 TYPE    VALUE
    mts_circuits                         integer 170
    mts_dispatchers                      string  (protocol=tcp)(dispatchers=2)(
                                                 connections=500)
    mts_listener_address                 string
    mts_max_dispatchers                  integer 5
    mts_max_servers                      integer 20
    mts_multiple_listeners               boolean FALSE
    mts_servers                          integer 2
    mts_service                          string  test
    mts_sessions                         integer 165
    SQL> conn scott/tiger@test
    Connected.
    SQL> conn / as sysdba
    Connected.
    SQL> alter system set mts_dispatchers='(protocol=tcp)(dispatchers=0)(connections=0)'
    SQL> /
    System altered.
    SQL> alter system set mts_servers=0;
    System altered.
    SQL> conn scott/tiger@test
    ERROR:
    ORA-12520: TNS:listener could not find available handler for requested type of
    server
    Warning: You are no longer connected to ORACLE.
    SQL>                                                                                                                  However, as I said in my previous posting, you should modify initSID.ora too. If not, next time you'll restart your DB, it will run in shared mode again.

  • Oracle Reports Server: From 10.1.2.0.2 to 10.1.2.2

    Hi,
    We are looking to change our Oracle Reports Server from version 10.1.2.0.2 to 10.1.2.2
    Reason for change: To apply the patch for Bug 5739424
    What will be the impact? On reports, report invocation, report generation etc.
    Please give a brief description
    Your inputs will be appreciated
    Thanks,
    Krrish

    Hi,
    Any suggestions?
    I am waiting for your replies...
    Please update with your valuable inputs

  • Help needed for MySQL 5 database DSN less connection with Oracle reports

    Hi,
    I am using Oracle Develper Suite and java (J2EE) for my application. I am using MySql 5 as database tool. I want to use Oracle reports of Oracle Develper suite. I have created some reports by first creating system DSN for MySql database and then connect Oracle reports to that DSN by "jdbc:odbc" connection string provided in Oracle Report developer wizard. This is working fine.
    I want to generate reports without creating system DSN (DSN less) so that i can use my application on any computer without creating DSN for Oracle Reports. I am deploying my application on OC4j as "EAR" file.
    Help in this regard will be highly appreciated.
    Regards.

    Using an 8i client, you will need to configure the tnsnames.ora file with appropriate connection information if you are using local naming. If you are using host naming or something like an Oracle Names server to resolve TNS aliases, you can skip the tnsnames.ora configuration. A default installation of the Oracle client, though, will probably be using local naming.
    If the tnsnames.ora file is configured, or you have configured an alternate way of resolving TNS aliases, you should be able to use the connection string
    DRIVER={Oracle ODBC Driver};DBQ=<<TNS alias>>;UID=system;PWD=managerIf you wanted to move to the 10g client (the 10g Instant Client could be useful here), there are some streamlined naming methods that could be used instead of configuring the tnsnames.ora file.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Programm change in Oracle ADF database connection

    Hello!
    Our company uses an application implemented in Oracle Forms. We have about 2500 users. Each user works with a database using Oracle c your login / password.
    We want to migrate to Oracle ADF. But the concept of Oracle ADF - under a single user connection.
    But the position of the database administrators - do not use OracleInternetDirectory (LDAP), does not create users in WebLogic. :(
    In our company, users are created in the database Oracle. Users are database role.
    Our idea is to send in an application ADF user name and password. Safety is solved at the database level.
    Can I do this:
    1. When the application starts to change the ADF database connection to a user username / password?
    2. Can there be problems in the future?
    3. Are there any examples?
    Please help
    Vasily (sorry for bad english)/
    Edited by: user10711272 on 16-Jan-2012 08:43

    Hi,
    You can create a custom authentication provider in WLS that uses a JAAS Login Module that attempts to connect to the database for authentication pupose. The application itself would run with a JDBC Data Source, so that you only use the database account to authenticate the user and get his/her database roles as authorization groups. I have a sample for this on my to-do list but so far hadn't the time to get to it. So yes, you don't need OID or LDAp to manage users but could keep going using the database
    Frank

  • Connecting Oracle Reports (9i or higher) to a DB2 database

    Hi all, this may just be a newbie question. In Oracle reports, is it possible to generate reports getting data from a DB2 database? I asked this because the clients of one of our projects requires us to print reports on both their oracle and db2 databases. We were thinking if we should use Oracle Reports as our standard reporting tool for this. What do you guys think?
    Also any good articles, docs and info abt this topic is very much appreciated.
    Thanks in advance for your time in reading this post.
    regards,
    espi

    Personally, if it is feasible to do so, I would prefer to export and import specific application schemas or tablespaces rather than doing a full export and import. That's more of a personal preference thing.
    I wouldn't be overly concerned about moving to a different operating system-- moving to a different Oracle version is likely a far more drastic change. That said, there are a number of things in Oracle that are operating system and/or version specific that have the potential to cause you problems, so you need to do a thorough test. Well over 99% of the features are going to behave exactly the same, but every application of sufficient complexity seems to manage to find one odd-ball scenario where something changes between releases.
    Justin

  • Can Oracle 8.0.6 reports connects to Oracle 11g Database

    Hi,
    I know Oracle 8.0.6 report is already out of support. I want to build some environement. In this context, I want to know, where Oracle Reports 8.0.6 can connect to Oracle 11g R2 database ?
    Pl suggest me urgently.
    thanks & regards
    parag

    First of all: using the word 'urgently' is inappropriate and rude in a forum of volunteers.
    Edit your post and apologize publicly for using it.
    Secondly your question is a rhetorical one, as it's answer is:
    OF COURSE NOT
    8.0.6
    was succeeded by
    8.1.5
    8.1.6
    8.1.7
    9.0.1
    9.2.0
    10.1.0
    10.2.0
    11.0.1
    11.0.2
    NINE releases in between!!!
    Sybrand Bakker
    Senior Oracle DBA

  • Change database connection for FRS Report

    currently we are using ASO BSO model and all FRS reports are retrieve against BSO Database.Now we are converting to ASO only model. can i use the same report against ASO database .
    There is a option of chang database connection under tool in workspace . will this work or do i have to make all reports again
    can you please help me with this
    thank you

    IN some cases even if the report has additional dimensions it will work. After you change the connection. Open the report in designer. The new dimensions will automatically update. Save the report and you should be good to go. If dimensionality is exactly the same you don't even have to do that, just change the connection, point ot the new database and run the report.

  • Unable to set a new report connection to Oracle

    Hi,
    Crystal Reports v. 11.5.10.1263
    VS Studio 2005
    Oracle client 10.2, no connectivity issues
    I am changing the connection at runtime to connect to another instance of Oracle database.
    the report is of type ReportDocument.
    report.DataSourceConnections[0].SetConnection("name from tnsnames.ora", null, "username",  "password");
    It does not seem to work. It does not set the new connection.
    Any input appreciated. Thanks

    Something like this:
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.ReportDefModel;
    using CrystalDecisions.ReportAppServer.DataSetConversion;
    using CrystalDecisions.ReportAppServer.DataDefModel;
            CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            ISCDReportClientDocument rptClientDoc;
    When opening the report you can use both references:
              rptClientDoc = new ReportClientDocumentClass();
                    // Common open dialog box to select the report file
                    rpt.Load(rptName.ToString());
                    rptClientDoc = rpt.ReportClientDocument;
    Thank you
    Don

  • Can we use different Databases (Oracle & SQL Server) in one report?

    Post Author: venki5star
    CA Forum: .NET
    Hi there.
    Can we use different databases (Oracle & SQL Server) in a same report?
    If possible how?
    Another question,
    Can we change the Provider Name at runtime of the given report. If so the above question is useless...
    Thanks in Advance.

    I tried this using Oracle Provider for OLEDB (the one that supplied by Oracle Client) and Crystal Reports 9. you can drag the column into designer but the image does not appear in preview.
    I guess it's because CR does not recognized it as image, and there are no information that the blob data is an image at all.

  • Connect Oracle Reports to Ms Sql Server DB

    Is it possilbe to Connect Oracle Reports to Microsoft Sql Server database. If yes then how. Please advice.
    Thanks
    Sami.

    It is possible to connect Oracle database to MS Sql server database using the Oracle Transparent Gateway for MS SQL Server.
    You can use the following links to configure such connection:
    Oracle Transparent Gateways - General Description - Part I
    http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateways-general.html
    Oracle Transparent Gateway for MS SQL Server - Part II
    http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateway-for-ms-sql_16.html
    Aviad

  • Changing Database connection at runtime in CR2008

    Hi,
    I have a VS2008 application which is using CR2008 to generate pdf reports for the user. Problem is I am not able to change the database connection to any server other than the one that was used to create the report template.
    My environment has CR2008 SP2. I have tried reports with no paramter as well as the ones with parameters both dont seem to work.
    I have already tried a couple of things:
    a) report document refresh after loading it
    b) setting the database connection as
    this._crReport.DataSourceConnections[0].SetConnection(dbServerName, dbName, dbUserId, dbPwd);
    c) setting the database connection as
    tbls = this._crReport.Database.Tables;
                    bool test = false;
                    foreach (Table tbl in tbls)
                        tblLogonInfo = tbl.LogOnInfo;
                        tblLogonInfo.ConnectionInfo = connInfo;
                        tbl.ApplyLogOnInfo(tblLogonInfo);
                        test = tbl.TestConnectivity(); ** note this alwys return a true for the changed database server
    I have read a couple of thread but none has worked for me...Is this a known issue with CR2008?
    Thanks
    Kajal

    Hi Kajal,
    I am assuming that you are not changing the schema of the report at any point of time. I would suggest you to try pointing to the other database through designer to make sure that you can hit the database and the schema is correct. You can also create a udl file to check the database connectivity.
    Then just for testing purpose you can try the following code:
    ReportDocument reportDoc = new ReportDocument();
    reportDoc.Load("path of the report");
    reportDoc.SetDatbaseLocation("uid","pwd","Servername","tablename");
    reportDoc.SetParameterValues("Parameter-Name","values");
    CrystalReportViewer.ReportSoure=reportDoc;
    Does that help?
    Thanks.

  • Does changing report connection at runtime require the same user/pwd used at design time?

    I've recently integrated Crystal 13 into a web service to provide HTML reports served up within our web application.  Sometimes reports would work and other times they would fail when attempting to connect to the database.  The ConnectionInfo associated with the tables referenced in the reports bore the account info used at design time (in the Crystal IDE), what ever connection was set as the Datasource Location, this would include the server name, database name, and other attributes of the connection.
    I found that any changes I make to table, sub-report connection info have no affect unless the UserID and Password match the UserID and Password saved with the report during design time.  While generally searching online, I came across several references to this being and issue or suggestion when database connection problems dynamically running reports.
    If this is by design?
    How would I support customers who want to use my reports, but also require that they manage the db access accounts?
    Thanks,
    Jeff

    Hi Brian, thanks for the response. 
    It does make sense that subreports would not necessarily be constrained to the same connection as the container report, and the designer would not persist a password for any stored connection.
    I'm on Windows 7 and up, Crystal 13 runtime, C# web service, sql 2008 r2 and up (native client).
    After loading the report source, I call ReportDocument.SetDatabaseLogon to set userId, password, serverName, and databaseName pulled from web.config.  I then pass the connection info and the ReportDocument to a recursive call that applies the connection info to each table in the report and each table in any subreport.
    Based on your description, it sounds like I may be missing, and require, the SetDatabaseLogon call on each subreport (ReportDocument).
    This seems to ring true and I think coincides with your description.  Would you agree?
    Thanks,
    Jeff

Maybe you are looking for

  • LSMW upload for Vendor and Customer Open items

    Hi Experts, 1. I wanted to use to use LSMW to upload through FB60 for Vendor Invoices through recording, but the problem is Amount in Document Currency is 'USD' and Amount in Local Currency is 'INR'. While recording it is not allowing to input values

  • Exchange rate types

    Hi gurus, we are on an int. project impl. between spain and india. my problem is two company uses "M" as exchange rate types, and enter exchange currencies according to M. for example exchange currency eur usd in spain  and exchange currency eur usd

  • Linked Text Box

    I'm using iBooks Author Version 2 I am unable to find how to link text boxes.  There is reference to selecting "Format --> Text Box -->  Add linked text box" but that option is always ghosted for me no mater what I try!  I'm making my own layout on a

  • Any limitation number of columns  on  SQL Workshop  Utility  Upload Data ?

    Hi there I tried to load csv fiie into a table with 350 columns and received the following error. ++ORA-20001: Load csv data error: ORA-01461: can bind a LONG value only for insert into a LONG column++ ++Error inserting data.++ ++Return to applicatio

  • Sharing docs with PC people

    Hi, on my network at my school I have silly little PC people who complain that when I open a file on the network (like a document file) that my Mac for some reason automatically makes it READ ONLY and they are not able to change anything afterwards.