Which is better to use Store Procedure or Views in Crystal Reports ?

Hi,
which one is more better to use Store Procedure or Views in Crystal Reports ?
Thanks.

It depeneds on the requirement. Well, but from performance point of view as u know that stored procedures are already compiled on DB side, they would be more efficient. Views are handled differently. Here CR has nothing to do with it.
But if the stored procedure u r using is having 2 Select statements, CR will only display the results from the first select statement. In that case you need to use Views as one can use more than one views in the report and join them.
Using a Generic view which is created by the DBA for a larger audience will result in performance issues meaning if a View "V" has 25 fields and View is based on 5 tables  and ur report is using only 5 fields which are coming only from 2 tables inside the view,in this case u will end up in joining 3 more tables unnecessarily.
Hope this helps!

Similar Messages

  • Need to update multiple records using store procedure

    Hi i am trying to update multiple records using store procedure but failed to achieve pls help me with this
    for example my source is
    emp_name sal
    abhi 2000
    arti 1500
    priya 1700
    i want to increase salary of emp whose salary is less than 2000 it means rest two salary should get update..using stored procedure only
    i have tried following code
    create or replace procedure upt_sal(p_sal out emp.sal%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select sal into p_sal from emp;
    if sal<2000 then
    update emp set sal= sal+200;
    end i;f
    end;
    and i have called the procedure using following codes
    set serveroutput on
    declare
    p_sal emp.sal%type;
    v_cursor sys_refcursor;
    begin
    upt_sal(p_sal,v_cursor);
    fetch v_cursor into p_sal;
    dbms_output.put_line(p_sal);
    end;
    the program is executing but i should get o/p like this after updating
    1700
    1900
    but i am getting first row only
    2000
    and record is not upsating...please help me with this
    thanks

    Hi Alberto,
    thanx for your valuable suggestion. but still i have doubt. the code which i have mentioned above might be simple but what if i have big requirement where i need update the data by using loops and conditional statement.
    and i have similar kind of requirement where i need to deal with procedure which returns more than one row
    my source is
    empno ename salary
    111,abhi,300
    112,arti,200
    111,naveen,600
    here i need to write a store procedure which accepts the empno (111) as input para and display ename and salary
    here i have written store procedure like this
    create or replace procedure show_emp_det(p_empno in emp.empno%type, p_ename out emp.ename%type,p_salary out emp.salary%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select ename,salary into p_ename,p_salary from emp where empno=p_empno;
    end;
    and i have called this by using
    declare
    p_salary emp.salary%type;
    p_ename emp.ename%type
    v_cursor sys_refcursor;
    begin
    show_emp_det(111,p_ename,p_salary,v_cursor);
    fetch v_cursor into p_ename,p_salary;
    dbms_output.put_line(p_ename);
    dbms_output.put_line(p_salary);
    end;
    here i should get
    abhi,300
    naveen,600
    but i am getting first row only
    abhi,300
    but i want to fetch both rows...pls help me to find the solution

  • How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000

    Post Author: ltkin
    CA Forum: WebIntelligence Reporting
    Hi,
    How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000 ?
    Regards,

    Hi ltkin,
    Unfortunately, it is not possible in Xir2 to create Webi reports from stored procedures.
    Webi reports can only be created from Universe. So in Business Objects XIR3 we can create a special universe that enables Web Intelligence user's to access stored procedures residing in the database. This is the only way that Web Intelligence user's can access stored procedures.
    Please let me know if the above information helps.
    Regards,
    Pavan

  • Which is better to use in a corprate enviornment for back up Windows 2008 Vs. Mozy

    Which is better to use in a corprate enviornment for back up Windows 2008 Vs. Mozy

    Hi, 
    Microsoft provide the built-in backup utility Windows Server Backup to backup Windows server 2008. For more detailed information, please refer to the articles below:
    Windows Server Backup Step-by-Step Guide for Windows Server 2008
    http://technet.microsoft.com/en-us/library/cc770266(v=ws.10).aspx
    Save big bucks without risk: Get the most from Windows Server 2008 Backup Utility
    http://www.techrepublic.com/blog/data-center/save-big-bucks-without-risk-get-the-most-from-windows-server-2008-backup-utility/
    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    For Microsoft does not provide any third party software, you need to check with the third party software yourself.
    Regards,
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Why assertion instead of if statement ?  Which is better to use ?

    Why assertion instead of if statement ? Which is better to use ?

    Never assertion instead of if statement. The two have fundamentally different intents. Using assert to control program flow is a bad idea

  • Which is better to use spotlight or finder

    I have been a Mac user for six years. Still, I am unsure how to find things most easily on my computer. I was searching for a folder I knew I had, using its exact name in Finder, and I could not locate it. I used it in Spotlight and found it right away. I've not used Spotlight too much, but should I use that instead of Finder?

    No rule on which is better to use, I suppose it is matter of preferences.
    You can certainly expand or restrict what Spotlight searches (indexes) for you via Spotlight's preferences.
    Here is a good free app that IMHO does a good job, EasyFind, at finding contents along with file names quite well.
    https://itunes.apple.com/us/app/easyfind/id411673888
    from this group
    http://www.devontechnologies.com/download/products.html

  • TLFTextField or TLF, which is better to use in CS5?

    Hi,
    I have been developing content using TLF with CS4 and in Flash Builder. Recently when I switched to CS5, there was this cool TLFTextField. So now I wonder, TLFTextField or TLF, which is better to use in CS5? Almost all of my text will be dynamically generated. Please share your thoughts - possibly with pros and cons.
    ~ Shiyaz

    I assume you've found TLFTextField in Flash Pro (I can't remember if Flash Builder made a TLFTextField class or not). Anyway, if you're considering using Flash Pro, here's some background on the TLFTextField class:
    This class was created primarily for backwards compatibility with Classic Text coding. If you used Flash Pro CS 4 or earlier versions, and you wrote ActionScript for your text objects, you were using TextField objects. So, when you upgraded to CS 5, and you decided to convert all your old Classic text objects to the new TLF objects, all your code would have broken were it not for TLFTextField class. TLFTextField implements the TextField API so that your existing TextField code can be used in the TLF environment.
    So, if you're an ActionScript programmer who is already comfortable programming using the TextField API, it certainly makes sense to continue doing so but using TLFTextField objects. However, if you want to take advantage of the new TLF features, the old API doesn't really give you the ability to do that. So, the TLFTextField provided a new API:
    function get textFlow():TextFlow;
    The TextFlow class is the top level class of the TLF model objects. Using that object, you can then set attributes on your text just as if you were working with TextFlow in Flash Builder. So, in essence, TLFTextField provides backwards compatibility, continued use of the familiar API set, and access to the TextFlow model class.
    Another nuance to be aware of is that if you choose to embed fonts, TLF requires the newer "DF4" (for DefineFont4, based on the SWF Tag name) vs. the older "DF3" fonts that TextField requires. For text on the stage, Flash Pro will do all the tricky work for deciding when to embed DF3 and when to embed DF4 fonts, but just be aware that mixing Classic text and TLF text when using embedded fonts can cause a "double tax" on your SWF size because it may embed the same font both as DF3 and DF4.
    Good Luck!
    Rusty

  • How to pass xml data as objects into Database using store procedures

    Hi All,
         I don't have much knowledge on store procedure,can anybody help how to pass the xml as objects in Database using store procedure.
    My Requirement is I have a table with three fields EMPLOYEE is table name and the fields are EMP_ID,EMP_TYPE AND EMP_DET,I have to insert the employees xml data into corresponding fields in the table.
    Input Data
    <ROWSET>
       <ROW>
         <EMP_ID>7000</EMP_ID>
          <EMP_TYPE>TYPE1</EMP_TYPE>
         <EMP_DET>DEP</EMP_DET>
      <ROW>
      <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE2</EMP_TYPE>
        <EMP_DET>DEP2</EMP_DET>
    <ROW>
    <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE3</EMP_TYPE>
        <EMP_DET>DEP3</EMP_DET>
    <ROW>
    <ROWSET>
    So each row values has to inserted into resp fields in the table.
    Regards
    Mani

    Do you have a similar structure in your stored procedure ?
    In that case you can simply call the procedure from soa using db adapter and do a mapping to assign the values.

  • Using DB2 views in crystal reports with java

    Post Author: Shikha Tomar
    CA Forum: JAVA
    Hello,
    We have used DB2 views in Crystal Report 11.
    We are able to view the report through crystal report tool but while using this rpt file in java application,the DB2 view is not found.
    It gives an error: "table SCDC.View_report not found."
    SCDC.View_report=Name of the view used in rpt
    Code for calling rpt is as below:
    The line marked as red gives the error:
    private static void switch_tables(DatabaseController databaseController) throws ReportSDKException, IOException {
    final String URI = "!com.ibm.db2.jcc.DB2Driver!jdbc:db2://"SERVERNAME":"PORT"/"DATABASE_NAME"!"+"";
    final String DATABASE_DLL = "crdb_jdbc.dll";
    //Obtain collection of tables from this database controller.
    Tables tables = databaseController.getDatabase().getTables();
    CommandTable commandTable=new CommandTable();
    //Set the datasource for all main report tables.
    for (int i = 0; i < tables.size(); i++) {
    ITable table = tables.getTable(i);
    //Keep existing name and alias.
    table.setName(table.getName());
    table.setAlias(table.getAlias());
    //Change properties that are different from the original datasource.
    table.setQualifiedName(TABLE_NAME_QUALIFIER + table.getName());
    //Change connection information properties.
    IConnectionInfo connectionInfo = table.getConnectionInfo();
    //Set new table connection property attributes.
    PropertyBag propertyBag = new PropertyBag();
    //Overwrite any existing properties with updated values.
    propertyBag.put("Trusted_Connection", "false");
    propertyBag.put("Server Name", SERVERNAME); //Optional property.
    propertyBag.put("Connection String", CONNECTION_STRING);
    propertyBag.put("Database Name", DATABASE_NAME);
    propertyBag.put("Server Type", "JDBC (JNDI)");
    propertyBag.put("URI", URI);
    propertyBag.put("Use JDBC", "true");
    propertyBag.put("Database DLL", DATABASE_DLL);
    connectionInfo.setAttributes(propertyBag);
    //Set database username and pasword.
    //NOTE: Even if these the username and password properties don't 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.setUserName(DBUSERNAME);
    connectionInfo.setPassword(DBPASSWORD);
    connectionInfo.setKind(ConnectionInfoKind.SQL);
    //connectionInfo
    table.setConnectionInfo(connectionInfo);
    //Update old table in the report with the new table.
    databaseController.setTableLocation(table, tables.getTable(i));
    Regards,
    Shikha

    Hi,
    Fo business views please reffer to [Business Views Administrator's Guide|http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_bv_admin_en.pdf]
    Yes, Crystal Reports 2008 can consume business views.
    Regards,
    Ramu.

  • Insert and update same record of table using store procedure in oracle 10g

    Hi,
    I am using oracle sql developer for this.
    I have created Store procedure which run after every 30mins of interval.
    the problem is Ii need to insert data for first time of day then later that same record should update for particular field(here its plan code).
    if new field is coming (if new plan code is generated) then it should insert data and again update same for interval.
    means for each plan individual record(i.e. plan wise summary) should be there for only a day. next day new record for same plan.

    Hi,
    You should use Merge like shown below:-
    Merge into original_table a
    using second_table b
    on (a.primary_key=b.primary_key and a.primary_key........)
    when match then
    update set column_list=b.column_list
    when not match then
    isert into (column list)
    values(a.column_list)If you dont know much about merge then follow below link..
    http://www.oracle-developer.net/display.php?id=203
    http://www.oracle-base.com/articles/10g/merge-enhancements-10g.php

  • Benefit of using store procedure instead of select statement to pull data into biztalk

    I was wondering why store procedure is more beneficial than using select statement to pull data into biztalk?

    In addition to the above two points, in case if there is a change in logic of stored procedure, you only need to modify the stored proc and the applications calling/using it may be left intact.
    Also, stored procedures are complied code so performance is better and safe too.
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • Which is better to use: BEx query or Web Application as an iView in portal?

    Hi gurus!
    Are there any experienced opinions, which is better - publish a BEx query in portal or publish a BEx Web Application in portal? Is it easier to alter the layout attributes etc. if I create a BEx Web Application first before publishing?
    What is the way of fixing for example filter item height if I publish BEx query in portal - is there a Web Application that it uses anyhow which I can fix? Or can I use in that case iView -properties in portal?
    Thankful for advice
    Sari

    ok, means i can use jsp:useBean tag for all my
    classes that are not actually bean. so it will be
    instantiated at run time and provide efficiency .No. Jsp:useBean is used for java bean components.
    >
    but when should i use import statement in my jsp and
    it happen at translation time so will it create any
    type of burden for my code if i import multiple
    classes.For non-java beans, you need to import the classes, period.
    It's not a burden, it's a necessity.

  • Which one better to use - jsp:useBean or import statement

    Hi,
    I just want to know that which one is better to use jsp:useBean or import statement .
    I can instantiate and call method of myclass -
    1) by importing the class through import tag in jsp as <%@page import="myclass"%. or
    2). by using <jsp:useBean tag....
    i have these two option to do the same thing. i know that basically useBean is used to call setter and getter method of bean class and but it can be used to call a normal java file that have some logic .
    so what should i used , which one is better and why?
    useBean provides scope and object instance so no need to create object by new operator. and with import you have to create an instance .
    but which tag should i use in my jsp?
    i am confused???

    ok, means i can use jsp:useBean tag for all my
    classes that are not actually bean. so it will be
    instantiated at run time and provide efficiency .No. Jsp:useBean is used for java bean components.
    >
    but when should i use import statement in my jsp and
    it happen at translation time so will it create any
    type of burden for my code if i import multiple
    classes.For non-java beans, you need to import the classes, period.
    It's not a burden, it's a necessity.

  • Using store procedures with SQLJ - please help!

    I have two questions:
    1.I wrote simple test appllication that uses SQLJ to run store
    procedures from SQL package. It compiles and work fine from
    JDeveloper 3 if I use java version JDK1.2.2_JDeveloper.
    It compiles OK in regular JDK1.2.2 but raise the following
    exception when running:
    profile
    com.itrade.trserver.truser.dbqueries.ItrHistorian_SJProfile0 not
    found: java.io.InvalidClassException: [Ljava.lang.Object;;
    Serializable is incompatible with Externalizable
    Does it mean that I have to use JDeveloper JDK?
    2.When I give other then default package for *.sqlj file the
    *.sqlj file is added to project but I cannot see it in specified
    package (the *.sqlj file is created in the its directory).
    After I compile the project the I can see *.java file in the
    specified package, but compiler gives errors about redefined
    symbols. If I remove *.sqlj file from the project it compiles OK.
    What I am doing wrong?
    Yakov Becker
    null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Thank you for the response.
    I don't create jar file. I run it from JDeveloper environment.
    What do you mean by "I made sure to also copy over the
    : the .ser file"? What purpose of the *.ser file in this case?
    Yakov
    JDeveloper Team (guest) wrote:
    : I have come across this error before..
    : I'm assuming that your jar file is in the classpath as
    : specified in the Jserv configuration?
    : When I had the error, I made sure to also copy over the
    : the .ser file.
    : In my case, I happened to have both my class files and
    : the .ser file outside of a jar file and it worked..
    : Hope this helps!
    : Yakov Becker (guest) wrote:
    : : I have two questions:
    : : 1.I wrote simple test appllication that uses SQLJ to run
    store
    : : procedures from SQL package. It compiles and work fine from
    : : JDeveloper 3 if I use java version JDK1.2.2_JDeveloper.
    : : It compiles OK in regular JDK1.2.2 but raise the following
    : : exception when running:
    : : profile
    : : com.itrade.trserver.truser.dbqueries.ItrHistorian_SJProfile0
    : not
    : : found: java.io.InvalidClassException: [Ljava.lang.Object;;
    : : Serializable is incompatible with Externalizable
    : : Does it mean that I have to use JDeveloper JDK?
    : : 2.When I give other then default package for *.sqlj file the
    : : *.sqlj file is added to project but I cannot see it in
    : specified
    : : package (the *.sqlj file is created in the its directory).
    : : After I compile the project the I can see *.java file in the
    : : specified package, but compiler gives errors about redefined
    : : symbols. If I remove *.sqlj file from the project it
    compiles
    : OK.
    : : What I am doing wrong?
    : : Yakov Becker
    null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Master Data Service: how to remove the dirty data from master data service from a table using store procedure?

    hello, we need to remove the dirty data from MDS, but we found we can only do this from MDS web, and we need to do this by store procedure to make this process automatically. is there any easy method to remove the data from MDS automatically? thank.
    Warren

    Hi Warren,
    Assuming the dirty data is easily identifiable, all you need to do is use the staging process with import type of 5 (de-activate - i.e., soft delete) or import type of 6 (hard delete).
    Could give more details if I knew the version of MDS you are running (SQL 2008R2 or SQL 2012).
    Kind regards,
    M

Maybe you are looking for

  • "Output could not be issued" when using custom page formats

    Dear all, I created a custom page format using SPAD. Its dimension is 7.5cm x 10cm (190mm x 254mm). I also created this page format in windows and set as the default paper size in my printer. However, when trying to print a smartform using this size,

  • LRT224 WAN IP Release and Renew

    I am trying to debug an issue where my internet performance drops to nothing after about 18 hours of operation. I have bypassed the LRT224 for several hours and my cable modem seems fine. So now I am focused on the LRT224. When I log into the router

  • Savemail panic in sendmail

    Hello everyone Since last week I have been getting the following sendmail error again and again: q6GEA0ib022095: Losing ./qfq6GEA0ib022095: savemail panic q6GEA0ib022095: SYSERR(root): savemail: cannot save rejected email anywhere I have no mails in

  • Download entire Development Class/Package

    Hi Guys ! Is there a way (program, external tool, etc) to export/download ENTIRE development class to a file which can be browsed on every computer - without connection to SAP at all. What I am looking for - is some kind of a tool which as input - ta

  • ZEN Microphoto will not sta

    I have a Zen Microphoto that freezes at the Creative logo on start up. I have tried recovery mode but it will not do anything e.g. reload firmware, format etc. Also it is not recognised by the PC allthough it does charge from the USB when battery is