How do you report from a multiple-result-set stored procedure?

Team,
I am writing a report against a canned stored procedure which returns eight result sets.  That is, inside the stored procedure, there are eight SELECT statements which pump to the output. In ADO, you would read the first one, then use SqlDataReader.NextResult to advance the reader to the next one until you have done all eight.
Q1: Have you ever written a Crystal Report against such a sproc? How?
Q2: I see that I could pull this data using ADO.NET if I knew this: Have you ever read such a sproc into a dataset? When I drag-and-drop the sproc into the dataset designer, it only makes a table schema for the first result set. I desire to have a table schema for all eight.
Thanks,
~ Shaun

Q1: Have you ever written a Crystal Report against such a sproc? How?
- best answered in the Crystal Reports Design forum, so please post there:
SAP Crystal Reports
Q2: I see that I could pull this data using ADO.NET if I knew this: Have you ever read such a sproc into a dataset? When I drag-and-drop the sproc into the dataset designer, it only makes a table schema for the first result set. I desire to have a table schema for all eight.
- not a Crystal reports question. Perhaps better posted to some MS / .NET developer forum(?)
Ludek

Similar Messages

  • Stored Procedure With Multiple Result Sets As Report Source : Crosspost

    Hello Everyone,
    I have an issue where i have created a stored procedure that returns multiple result sets
    /* Input param = @SalesOrderID */
    SELECT * FROM Orders TB1
      INNER JOIN OrderDetails TB2 ON  TB1.ID = TB2.ID
    WHERE TB1.OrderID = @SalesOrderID
    SELECT * FROM Addresses
      WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Shipping'
    SELECT * FROM Addresses
      WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Billing'
    This is just a quick sample, the actual procedure is a lot more complex but this illustrates the theory.
    When I set the report source in Crystal X to the stored procedure it is only allowing me to add rows from the first result set.
    Is there any way to get around this issue?
    The reason that I would prefer to use a stored procedure to get all the data is simply performance. Without using one big stored procedure I would have to run at least 6 sub reports which is not acceptable because the number of sub reports could grow exponentially depending on the number of items for a particular sales order.
    Any ideas or input would be greatly appreciated.
    TIA
        - Adam
    P.S
    Sorry for the cross post, I originally posted this question [here|/community [original link is broken];
    but was informed that it might be the wrong forum
    Edited by: Adam Harris on Jul 30, 2008 9:44 PM

    Adam, apologies for the redirect, but it is better to have .NET posts in one place. That way anyone can search the forum for answers. (and I do not have the rights to move posts).
    Anyhow, as long as the report is created, you should be able to pass the datasets as:
    crReportDocument.Database.Tables(0).SetDataSource(dataSet.Tables("NAME_OF_TABLE"))
    Of course alternatively, (not sure if this is possible in your environment) you could create a multi-table ADO .NET dataset and pass that to the report.
    Ludek

  • Multiple result sets from stored procedure into CachedRowSet

    How can you obtain multiple sets of data from a stored procedure that returns multiple result sets, when you'd like to use CachedRowSet rather than ResultSet?
    My database's stored procedures return multiple result sets, but I'm not sure how to manipulate that using CallableStatements and CachedRowSets... I read the RowSet tutorial from java.sun.com but that didn't cover the case of multiple result sets and CallablStatements.
    How might I do this? Thanks a lot.

    SELECT columns..
    FROM table
    FOR XML PATH('NodeName'),('Rootname')
    Thank you for replying.
    I dont have to generate XML from a query. I have to generate from a SP and that too without modifying it.
    Thanks,
    Tauhid
    thats ok you can do like this
    1. Create a table with structure same as SP resultset
    2. Populate table with SP result as per below
    INSERT table
    EXEC SPName param1value,...
    3. Add a query like below
    SELECT columns..
    FROM tablename
    FOR XML PATH('NodeName'),('RootName')
    see
    http://visakhm.blogspot.com/2014/05/t-sql-tips-fun-with-for-xml-path.html
    4. Use sp_send_dbmail to sent it through mail
    http://msdn.microsoft.com/en-IN/library/ms190307.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to create report from report painter??

    Hi,
    how to create report from report painter?? from transaction code GRR1

    Select the library that you want report to create.  GRR1
    You select what to list in coulumns and what to lisr in rows. You could select characteristics or key figures.
    You can use variable both in defininig row and coulmn or in general selection.
    You can also use sets as variable or as constant. These sets can be your master data groups or sets in GS02.
    You can use formulas.

  • How to run report from form using run_object_report

    I AM USNING FORMS9I/REPORTS 9I , HOW TO RUN REPORT FROM FROM USING RUN_REPORT_OBJECT AND HOW
    TO PASS PARAMETER AS WE DID IN RUN_REPORTS PLEASE HELP ME

    here an example !
    I hope this example you can use it
    PROCEDURE pr_reporte IS
    BEGIN
    DECLARE
         repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status Varchar2(20);
    d1 DATE;
    d2 DATE;
    BEGIN
         d1 := :GLOBAL.DIA_INI;
         d2 := :GLOBAL.DIA_FIN;
         repid := find_report_object('rep_lab02');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'p_fec_uno='||to_char((add_months(last_day(d1),-1) +1),'DD/MM/YYYY')||' '||
         'p_fec_dos='||to_char(d2,'DD/MM/YYYY'));
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
         v_rep := RUN_REPORT_OBJECT(repid);
         rep_status := report_object_status(v_rep);
         WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
              rep_status := report_object_status(v_rep);
         END LOOP;
         IF rep_status = 'FINISHED' then
              WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank');
         ELSE
              ventana('E','error reporte no encontrado','S');
         END IF;
    END;
    END;
    The 'rep_lab02' is the name of the report that you give in the node reports
    p_fec_uno and p_fec_dos they are the parameters in the report
    repserver is the name of server created with rwserver
    Greetings

  • How to run reports from discoverer viewer by http

    Hello everybody,
    We've migrated our j2ee application to htmldb and we've migrated Discoverer reports from 4i to 5. So, I'd like to know how to invoke reports from htmldb.
    With the previous version we used this way:
    http://hostname/discoverer4i/viewer?wbk=ZZZZZZZZZ&us=uuuuuuuuu&eul=XXXXX&qp_competence_id=-1&qp_competence_type=All&qp_Manager=NNNN&qp_resource_manager=-N&db=custprd.us.oracle.com&password=******
    Best Regards,
    Seba.

    Hi Seba
    You basically run Viewer as normal and then copy the URL from the Address bar at the top of the browser. This can then be used to run the report.
    I hope this helps
    Best wishes
    Michael Armstrong-Smith
    URL: http://learndiscoverer.com
    Blog: http://learndiscoverer.blogspot.com

  • How to take reports from miro t-code please explain in a step by step manner?

    How to take reports from miro t-code please explain in a step by step manner?

    I just did as you said (I think), but it's still having the same behaviour as before (same data for all EVS in the table).
    Here´s what I did:
    I
    In node "Detail" (cardinality 0...n, singleton set to true), which is binded to the table, I created a child node named "Column1Values" wth cardinality 1...1 and singleton set to false.
    "Column1Values" node has an attribute called "column1", of type String.
    I did the binding between attribute "column1" and the column1 inputfield celleditor in the table.
    I created an event called Column2Changed and binded it to the column2 celleditor of the table. I added a parameter called nodeElement of type IPrivateCompView.IDetailElement to this event, and mapped it to the column2 editor in the table so that I can dynamically get the nodeElement that is being affected.
    I added the following code to the onActionColumn2Changed(wdEvent, nodeElement) method that gets created in the view:
    IWDAttributeInfo attrInfo = nodeElement.nodeColumn1Values().getNodeInfo().getAttribute("column1");
    ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
    if(this.initRFC_Input(nodeElement.getColumn2())){
         for(int i =0; i < wdContext.nodeRFCresults().size(); i++){
              value.put(wdContext.nodeRFCresults().getRFCresultsElementAt(i).getId(),
                                  wdContext.nodeRFCresults().getRFCresultsElementAt(i).getDesc());
    And with this, I still get the original problem... When the EVS of one row is updated, ALL other EVS of the table get also updated with the same values.
    What am I missing? Sorry Govardan, I bet I'm not seeing something really obvious... hopefully you can point me in the right direction.
    Thanks!

  • In Pages 5.2.2: How do you go from 1 column to 2 and keep them on the same page?

    In Pages 5.2.2: How do you go from 1 column to 2 and keep them on the same page?

    Sorry, I tried to say your answer solved my question, but I guess I told it that my response to you solved it. Now that I liked it, the solved option doesn't appear.

  • How to Create a new column from two different result sets

    How to Create a new column from two different result sets, both the result set uses the different date dimensions.

    i got solutions for this is apply filters in column formula it self, based on the requirement.

  • How do you switch from one iTunes account to another on your apple tv?

    How do you switch from one iTunes account to another on your apple tv?

    Welcome to the Apple community.
    I assume you do mean a different account and not simply a different iTunes library. Unfortunately, in order to switch accounts, you would need to log out and log in to the second account.

  • How do you get to the "Multiple Item Information" window so I can click "Part of a compilation:?

    How do you get to the "Multiple Item Information" window so I can click "Part of a compilation"?  When I transfer a CD to iTunes, and the CD has ten tracks, it loads as ten different albums.  Also, once this happens, do I have to delete the album and start over or is there a way to merge the albums in iTunes?  Using iTunes 10.04.08.

    And you've made me remember that using the compilation flag may only work in iTunes if you go into the Songs view, then use View > Column Browser > Show Column Browser and then View > Column Browser > Group Compilations to make sure this line is ticked.
    It is also best if View > Column Browser > Use Album Artists is also ticked.
    tt2

  • How do you upgrade from Mac OS x 10.6.8 to Lion?

    How do you upgrade from Mac OS x 10.6.8 to Lion?

    First check to be sure your hardware meets the hardware requirements for Lion.
    Backup your data. I suggest a bootable clone as the way to go.
    Then open App Store and purchase and download the Lion installer.
    Then install Lion.
    Allan

  • How do you stream from my mac to apple tv

    How do you stream from my MacBook Pro to my apple tv?  I want to watch a show that is on the internet.

    Welcome to Apple Support Communities
    See > http://support.apple.com/kb/HT5404 If your computer is compatible with AirPlay Mirroring, you can use it to mirror the computer screen to your Apple TV.
    If your Mac isn't compatible with AirPlay Mirroring, you can use a third-party app, like AirParrot > http://www.airparrot.com

  • HT4211 How do you switch from multitasking mode back to normal display mode?

    How do you switch from multitasking mode back to normal display mode?

    You mean switch from showing the recently used apps bar or dock back to regular home screen display mode?
    If so, select the Home button.

  • HT1551 How do you mirror from an iPod to 3rd generation apple tv

    How do you mirror from an ipod to 3rd generation apple tv

    Welcome to the Apple Support Communities
    You can only use AirPlay Mirroring if you have a 5th generation iPod touch > http://support.apple.com/kb/HT5209
    If you are referring to AirPlay > http://support.apple.com/kb/HT4437

Maybe you are looking for

  • Quicktime Pop-up videos on my webpage

    Forgive me for my inexperience - first time on a forum... I am using FrontPage to design my webpage and working in Windows Internet Explorer. *WHAT I'M TRYING TO ACCOMPLISH:* On my webpage I want to have a selection of photos that link to (.mp4) vide

  • Exits in the function module - SO_OBJECT_SEND

    Hi, As per my requirement, I need to add a common line to the body of the E-mail that is sent via the function module SO_OBJECT_SEND. So please let me know if any Exit/BADI exists that I can use to modify the body of the E-mail. Thanks & Regargs, Mad

  • Artist search is broken for MP3 files in iTunes 11?

    I am having a first world problem. I am using iTunes 11.01 on 2 Macs - an old 2006 iMac running 10.7.5, and a new MacBook Pro running 10.8.2. Both exhibit the same odd behavior. If I add new MP3 files to iTunes (such as tracks from Amazon), artist na

  • New D810 Import Problem

    Help, please?! Can't import images from new Nikon D810, cf card, into Lightroom v4.4.  Using Nikon supplied UPC cord into any and all upc ports on computer (windows 7). Thumbnails appear but upon import get the message, "files are not recognized by t

  • IOS 9 Beta 3

    PhoneChanger wrote: Great update, thanks for the news, I updated to 9 beta 1 when it first arrived, but quickly reverted back to 8.3 as the battery drain was huge, my iPhone 6 wouldn't last the day without being plugged in. Tempted to go back, but I