Support a singly report on SQL Stored Procedure and Oracle Stored Procedure

Hi,
I have a requirement in which I need to create a report that will run both on oracle and sql server.
Report is designed as follows.
Main report contain 2 sub-reports.Sub-reports are  based on stored procedure that takes three input parameters(beginDate,endDate and hostname which is a comma-separated string).
Main report also have three parameters (beginDate,endDate and hostnameList) that I am linking with both sub-reports.
Since the crystal picks the same name of the parameter as we define in procedure it showing '@' symbol in all the parameters when I change the datasoure from oracle to sql server and that's why sub reports defined in main report loose all the linking and same happens when I switch from sql to oracle since in case of oracle it does not have '@' symbol in variable name.
How can I have one report that work with both DBs without loosing the links.
Any help will be appreciated.
Thanks,
Amrita

There is no way of doing this in CR. At least not that I've ever heard of anyway.
If you REALLY need to make this work and it REALLY has to be just 1 report... Here is what I'd do...
In the SQL Server database, add a new table that contains the same columns that are being returned by the sp's. If you can't add new tables to the database, use a different database or server...
Create a Linked Server linking the Oracle db to SQL Server. (If you take the 3rd server rout, do the same with the SQL Server)
Write a new sp that will accept the {?WhichServer} parameter and populate the new table with the result set.
Then just query that table for your report.
I know this probably isn't the rout you were wanting to take but it should work...
Jason

