Issue with changing database location at runtime

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

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

Similar Messages

  • Changing Changing Database Location During Runtime

    I'm using Netbeans 6.0.1. My database location ALWAYS change in place. That's why I'm planning that there would be a "Database Settings..." inside my program. But I don't know how to change the current: user, password, url settings of my program DURING RUNTIME. Here's my persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
      <persistence-unit name="LibraryPU" transaction-type="RESOURCE_LOCAL">
        <provider>oracle.toplink.essentials.PersistenceProvider</provider>
        <class>desktopapplication2.Books</class>
        <properties>
          <property name="toplink.jdbc.user" value="root"/>
          <property name="toplink.jdbc.password" value="password"/>
          <property name="toplink.jdbc.url" value="jdbc:mysql://localhost:3306/Library"/>
          <property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
        </properties>
      </persistence-unit>
    </persistence>

    To solve the "why the hell would I want that stuff inside a jar file" issue, I googled a bit and found this
    style of approach in a Oracle forum. Essentially think of the persistence.xml file as an template
    that the program uses.
    I use a properties file to set all local DB configuration aspects. Load the properties at application
    startup and set then extract the required fields into a Map to create the persistent unit.
    All the "examples" I seen always use a static xml which is never what you need in the real
    world.
    Map properties = new HashMap();
    properties.put(TopLinkProperties.JDBC_URL, dbProps.getString("abc.jdbcurl") );
    properties.put(TopLinkProperties.JDBC_DRIVER, dbProps.getString("abc.jdbcdriver"));
    properties.put(TopLinkProperties.JDBC_USER, dbProps.getString("abc.user"));
    properties.put(TopLinkProperties.JDBC_PASSWORD, dbProps.getString("abc.password"));
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("abcPU", properties);
    entityManager = emf.createEntityManager();
    HTH Altimes.

  • Not working. Change database location trough VB 6

    Hi,
    I just finished two reports in Crystal 10 using an Access Database (database  location and query are hardcoded in the reports.
    I made a small vb 6 application to launch the reports. Now I need to change database location for the reports trough VB 6.  I have the following code, but it is not working. The reports do not show any data and I do not get any error. I think the problem is with the hardcoded query. The report is designed on this query and the field reference on the reports are like Command.Field1
    I just want tho change database location in VB, but I want the report take the query that is in it.
    I have the following code. How can I make them work.? Is there a better way to do it?
    Dim Report As New CR2 'set up the report
    Dim conn3 As New ADODB.Connection  'ADO connection
    Dim rs As New ADODB.Recordset      'rs connection
    Function F_ViewReport()
    'On Error GoTo End_FormLoad
        Dim sSQL2 As String
        gsRootJob = "4850"
        Dim sSQL2 As String
        gsRootJob = "4850"
    "SELECT Material.Job, Material.Indicator, PO_Detail.Order, Source.Act_Qty,  Vendor.Name, PO_Header.PO, PO_Detail.Due_Date FROM (((Material LEFT JOIN Source ON Material.Material_Req = Source.Material_Req) LEFT JOIN PO_Detail ON Source.PO_Detail = PO_Detail.PO_Detail) LEFT JOIN PO_Header ON PO_Detail.PO = PO_Header.PO) LEFT JOIN Vendor ON PO_Header.Vendor = Vendor.Vendor WHERE (((Material.Job) Like '" & gsRootJob & "*')) ORDER BY Material.Job, PO_Header.PO, PO_Detail.Line;"
        Report.DiscardSavedData
        Set conn3 = New ADODB.Connection
        conn3.Open "provider=Microsoft.jet.OLEDB.4.0; Data Source=" & App.Path & "\Data tables.mdb"
        Set rs = New ADODB.Recordset
        rs.Open sSQL2, conn3, adOpenKeyset, adLockReadOnly
        Report.Database.SetDataSource rs, , 1
        CRViewer2.ReportSource = Report
        CRViewer2.DisplayTabs = False
        CRViewer2.ViewReport
        CRViewer2.Zoom 1
        Screen.MousePointer = vbHourglass
    Please help!
    cc

    Hi Cris,
    It seems that you are having issue with SDK's.
    Post your question in SDK forum.
    [SAP Crystal Reports, version for Visual Studio;
    You can download samples from here:
    [https://www.sdn.sap.com/irj/boc/samples]
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all SDK queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Regards,
    Shweta

  • SSRS 2012, SQL Server 2012. Problem with changing database

    Hi all!
    I have a problem with changing database for SSRS.
    I have a SSRS 2012 and SQL Server 2012. These programs is on WIndows Server 2012.
    I need to link SSRS to the new database instance. For this I run SSRS Configeration Manager, open tab Database, click Change Database. Then I choose option "Choose an existing report server database", click Next, write the server name, test
    connection (it's successed) and push Next again. Then I see this error message:
    Error
    The feature: "Using other editions of SQL Server for report data sources and/or the report server database" is not supported in this edition of Reporting Services.
    OK   
    I'm confused, cause I have compatible versions of programs and THIS error.
    Please, help me.
    Thanks.

    Hi Kirill,
    From the error message, we can know that the issue may be caused by incorrect editions of SQL Server for report data sources are used as the Report Server Database.
    When creating a report server database, please be aware that not all editions of SQL Server can be used to host the database. So we should make sure that we have used the correct database as the
    Report Server Database. For more details, please refer to the “Report Server Database Server Edition Requirements” section in the following document:
    http://technet.microsoft.com/en-us/library/cc645993.aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Oracle Discoverer 4i (portal db - oracle 8i) connectivity issue with 11g database

    Hi All
    We have oracle discoverer 4i with portal db (oracle 8i).
    We connect to the external databases using db links in the portal db and the reports will use the db link to retrieve the data from views in the external databases.
    External databases we were connecting is oracle 10g version and now we have upgraded these databases to 11g version.
    Now i have a created a new db link to this 11g database and i have created a new EUL in portal to connect to this 11g database.
    But when i try to create a report using the discoverer from this new EUL after login to the discoverer we get a "cannot connect to database" error.
    We have all the necesscary privilege to the user and the new database link works perfectly fine. (when we try to query directly using SQL plus from portal database using this db link the query works perfectly fine).
    Im not sure if this is a compatibility issue in connecting from oracle disc 4i to a 11g database.
    Can any one advise if this is the case and if there is any workaround for this?
    Regards,
    Raj

    Are you saying you are having issues with a database link between 8i and 11g (pl post exact versions to 4 digits) ? If so, it should be expected as database links between these two versions are not supported. Is there a reason you cannot upgrade the portal database to at least 10gR2 ?
    See MOS Doc 207303.1
    HTH
    Srini

  • Are there any issues with changing IP address of an ACS v5.3 system after initial setup?

    I am migrating from ACS v4.2.1 to v5.3.  I want the final v5.3 system to assume the IP address of the original 4.2 machine so I don't have to change any configs on the network devices.
    Are there any issues with changing the v5.3 system IP address AFTER the initial setup?

    I tried it without a problem. I changed the ip address of the WLC many times.
    You have to make sure though that:
    1-) You change the switchport accordingly to the appropriate vlan if the new ip belongs to a subnet of a different vlan.
    2-) Make sure that all AAA clients configured to use the new IP address of the ACS servers.
    Here is the procedure how to change the ip of the interface (as per cisco doc):
    http://goo.gl/0BYqVT
    I changed also by normal ip address command and it works. but of course the server must be standalone before doing that step (i.e. no secondary ACSs registered to it and it is not registered to other ACSs in a distributoin).
    HTH
    Amjad

  • Changing database location per Table at runtime is extremely slow in viewer

    We are using the Crystal Reports 2008sp2 Viewer in windows forms .NET
    application to display various reports based on a Pervasive database.  The
    C# code dynamically changes the database table locations at run time.  The
    location needs to be set for each table since the location may be different
    for each table in the report. 
    We have tried to methods to change the location.
    1) Set  the Table.Location property in the ReportDocument.Database.Tables
    collection.
    foreach (Table table in rd.Database.Tables)
    Table.Location = "New Path";
    2) Set the TableLogOnInfo properties.
          TableLogOnInfo logonInfo = new TableLogOnInfo();
          logonInfo = table.LogOnInfo;
          logonInfo.ConnectionInfo.ServerName = dataPath;
          logonInfo.ConnectionInfo.LogonProperties[0] = new NameValuePair2("Data
    File", dataPath);
          logonInfo.ConnectionInfo.LogonProperties[0] = new NameValuePair2("Data
    File Search Path", path);
          table.ApplyLogOnInfo(logonInfo);
    Both of these methods work, but have extremely slow performance.  Both
    methods take between 2 and 3 seconds to execute per table.  Since many of
    our reports have 20 - 30 table references ( sometimes more ), this can add
    an additional 1-2 minutes to the display of a report.
    It seems that the Crystal viewer object is doing some sort of verification
    every time the database location is changed.  We have noted that as the
    location is changed, the database is being accessed by the viewer.  Please
    advise as to how to stop this behavior.  Is there a way to set the location
    without the viewer verifying the change?
    This problem is turning reports that run in the 2008 Report Designer in 3 seconds into reports that take
    many minutes to run.  We will hear nothing but screaming from our 300 customers.
    Thanks for any help.
    Bill Smith

    Hello,
    I have a very similar issue but with Crystal XI and XI R2.
    I'm using Oracle 10g, and changing a couple of properties using the following sequence for each table to change the login information and the table's current view (each view is a portion of the overall table):
    IDatabaseTablePtr table = tables->GetItem(tableN);          
    table->SetLogOnInfo(TheApp.GetDataSource(), TheApp.GetDatabase(), userID, pwd);
    char tableLocation[201];
    char tempTable[201], newTable[201];
    strcpy(tableLocation, table->GetLocation());
    // make new table name, put into newTable
    table->PutLocation(newTable);
    if (!table->TestConnectivity())
      ShowCrystalRE_Error(job);
    Stepping through in my debugger, the SetLogOnInfo seems very quick, it's the PutLocation( ) that seems to be taking alot of time.
    Any help would be greatly appreciated.
    This is extremely fast on SQL Server, only noticeably slow on Oracle.

  • 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.

  • Mapping Warning as cause of changing database location

    hello group,
    i am new in working with owb 10.2, so please forgive me trivial questions.
    now to the problem:
    i set up a location for my database, created some mappings and deployed them successfully.
    yesterday i got new connection details for accessing the database, then i registered/unregistered the location in the control center manager (was that right?).
    then i created some new mappings which use tables of the database.
    when trying to deploy the new mappings (action:create) i get this error-message.
    None
    INFORMATIONAL
    ORA-04052: error occurred when looking up remote object [email protected]@SRC_domain
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02019: connection description for remote database not found
    MY_FIRST_MAP_mytable
    Create
    Warning
    ORA-06550: line 0, column 0:
    ORA-04052: error occurred when looking up remote object [email protected]@SRC_domain
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02019: connection description for remote database not found
    what does this mean?
    was the way to change the location settings for the database wrong? or can this be achieved?
    can you give me some hints?
    thanks in advance,
    sven

    When you deploy a Connector you are creating a Database Link in the schema you are deploying the connector.
    With the replace option, you drop the database link and create it again, so all the objects referring the database link will be in "invalid" status, and you'll have to deploy them again (normally all the mappings, procedures and functions using the connector-databaselink).
    If you change the location information, sometimes the name of the databaselink created when deploying the connector change, OWB creates the database link using not only the name of the connector, includes some information of the location properties, so the replace option partially fails, because the drop database link sentence fails, the create database link sentence works properly, though, and in the database you have two db-links: the old one and the new one, so if you aren't aware to deploy again the objects using the old db-link to refer to the new DB-Link, they will stay referring to the old one. For example:
    The old information of LOCATION_SOURCE:
    HOST: host1
    PORT: port1
    SID: sid1
    When you deploy the connector MY_CONNECTOR in location LOCATION_TARGET referring the schema SCHEMA_TARGET, you create a DB-Link in SCHEMA_TARGET named SID1@MY_CONNECTOR
    If you change the information of LOCATION_SOURCE:
    HOST: host2
    PORT: port2
    SID: sid2
    And then deploy MY_CONNECTOR again, you create a new DB-Link in SCHEMA_TARGET, named SID2@MY_CONNECTOR, and with the REPLACE option you don't drop the SID1@MY_CONNECTOR DB-Link so all the objects referring to this old DB-Link will be valid, but referring to an incorrect DB-Link.
    Hope I've been able to make myself understand, I've read what I have written and seems a bit confusing. Regards.
    ANA GH

  • Issue with changing ZeroViewForNonAdj and ZeroViewForAdj

    Hi,
    We have an issue with ZeroViewForNonAdj and ZeroViewForAdj settings.
    Our goal is to load every third month from Planning to the forecast scenario. We started with April and had the ZeroViewForNonAdj and ZeroViewForAdj settings as YTD. When we loaded July we realized that the settings were wrong so we changed them to Periodic. This however didn't change the way the zeros are presented in HFM.
    Do you have any solution to this on how we can get the periodic zeros to be visible?
    - Nicklas

    Hi Nicklas,
    If you change the scenario settings you really need to clear out the scenario and re-load all the data in the scenario to allow HFM to re-derive the periodic values.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                           

  • Issue with BIS and location via cell network

    I am having an unusual problem on my Blackberry 9850. This started happening randomly over the past few days, currently happening now.
    Via the 3G network, from my home area (Eustis, Florida USA - ZIP code 32726) certain BIS functions do not work correctly.
    I can not send BBM chat messages, I get the red "X " for the message, but I can receive them.
    Web browsing to Google.com brings up the Google Mobile site for Argentina. When I try to adjust the language preferences back to English - United States, it just refreshes back to Spanish - Argentina.
    However, if I turn on WiFi and allow the BIS to switch over to that, everything works fine.
    I have already tried *228, option 2, several times. It only fixed it one time last week and then awhile later is was not working correctly again.
    Any idea what is going on?

    Got through to Verizon support this morning and they brought in a BlackBerry Tech on the line.
    Turns out there was and still is an issue with the Verizon BIS server and they are working on a resolution, but no ETA.
    Ticket# (removed)
    Private info removed as required by the Terms of Service.
    Message was edited by: Admin Moderator

  • Issues with changing connection at run-time

    Post Author: dmazourick
    CA Forum: Data Connectivity and SQL
    Weu2019ve tried a lot of different ways to resolve this issue, but are getting every time the different result.
    Probably someone deal with that issue before and know how to correctly resolve it.
    Weu2019re using Crystal Reports Runtime Components X+ (X, XI, XI R2) u2013 all of them has this issue.
    We need client application to connect to multiple data sources u2013 user chooses report, chooses data source and we show the report for specified data source.
    The data sources are tables or stored procedures stored in different databases on different servers.
    For sure, every data source for a single report has the same structure, but that doesnu2019t matter.
    The issue is: when the name of the database on one server is the same as the name of database on second server, the connection caching occurs.
    How we can check that:
    1.       Weu2019re running report for Server1:<DBN> - report shows data from Server1.
    2.       Weu2019re opening second report for Server2:<DBN> - report shows data from Server1.
    3.       Weu2019re closing application and run 1-2 in opposite order, now both reports show data from Server2.
    Weu2019ve tried different approaches u2013 below is a code sample that opens the report for specific connection.
    Juts to be sure that no one will ask u2013 u201CAre you sure youu2019re passing the correct connection info etc.u201D. Yes! We are sure because weu2019re trying to fix this issue for a long time and tried a lot of different approaches and still cannot find the right solution.
    The code looks like below. This is VB6 code, but also the same situation was tried on VC++ 6.0
    Weu2019re not looking into CR.NET solution for now.
    =================================================
    Sub DisplayReport(Server as String, DB as String, UID as String, PWD as String, viewer as Object)
        Dim app As New CRAXDRT.Application
        Dim report As CRAXDRT.report
        Dim database As CRAXDRT.database
        Dim table As CRAXDRT.DatabaseTable
        Dim par As CRAXDRT.ParameterFieldDefinition
        Set report = app.OpenReport("D:\TestReport_X.rpt")
        report.database.LogOnServer "pdssql.dll", Server, DB, UID, PWD
        Set table = report.database.Tables(1)
        table.SetLogOnInfo Server, DB, UID, PWD
        table.Location = table.Name
        report.database.Verify
        viewer.ReportSource = report
        viewer.ViewReport
    end sub
    =================================================
    The result of above code is the following:
    1.       If we will pass the same viewer and will use different Server u2013 the report will be displayed correctly
    2.       If we will pass different viewers and will use different Server u2013 the reports will contain same data
    The result of above code also depends from the version of Crystal Reports the report was designed in:
    1.       For Report designed in 8.5 u2013 passing of the same viewer with same connection info second time will refresh report
    2.       For Report designed in X, XI, XI R2 u2013 no refresh
    Also, a slight modification of the above code helps for reports designed in XI to work properly, but not for reports designed in X and 8.5:
    1.       Before calling LogonServer, make the following: DB = DB & u201C;u201D & Int(rnd()*32767)
    That makes report designed in XI to display properly in different viewers, but doesnu2019t have any impact to X and no any impact to 8.5
    Weu2019re really looking for any help in this question

    Post Author: fburch
    CA Forum: Data Connectivity and SQL
    I am having similar problems and some successes.
    I have 70+ reports and now suddenly I want to point them at two different servers, but at databases with the same name like you talked about.
    I first just tried the following:
    #1. Load report:
    Dim myReport As New ReportDocument
    myReport.Load(filename)
    #2. Pass in parameter values
    ''Get the collection of parameters from the report
    Dim crParameterFieldDefinitions As ParameterFieldDefinitions = r.DataDefinition.ParameterFields
    ''Access the specified parameter from the collection
    Dim crParameter1 As ParameterFieldDefinition = crParameterFieldDefinitions.Item(ParamName)
    ''Get the current values from the parameter field. At this point
    ''there are zero values set.
    'crParameter1Values = crParameter1.CurrentValues
    ''Set the current values for the parameter field
    Dim crDiscrete1Value As New ParameterDiscreteValue
    If crParameter1.ValueType = FieldValueType.DateField Or crParameter1.ValueType = FieldValueType.DateTimeField Then
    If ParamValue Is System.DBNull.Value Then
    crDiscrete1Value.Value = CDate("1/1/1900")
    ElseIf ParamValue Is Nothing Then
    crDiscrete1Value.Value = CDate("1/1/1900")
    Else
    crDiscrete1Value.Value = ParamValue
    End If
    ElseIf crParameter1.ValueType = FieldValueType.StringField Then
    If ParamValue Is Nothing Then
    crDiscrete1Value.Value = ""
    Else
    crDiscrete1Value.Value = ParamValue
    End If
    ElseIf crParameter1.ValueType = FieldValueType.BooleanField Then
    If ParamValue Is Nothing Then
    crDiscrete1Value.Value = False
    ElseIf ParamValue.ToString.ToUpper = "TRUE" Then
    crDiscrete1Value.Value = True
    Else
    crDiscrete1Value.Value = False
    End If
    ElseIf crParameter1.ValueType = FieldValueType.NumberField Then
    If ParamValue Is Nothing Then
    crDiscrete1Value.Value = 0
    Else
    crDiscrete1Value.Value = ParamValue
    End If
    Else
    If ParamValue Is System.DBNull.Value Then
    crDiscrete1Value.Value = Nothing
    ElseIf ParamValue Is Nothing Then
    crDiscrete1Value.Value = Nothing
    Else
    crDiscrete1Value.Value = ParamValue
    End If
    End If
    ''Add the first current value for the parameter field
    Dim crParameter1Values As New ParameterValues
    crParameter1Values.Add(crDiscrete1Value)
    ''All current parameter values must be applied for the parameter field.
    crParameter1.ApplyCurrentValues(crParameter1Values)
    #3 Set "Table Log in info" (most of my reports using stored procedures, but I guess I still needed this step).
    Dim CrTables As Tables = r.Database.Tables
    Dim CrTable As Table
    Dim crtableLogoninfos As New TableLogOnInfos()
    Dim crtableLogoninfo As New TableLogOnInfo()
    With crConnectionInfo
    .ServerName = connectionParser.GetServerName(connectionString)
    .DatabaseName = connectionParser.GetDatabaseName(connectionString)
    If connectionParser.DoesUseIntegratedSecurity(connectionString) = True Then
    .IntegratedSecurity = True
    Else
    .UserID = connectionParser.GetServerUserName(connectionString)
    .Password = connectionParser.GetServerPassword(connectionString)
    .IntegratedSecurity = False
    End If
    End With
    For Each CrTable In CrTables
    crtableLogoninfo = CrTable.LogOnInfo
    crtableLogoninfo.ConnectionInfo = crConnectionInfo
    CrTable.ApplyLogOnInfo(crtableLogoninfo)
    If InStr(CrTable.Location, ".dbo.") = 0 Then
    CrTable.Location = crConnectionInfo.DatabaseName + ".dbo." + CrTable.Location
    End If
    Next
    If r.Subreports.Count > 0 Then
    Dim crSections As Sections
    Dim crSection As Section
    Dim crReportObjects As ReportObjects
    Dim crReportObject As ReportObject
    Dim crSubreportObject As SubreportObject
    Dim crDatabase As Database
    Dim subRepDoc As New ReportDocument()
    'SUBREPORTS
    'Set the sections collection with report sections
    crSections = r.ReportDefinition.Sections
    'Loop through each section and find all the report objects
    'Loop through all the report objects to find all subreport objects, then set the
    'logoninfo to the subreport
    For Each crSection In crSections
    crReportObjects = crSection.ReportObjects
    For Each crReportObject In crReportObjects
    If crReportObject.Kind = ReportObjectKind.SubreportObject Then
    'If you find a subreport, typecast the reportobject to a subreport object
    crSubreportObject = CType(crReportObject, SubreportObject)
    'Open the subreport
    subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
    crDatabase = subRepDoc.Database
    CrTables = crDatabase.Tables
    'Loop through each table and set the connection info
    'Pass the connection info to the logoninfo object then apply the
    'logoninfo to the subreport
    For Each CrTable In CrTables
    crtableLogoninfo = CrTable.LogOnInfo
    crtableLogoninfo.ConnectionInfo = crConnectionInfo
    CrTable.ApplyLogOnInfo(crtableLogoninfo)
    If InStr(CrTable.Location, ".dbo.") = 0 Then
    CrTable.Location = crConnectionInfo.DatabaseName + ".dbo." + CrTable.Location
    End If
    Next
    End If
    Next
    Next
    #4 go get the data
    crv.ReportSource = myReport
    crv.Refresh()
    #5 Call export to disk function.
    This was not changing server - did not realize it was a caching problem as you suggested. That makes sense. So anyway, then of course I threw a verify database statement on there, before I get the data. Now looks like this:
    #1 Load Report
    #2. Pass in parameter values (dummy values that will generate schema of table without having to actually run long running procedures, i.e. select (cast 1 as int) as somefield1, cast(2.0 as numeric(10,0)) as somefield2
    #3 Set "Table Log in info"
    #3b Verify the database which seems to be a necessity:
    myReport.VerifyDatabase()
    #3c Re-populate the report with real parameter values, same as #2 but this time with the ones that will generate the real data
    #4 go get the data
    #5 Call export to disk function.
    This does work, some of the time. When the datasource underlying report are tables, it works. I made a dummy crystal report with lots of different types of params (stored procedure underlying database) - this also worked!
    Unfortunately, when I run this against the majority of my reports, I get this stupid "invalid mapping type value", for which I have not been able to resolve yet.
    I also tried putting a myreport.SetDatabaseLogon("","") -- what would this do, clear it out? (saw this referenced somewhere).
    Then I tried putting the real connection info in there as well ...
    myReport.SetDatabaseLogon(uid, pwd, serverName, DBname)
    I put this setdatabase thing before I called verifydatabase, which is where the process is bombing out and giving me invalid mapping type for the reports that do not run.
    At this point I am still working on solution. I have tried creating dummy report that used same parameter types as a report that was failing and voila - the dummy report worked. Anyway, let me know if you get your problem fixed and I will do the same. Looks like you are using a different method that I didn't notice "LogOnServer"

  • Allow users to change database connection at runtime

    Folks,
    CR 12.2.0.290
    BOE 12.1.0
    I develop CR on desktop and then save to the BOE repository.  Users need the ability to point the report to a different Oracle schema.  Tables and elements are the same, just the data is stored via streams so that each location has its own reporting schema.  So one (16 total) report needs to run against multiple schemas based on which origin the user is trying to report against; one at a time.  Other than having a set of reports for each site, how can I allow the users to select the schema to run against at runtime?
    Thanx
    Mike

    When you schedule a report with InfoView, there is a Database option where an ODBC connection, user and password can be specified.  Can this be used?  (I'm not familiar enough with Oracle to know for sure...  Also, this option doesn't show if the report uses Business Views.)
    HTH,
    Carl

  • Table "StoredProcedure" not found when changing Database location in VS 2005.

    <p>I&#39;m having a problem changing the datasource location when generating a report using the report viewer in VS2005.  If the table is a stored procedure, I get the message "Table (StoredProcedureName) not found", but if the report references tables rather than a stored procedure the location is changed and the report runs successfully.  The same problem was reported in earlier versions of Crystal Reports and was fixed in a service pack, but I couldn&#39;t find any documentation on the VS2005 version. </p><p>Does anybody know how to fix this problem?  I am using CrystalDecisions.CrystalReports.Engine.dll version 10.2.3600.0 and SQL Server 2000.</p>

    Peggy, I wonder if getting the latest SP for CR 10.2 will be better for now. SP 1 can be downloaded from here:
    https://smpdl.sap-ag.de/~sapidp/012002523100006007872008E/crvs05sp1.exe
    I\Let us know if that does not resolve the issue and we'll take a closer look before going all the way to CR XI.
    With regards,
    Ludek

  • Issue with changing Access Service in ACS 5.2

    Hi,
    I am working on lab setup where I installed ACS 5.2 I created new access service and used it in existing service selection rule (Rule-2) earlier but it didn't work. Later I created new service selection rule and applied new service access rule. However even after this change it keeps applying predefined default access access service. Please refer attached picture for better understanding.
    As shown, I want Aks-Rule to work and apply service 'Lab-Policy' however it keeps referring Rule-2 and applies 'Default Device Admin' access service even after I disable it. 
    I have to restart ACS service from CLI console to make it work. Is this a bug or am I missing anything. Please advise guys.
    Regards,
    Akshay

    Since the policy AKS is top in sequence under service selection rule so it should hit for sure. As you wrote that even after disabling the default device admin, then also request is hitting the same and restarting the ACS services resolved the issue. The symptoms of your issue are exactly same as stated in this defect.
    CSCuo93378    Certain browsers cause ACS database corruption
    Due to this issue we have seen cases where request hits the disable and default policies without any reason. Actually accessing ACS via chrome mess around with all the operators in conditions.
    The only workaround is to access all the rules and conditions in supported browser. Ensure all the operators are correct, save the changes and restart the ACS services.
    The issue seems to be fixed in ACS 5.5 patch 5
    Regards,
    Jatin

Maybe you are looking for

  • On Windows 7 HttpURLConnection.openConnection() throws IOException

    Hi Team, In our application we have a to create httpURLCOnnection (url.openConnection())which works fine on Windows XP but throws IOException on Windows7. Does anybody know which settings need to be enabled on windows 7 to resolve this issue? Any res

  • Weblogic classpath setting

    How to set the classpath for the helper class files in weblogic. There is option where I can set the classpath of the servlets , but to set the classpath of other class files(helper) , where should I set the classpath in weblogic.properties files Als

  • View not working in PROD

    Hi Experts,   I am new to SAP BI.   Here I have some critical issue when working with views(Database View).    It is working fine in DEV and Testing clients. But coming to PROD it is getting some duplicated records.   Our Testing client data is copy

  • Function to get reversal of any string ..!

    hi , Is there any function in oracle to get reversal of any string. 'london' --> 'nodnol' select func_name('london') from dual; --> is there any built-in function to do this operation? result- 'nodnol' rgds, pc

  • Quick question on role

    Hi, I want to add a user to a role . This user needs access to BI-Q. Is it ok to add the role in QA or should I add in BI-Dev and transport it to QA? Please advise.. Will there be any problem if I add the user in BI-Q? what is the usual practice? Edi