Similar Messages

  • Converting MS Sql server stored proc to Oracle stored procedure

    I need to convert this MS SQL Server 200 stored procedure to Oracle stored procedure. Any help great appreciated.
    Thank you,
    set nocount on
    declare @sp varchar(100)
    set @sp = '<< stored procedure name goes here >>'
    declare @oid int
    select @oid = o.id from sysobjects o where o.name = @sp
    declare @last int
    -- function signature
    select @last = max(c.colid)
    from dbo.syscolumns c
    where c.id = @oid
    select case c.colid
    when 1 then '[ SqlCommandMethod(CommandType.StoredProcedure) ]'
    + char(13) +
    'public static SqlCommand ' + @sp + '(' + char(13) +
    ' [ NonCommandParameter ] SqlConnection
    ' connection '
    + char(13) +
    else ''
    end
    + ' ' +
    case t.name
    when 'char' then
    '[ SqlParameter(' + convert(nvarchar(10), c.length) + ')  '
    when 'varchar' then
    '[ SqlParameter(' + convert(nvarchar(10), c.length) + ') ] '
    when 'nchar' then
    '[ SqlParameter(' + convert(nvarchar(10), c.length / 2) + ') ] '
    when 'nvarchar' then
    '[ SqlParameter(' + convert(nvarchar(10), c.length / 2) + ') ] '
    else ''
    end
    +
    case t.name
    when 'char' then 'string'
    when 'nchar' then 'string'
    when 'varchar' then 'string'
    when 'nvarchar' then 'string'
    when 'bit' then 'bool'
    when 'datetime' then 'DateTime'
    when 'float' then 'double'
    when 'real' then 'float'
    when 'int' then 'int'
    else 'object /* ' + t.name + ' */'
    end
    + ' ' + lower(substring(c.name, 2, 1)) + substring(c.name, 3, 100)
    +
    case c.colid
    when @last then ')' + char(13) + '{'
    else ','
    end
    from dbo.syscolumns c
    left outer join dbo.systypes t on c.xusertype = t.xusertype
    where c.id = @oid
    order by c.colid
    -- call to generator
    select case c.colid
    when 1 then
    ' return SqlCommandGenerator.GenerateCommand(connection,' +
    char(13)
    else ''
    end
    + ' ' + lower(substring(c.name, 2, 1)) + substring(c.name,
    3, 100)
    +
    case c.colid
    when @last then ');' + char(13) + '}'
    else ','
    end
    from dbo.syscolumns c
    where c.id = @oid
    order by c.colid

    It would have helped if you had posted your code.
    To create tables in procedures, you can use EXECUTE IMMEDIATE. For example, if within a procedure, you want to:
    CREATE TABLE table_name
    (column1 NUMBER,
    column2 VARCHAR2 (30),
    column3 DATE);
    Then, from within a procedure you can:
    CREATE OR REPLACE PROCEDURE procedure_name
    AS
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE table_name
    (column1 NUMBER,
    column2 VARCHAR2 (30),
    column3 DATE)';
    END procedure_name;
    EXEC procedure_name
    For the procedure to count the number of business days between two input dates, see the following link:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:91212348059

  • How do SQL server 2000 and Oracle linked?

    Hi,
    How do SQL server 2000 and Oracle linked?
    Thanks in Advance
    Baloch.

    use the like to setup ODBC and datasource
    http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
    and then create link server in sql server after you test conenction with oracle

  • Diff, bet general SD pricing procedures and Internet Pricing procedure

    Hi,
      Will any one give clear picture about the diff, between SAP SD pricing procedure and Internet Pricing Procedure? and what are the areas it differs?. If you mail me any URL / Doc regarding Internet Pricing Procedure  Configuration that will be of great help.
       [email protected]

    I hope by internet pricing procedure you mean pricing procedure used in Internet Sales / CRM Online.
    Basically, there are no differences. Structure is same. The way pricing procedure is defined & used is same. The only different I would say is, the way you write code for formula & requirements. Usability-wise, they both are same.
    Hope it helps.
    Regards,
    Kaushal

  • Difference between Sampling Procedure and Sample-drawing procedure

    Friends,
    I am new to QM and started learning QM Module. My doubt is what is the difference between Sampling Procedure and Sample-drawing procedure?
    The reason for my doubt is, we can determine the sample quantity with Sampling procedure itself. then what is the need of sample-drawing procedure?
    Also describe primary, pooled and reserved samples.
    Regards,
    IMIMINT

    Hi,
    Sampling Procedure 
    Definition
    A procedure that contains the rules for determining the sample size for an inspection. The sampling procedure also specifies the type of valuation to use for results recording (attributive, variable, or manual).
    Use
    You assign a sampling procedure to each characteristic in an inspection plan to calculate the sample size.
    Sample-Drawing Procedure 
    Definition
    A master data object in which you plan the drawing of physical samples. In the sample-drawing procedure, you specify:
    Which categories of physical samples must be drawn
    How many physical samples must drawn
    The size of each physical sample
    Whether the drawing of physical samples must be confirmed
    Use
    The system uses the information in the sample-drawing procedure together with the information in the inspection plan to calculate the physical sample sizes, and to create physical-sample records when an inspection lot is created.
    Primary Sample : It is the sample drawn from the lot directly.
    Pooled Sample : It is the sample whcih is combination of 2 or more primary samples.i.e. primary sample sfrom say 3 differetn drums is mixed and tested.
    Reserved Sample :sample which is preserved for the testing in future.
    or in other words
    Primary samples (1st stage)
    Physical samples drawn directly from a material or batch that will be inspected or used to create pooled samples.
    Pooled samples (2nd stage)
    Physical samples to be created by mixing the contents of two or more primary samples from the same material or batch.
    Reserve samples
    Primary physical samples drawn from a material or batch reserved for future inspection.
    Vishal
    Edited by: VISHAL JONNALWAR on Feb 4, 2010 6:43 AM

  • Dynamic SQL and Oracle stored procedures

    Does anybody has any experience with invoking an Oracle stored procedures
    with output parameters, using dynamic SQL from Forte?
    Thanks,
    Dimitar

    I would be interested. We are currently using a homegrown DataMapper architecture with the Microsoft OracleClient. I would like to move to ODP.Net once a production version supporting ADO.Net 2.0 is available. After that, I would then like to look at using an off the shelf persistence framework such as EntitySpaces, NHibernate or IdeaBlade's DevForce.

  • Crystal reports for eclipse ver 2 with oracle stored procedures

    Does Crystal Reports for Eclipse version 2 support Oracle Stored Procedures.
    I have been struggling to get this to work for the last 1 week.
    Any help would be appreciated.
    Regards
    Avinash Tauro

    Thank you for your reply.
    Does this mean that oracle stored procedures cannot be used at all in the J2EE environment. As even if I create the report using Crystal Reports 2008, I am unable to get it to work.
    However It works great on .NET.
    Since I can't use stored procedures, I've just copied the query to a bean and am executing it using jdbc. Also I am using the POJO method to link to the report.
    This is working fine, except for the maintainance headache, as I have about 25 stored procedures for reporting, with each having a pretty complex query.
    I guess I will convert all the stored procedures to front end based query mangement and use the POJO method to connect Crystal Reports.
    Any suggestions / recommendations would be helpful.
    Regards
    Avinash Tauro

  • JDBC Thin-Driver and Oracle Stored Procedure

    I've got a Oracle stored procedure which returns a Oracle record.
    How can I retrieve the record in java using the JDBC Thin-Driver ?
    Record:
    TYPE messagerec IS RECORD
    (log_level VARCHAR(2), timestamp VARCHAR2(19), text VARCHAR2(200));

    Using PL/SQL BOOLEAN, RECORD Types, and TABLE Types:
    Oracle SQLJ and JDBC do not support calling arguments or return values of the
    PL/SQL BOOLEAN type or RECORD types. Also, when using the Thin driver, they
    do not support calling arguments or return values of PL/SQL TABLE types (known
    as indexed-by tables). TABLE types are supported for the OCI driver.
    Check the following guide,
    http://otn.oracle.com/tech/java/sqlj_jdbc/pdf/a96655.pdf

  • Scripted JDBC and Oracle Stored Procedure with in/out Array

    The com.waveset.util.pooledconnection used by Scripted JDBC Adapter extends java.sql.connection.
    I need to pass an Varchar2 Array to the Stored Procedure. I tried using the oracle.sql.ARRAY and oracle.sql.ArrayDescriptor to pass the values, but get a casting exception,as the polledconnection implements only the java.sql.connection and not oracle.sql.connection.
    What are my options of using java.sql.Array with a PL/SQL procedure that takes a varchar2 array as in out parameter?
    Thanks
    Venki

    i ran my procedure which is very similar syndra posted
    create or replace procedure foo(p_dt in date, cv out sys_refcursor) as
    begin
    open cv for
    select e.*
    from table_xyz e
    where start_dt = p_dt;
    end;
    /Here is how is executed
    DECLARE
      P_DT DATE;
      CV SYS_REFCURSOR;
    BEGIN
      P_DT := '10-oct-2005';
      -- CV := NULL;  Modify the code to initialize this parameter
      scott.foo ( P_DT, CV );
      COMMIT;
    END;           
    -- i get PL/SQL procedure successfully complted , But i dont see the result set Or output
    - How do i see the output when i m using refcursor ?? i tried using print , but nothing didnt work
    - Any idea ??
    Thank you!!
    Edited by: user642297 on Jun 24, 2010 1:35 PM

  • A single report can't combine portrait and landscape oriented pages

    Post Author: joelo2
    CA Forum: Crystal Reports
    Hi,
    Can a single report in Crystal report XI (version 11.5.8.826) combine portriat and landscape oriented pages like Crystal report 2008?   For example, I have one main report with several subreports in the main report.  I want one subreport be in portrait page orientation and the other subreports in landscape.  Can I do something like that in Crystal report XI version?    I even tried writing a small .net program to do this, but it doesn't seem to allow me to do that programmatically either.  Please help

    Post Author: ngra
    CA Forum: Crystal Reports
    I'd like to elevate this issue with Crystal Reports XI. There is a critical application which we developed in-house which needs both portrait and landscape orientation in each of the 30,000 plus documents we are sending out every month.If developers in Business Objects are picking this thread up - we need a patch for this limitation - quick. Right now, we are toying with the possibility of exporting the documents into a text format with markers indicating if a page is portrait or landscape. This is to be loaded into a Xerox machine (which costs hundreds of thousands of dollars), where it is mapped automatically to portrait or landscape. Note to Business Objects: This will provide us and countless others with much value. Think 80/20 rule - most bang for your development bucks and value for your customers!

  • SAP Crystal Report using SQL Server Authentication and Windows Authenticati

    I'm a SAP Crystal Report, version for Visual Studio 2010 Beginner
    my ingredients are
    1.windows 7 ultimate service pack1
    2.sql server 2008 standard edition
    3.visual studio 2010 pro
    4.SAP Crystal Report, version for visual studio.net
    I was created a report named customersByCity.rpt using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> I'm supply Server, User ID, Password and Database. I assume me using SQL Server Authentication for my report
    Then, my ASP.NET files as following
    //ASP.NET
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="viewCustomersByCity.aspx.cs" Inherits="viewCustomersByCity" %>
    <%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
        Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div><asp:Label ID="lblMsg" runat="server" BackColor="Yellow" ForeColor="Black"></asp:Label>
     <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true"></CR:CrystalReportViewer>
        </div>
        </form>
    </body>
    </html>
    //code-behind
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Collections;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    public partial class viewCustomersByCity : System.Web.UI.Page
        private const string PARAMETER_FIELD_NAME = "city";   
        private ReportDocument customersByCityReport;
        private void ConfigureCrystalReports()
            ConnectionInfo connectionInfo = new ConnectionInfo();
            connectionInfo.ServerName = @"WKM1925-PCWKM1925";
            connectionInfo.DatabaseName = "Northwind";
            connectionInfo.UserID = "sa";
            connectionInfo.Password = "sysadmin25";
            SetDBLogonForReport(connectionInfo);
        private void SetDBLogonForReport(ConnectionInfo connectionInfo)
            TableLogOnInfos tableLogOnInfos = CrystalReportViewer1.LogOnInfo;
            foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
                tableLogOnInfo.ConnectionInfo = connectionInfo;
        private void SetCurrentValuesForParameterField(ReportDocument reportDocument, ArrayList arrayList)
            ParameterValues currentParameterValues = new ParameterValues();
            foreach (object submittedValue in arrayList)
                ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
                parameterDiscreteValue.Value = submittedValue.ToString();
                currentParameterValues.Add(parameterDiscreteValue);
            ParameterFieldDefinitions parameterFieldDefinitions = reportDocument.DataDefinition.ParameterFields;
            ParameterFieldDefinition parameterFieldDefinition = parameterFieldDefinitions[PARAMETER_FIELD_NAME];
            parameterFieldDefinition.ApplyCurrentValues(currentParameterValues);
        protected void Page_Load(object sender, EventArgs e)
            customersByCityReport = new ReportDocument();
            string reportPath = Server.MapPath("customersByCity.rpt");
            customersByCityReport.Load(reportPath);
            ConfigureCrystalReports();
            ArrayList arrayList = new ArrayList();
            arrayList.Add("paris");
            arrayList.Add("Madrid");
            arrayList.Add("Marseille");
            arrayList.Add("Buenos Aires");
            arrayList.Add("Sao Paulo");
            ParameterFields parameterFields = CrystalReportViewer1.ParameterFieldInfo;
            SetCurrentValuesForParameterField(customersByCityReport, arrayList);
            CrystalReportViewer1.ReportSource = customersByCityReport;
    1st scenario
    When in a runtime, it's keep appear a dialog box. This dialog box ask me to suppy Server, User ID, Password and Database. Once all information is supplied, my report display the data as expected
    2nd scenario
    I change my report using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> checked on Integrated Security. I just choose Server, and Database. I assume me using Windows Authentication
    When in a runtime, there's no dialog box as above. My report display the data as expected. really cool
    Look's like, when report using SQL Server Authentication there's some problem. but, when report using Windows Authentication, it's fine.
    I'm looking for comment. Please help me

    Hello,
    MS SQL Server 2008 requires you to install the MS Client Tools for 2008.
    Once install then update all of your reports to use the SQL Native 10 as the OLE DB driver.
    The try again, if it still fails search, lots of sample log on code in this forum.
    Don

  • Connectivity between sql server 2000 and oracle 9i

    Hi friends....
    i am developing application in which i require some data from sql server2000 tables...
    tell me how i can establish connection in between these 2 database and how can i transfer specific rows to oracle....tell me how it is possible to writting stored procedures in sql....or procedures in oracle.....i used DTS (data transfer scheme) but it transfer whole database ot table...but i want to transfer only specific rows in table...
    help me out from it?
    thanx in advance...

    There are a number of ways...
    You can certainly use DTS to extract a subset of rows and move them to Oracle. You'll need to define the WHERE clause when defining your DTS steps.
    You can use Oracle Heterogeneous Connectivity to create a database link to SQL Server from Oracle and pull the data over via straight SQL, i.e.
    INSERT INTO local_table
      SELECT * FROM remote_table@sql_server_dblink WHERE extract_conditionYou can do a similar thing in SQL Server where you use linked servers to connect to Oracle from SQL Server and push the data
    This list can go on, but these should get you started.
    Justin

  • JDBC to access SQL server 2000 and Oracle.

    hi,
    I have the following requirement. I have an oracle database which contain sql data including BLOB and CLOB. Firstly, I should migrate the data to a SQL server 2000 database. That is, i should be able to have two databases, one on oracle and the other on sql server 2000. the two databases should contain the same data, which includes BLOB data. I guess, sql server 2000 does not have a BLOB data type. What is the equivalent data type i can use to save the Oracle's BLOB data in SQL server?? Should it be image type?
    After i migrate the data to the sql server 2000 database, i should be able to connect to the two databases, oracle and sql server 2000, using the same JDBC code to retrieve, insert, update and delete the data. What are the drivers that i should use. I guess, the MS JDBC driver does not support BLOB and CLOB. Is there a driver that can support BLOB for sql server 2000 and is also free???!
    Kindly help... Thanks.
    Arthi.

    Hi,
    I am new to jdbc... so, pls forgive my ignorance...
    I shall try to map a BLOB data column in oracle to an IMAGE data column in sql server 2000. I am using oracle jdbc driver and microsoft's jdbc driver for connecting to the databases.
    My question is, can i use setBlob() method in the preparedstatement in jdbc code for setting data to the sql server 2000 image column?
    rs.getBlob() and preparedstatement.setBlob()code works fine for oralce's BLOB column using oracle's jdbc driver.... Will the same jdbc code work for sql server 2000's image column using microsoft's jdbc driver??
    Kindly help.
    Arthi.

  • How to configure SharePoint 2010 / 2013 Search for SQL Database Contents and Oracle Database Contents?

    Hi All,
    We are planning to maintain the contents in SQL / Oracle. Could you please suggest anyone which is best for SharePoint 2010 / 2013 Search. How to configure the search for external content source?
    Thanks & Regards,
    Prakash

    This link explains supported and non supported scenarios to use Oracle for BCS
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/453a3a05-bc50-45d0-8be8-cbb4e7fe7027/oracle-db-as-external-content-type-in-sharepoint-2013
    And here is more on it
    http://msdn.microsoft.com/en-us/library/ff464424%28office.14%29.aspx 
    And here how you can connect Oracle to SharePoint for BCS functionality
    http://lightningtools.com/bcs/business-connectivity-services-in-sharepoint-2013-and-oracle-using-meta-man/
    Overall it seems SQL doenn't require any special arrangement to connect BCS to SharePoint.
    Regards,
    Pratik Vyas | SharePoint Consultant |
    http://sharepointpratik.blogspot.com
    Posting is provided AS IS with no warranties, and confers no rights
    Please remember to click Mark As Answer if a post solves your problem or
    Vote As Helpful if it was useful.

  • Memory leak issue with link server between SQL Server 2012 and Oracle

    Hi,
    We are trying to use the linked server feature with SQL Server 2012 to connect SQL server and Oracle database. We are concerned about the existing memory leak issue.  For more context please refer to the link.
    http://blogs.msdn.com/b/psssql/archive/2009/09/22/if-you-use-linked-server-queries-you-need-to-read-this.aspx
    The above link talks about the issues with SQL Server versions 2005 and 2008, not sure if this is still the case in 2012.  I could not find any article that talks about if this issue was fixed by Microsoft in later version.
    We know that SQL Server process crashes because of the third-party linked server provider which is loaded inside SQL Server process. If the third-party linked server provider is enabled together with the
    Allow inprocess option, the SQL Server process crashes when this third-party linked server experiences internal problems.
    We wanted to know if this fixed in SQL Server 2012 ?

    So your question is more of a information type or are you really facing OOM issue.
    There can be two things for OOM
    1. There is bug in SQL Server which is causing the issue which might be fixed in 2012
    2. The Linked server provider used to connect to Oracle is not upto date and some patch is missing or more recent version is to be used.  Did you made sure that you are using latest version.
    What is Oracle version you are trying to connect(9i,10g, R2...)
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

Maybe you are looking for

  • Permissions - 'apply to closed items' doesn't work - help!

    I took my wife's user folder off my MacBook Pro (and backed up) recently since I needed to clear some space. I then got a larger hard drive installed. I have now copied the user folder back onto this new hard drive. I am now having no end of permissi

  • How can I use the scroll wheel to move page by page

    I have Adobe Acrobat 8 and I would like to be able to use the scroll wheel in my mouse to move page by page instead of the page icons in the tool bar.  I recently had my computer updated from Windows XP to Windows 7 and I used to be able to do that i

  • Extra Mail Folder

    http://yfrog.com/g4mailhbj I just synced mac mail with my college email address. I got it to work, but for whatever reason another folder was created with my college email address that I don't want. How do I get rid of it? (circled in red in the imag

  • AIR 2.5 app won't run on Droid 2

    I have two problems and any help would be appreciated! 1) Using Flash Builder Burrito Preview Version when I try to debug it won't publish the apk to my Droid 2, it just hangs at 6% and says "Launching". I have the latest Google USB Drivers, and I ca

  • Dynamically displaying a label

    I have a form: http://htmldb.oracle.com/pls/otn/f?p=34728:1 My Version is 1.6 When the user select "Destroy Date" or "Created Date" from the 'Column' drop box, I would like to have a "label" show up to the right of the 'Value' box that says: (Format: