Pass Data Into Second View Controller

*My Setup:*
I have a tab-bar program; I'm currently focusing on one tab, which has a nav controller
The root controller works as expected. In one of the table view selection methods (didSelectAccessoryButtonAtIndex, or something similar), I initialize one of my classes, which is a subclass of UIViewController with an alloc and custom init. Then I use the pushViewController to push an instance of that class onto the view stack.
*My Issue:*
I can't figure out how to pass the data from my first level controller to the second. I'm using a custom init method, which is an instance method because I have to pass an instance of a view controller to the pushViewController method. The data isn't getting to the second level controller, as verified by some NSLogs.
*Pseudo code:*
FirstViewController.m:
-(void)accessoryButtonPressedAtSomeIndex {
SecondViewController *svc = [[SecondViewController alloc] initWithString:@"Some string"];
pushViewController: svc
SecondViewController.m:
@synthesize string;
-(id)initWithString:(NSString *)someString {
self.string = someString;
NSLog (@"string = %@", someString);
return self;
The NSLog returns NULL.
Obviously some of the code isn't valid, but I don't remember the exact methods. I can post the real code if necessary, but there are a lot of "dependencies" between files. Everything else (pertaining to this problem, although there are some other bugs in my app that I'd appreciate help on too) works. Any suggestions?

Hello musicwind95
Two suggestions :
1) Didn't you forget to do
if (self = [super init] )
return self;
in an init method ?
Otherwise there is nothing to handle your string
2) Put a breakpoint and trace ..

Similar Messages

  • Pass data between two views

    Hi experts,
    i want to pass data from a view to an other one, i am filling a structure, and want get it into another view,
    is there a way to handl this.
    Best Regards
    Tomas

    Hi,
    I am not getting your exact requirement but to pass data from one view to another try the following steps.
    1. Suppose view1 is the view where you will take data from user through i/p fields and display it in view2 through text view.
    2. First create context node with required attributes in component controller then map it to context of view1.
    3. Map the attributes to the i/p fields of the view.
    4. Then if you want to go to view2 on button click then create an event in onAction property of button.
    5. Create OutBound plug in view1 and InBound plug in view2.
    6. In enent handler method of the button write the fire method.
         eg.  wd_this->fire_to_view2_plg(  ).
    7. In windows embed both the views and create navigation link for OutBound plug of view1.
    8. To display the values in view2 first map the node from component controller to context of the view2.
    9. Now map the attribues of the node to the Text Views or i/p fields where you want to diplay the values.
       Automatically values will appear in view2.

  • ICWC: Passing data b/w views without using CuCo!.

    Hi All,
    I am using CRM 4.0, for my custom development i got many custom views, i have a requirement to pass a value from one custom view to another!.
    All my custom views i developed in a custom application, also the workbench is not allowing me to create a new custom controller of my own, in this context is there any alternative for passing data b/w view without using a Custom Controller?.
    or else anyway to create a new CuCo in my custom application!..
    Thanks in Advance,
    sudeep v d..

    Hi all,
    I have an application that runs in the JApplet.I have
    to pass data b/w server and applet.The
    datas are brought from the server using php to the
    browser and passed to applet using param
    tags.
    1.Is it possible to set value for the param tag from
    applet?Why do you ever want to do it? It sounds like setting arguments passed to a program's main method from command line after the main method has been invoked. It is possible though to dynamically set any values for any applet params using php before the applet gets loaded to the browser window as you generate an html file on the server side.
    2.How to retrieve data from the param tag to the
    applet in the form of an array.
    In the getParameter it is required to specify the
    param name.
    Is it possible to retrieve data from param tag similar
    to that of getting data from command
    line arguments array.You can use some naming/numbering convention for your params. For example settings1, settings2 ... Then you can loop in your code retrieving the values like getParameter("settings" + i) checking to see that it is not null or empty.
    However, if you don't want to reload the applet (together with the page) just to get some new data from the server, you can establish a tcp/ip connection as elchaschab recommended.
    Cheers!

  • Inserting data into a view

    Hi,
    How to insert data into a view of one table

    Same as for the underlying table:
    INSERT INTO <view_name>(<col1>, <col2>, ..., <coln>) VALUES (<val1>, <val2>, ..., <valn>);
    Cheers,
    Colin

  • Passing data to next  view

    Hi All,
    I have small doubt .I have developped an application with in that I created TextEdit UI element when I select some date and send to Next view. How can do it .
    Please suggest me . I have some idea navigating two views by using Inbound and outbound plugs.
    If I am using to pass paramaters how to send it next view how to capture the sended value in the second View.
    Thanks in Advance.
    Mandapati

    Hi,
    U can use context mapping,
    Create a context in controller, view1, view2.
    Map view1 to controller and similarly do for view2.
    set the value in the context attribute of view1 u can get
    in view2 also.
    It is possible to use the context value between two views without using a component controller.Through the fire plug methods u can easily pass the values between two views.
    while creating outbound and inbound plugs create the parameters also for them.
    in the 1 view implementation on button action:
    onAction()
    String name = wdContext.currentContextElement().get<att>();
    wdthis.wdfireplugto2view(name);
    In the second view implementation:
    onplugfrom1view(){
    wdContext.currentContextElement().setRes(name);
    regards,
    Vijayakhanna raman
    Message was edited by: Vijayakhanna Raman

  • Passing field values from View Controller to Custom Controller

    Hi Experts,
    I am working on a customer requirment in which customer want to see the values of field from one view in another view. The Context node & Context node attribute are the same in both the views.
    I am aware that we need to pass the field values from view controller to custom controller in order to see the field in the subsequent view. I would like to kow how i can achieve that technically?
    Kindly let me your valueable suggesions.
    Best Regards,
    Prabahar

    Hi Carsten,
    Thank you for the detailed feedback.
    I want the fields ID_TYPE & ID_TYPE_DESCRIPTION from IUICMD/SearchAccount to be available in IUICMD/DetailAccount. I have created a context node u201CSEARCHu201D in view IUICMD/DetailAccount. I have created the context node with out choosing u201CCreate with Instanceu201D.  This Context node (SEARCH) is already available in IUICMD/SearchAccount as part of the standard.
    Below given is contents of the Method CREATE_SEARCH of my context class ZL_IUICMD_DETAILACCOUNT_CTXT of view IUICMD/DetailAccount, which is created by the Wizard during enhancement.
    method CREATE_SEARCH.
        DATA:
          model        TYPE REF TO if_bsp_model,
          coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
          entity       TYPE REF TO cl_crm_bol_entity,    "#EC *
          entity_col   TYPE REF TO if_bol_entity_col.    "#EC *
        model = owner->create_model(
            class_name     = 'ZL_IUICMD_DETAILACCOUNT_CN00'
            model_id       = 'SEARCH' ). "#EC NOTEXT
        SEARCH ?= model.
        CLEAR model.
    bind to custom controller
      owner->do_context_node_binding(
               iv_controller_type = CL_BSP_WD_CONTROLLER=>CO_TYPE_CUSTOM
               iv_name = 'IUICMD/CuCoMD' "#EC NOTEXT
               iv_target_node_name = 'BUILHEADERSEARCH'
               iv_node_2_bind = SEARCH ).
    endmethod.
    I have enhanced the Custom Controller. Now it have new implementation class u201CZL_IUICMD_CUCOMD_IMPLu201D
    Let me know where I am doing mistake
    Thanks in advance
    Best Regards,
    Prabahar
    Edited by: Prabahar Raju on Sep 2, 2009 10:47 AM
    Edited by: Prabahar Raju on Sep 2, 2009 10:52 AM

  • Passing data from one view to other in differnt window

    Hi all,
    I am developing an application in which i need to transfer some data from one view of first window to another view of 2nd window. Also first window is an modal pop up window. Can anybody help in this regard.

    Hi,
    as ayyapparaj said,
    navigate to component controller of ur application and create a node with required no of attributes.
    and map this node to window1 and window2.
    and set the required values into the context in window1 ,then these values available accross the (window2)application.
    i hope u got...
    refer this link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/903fed0d-7be4-2a10-cd96-9136707374e1
    Regards,
    ramesh
    Edited by: Ramesh Babu V on Aug 27, 2008 3:36 PM

  • Stored Procedure: Extract data into second cursor

    This is ready-to-run script with a commented out INCOMPLETE section of code where i need to select from a cursor.
    --==  PDF Dcument Table of contents ==---
    --==  PDF Report contains Period to date on condiments and bun sales for a region
    --==  For each week for a 4-week period with week 6 representing PTD and week 7 representing
    --==  YTD. Data should be gathered in rowsets and pivoted on client
    --== 
    --== Basic Functionallity:
    --=== Write a stored procedure that performs the following:
    --==  1) Select the report data into cursor 1  in the order with a resultset order
    --==     in the way it will be printed to report.
    --==  2) Create list of inique stores in separate cursor
    --==  Approach: 
    --== Create the Type object of fields needed to build table of contents for each row of the table. Add a sort field
    --== to enable restore the original order of data after any sorting done on client 
    --== Create table table of the row objects
    --== Declare 2 cursors:
    --   a) ) First cursor holds the data for the PDF Report  to be pivoted by the client
    --   b) ) Second should contain a table of contents (unique storenbr) in the 
    --== same order as the stores in the first cursor.
    --== Oracle version 10g v2 on  W2K3
    begin  execute immediate 'drop type TYP_TBL_CWSR_TOC'; exception when others then null; end;
    begin  execute immediate 'drop type TYP_CWSR_TOC';  exception when others then null;  end;
    begin execute immediate 'drop procedure Create_Rpt_and_TOC'; exception when others then null; end;
    create or replace TYPE TYP_CWSR_TOC AS OBJECT
           (   sortcol         number             --== probably not needed, just in case
            ,  storenbr        varchar2(100)
            ,  storename       varchar2(200) 
    create or replace TYPE TYP_TBL_CWSR_TOC AS TABLE OF TYP_CWSR_TOC;
    create or replace procedure create_rpt_and_toc
         pc_report_data               OUT sys_refcursor
    ,    pc_TOC   OUT sys_refcursor     
    AS
    v_tblTOC        TYP_TBL_CWSR_TOC;
    v_rec           TYP_CWSR_TOC := TYP_CWSR_TOC(NULL,NULL, NULL);
    BEGIN
    OPEN pc_report_data FOR
    with  sample_data as
    (    select 22 storeid , 1 week_nbr, 15942 net_sales, 372 buns, 176 condiments  from dual union all
          select 22 storeid , 6 week_nbr, 15942 net_sales, 372 buns, 176 condiments  from dual union all
          select 22 storeid , 7 week_nbr, 15942 net_sales, 372 buns, 176 condiments  from dual union all
          select 23 storeid , 1 week_nbr, 25302 net_sales, 481 buns, 221 condiments  from dual union all
          select 23 storeid , 6 week_nbr, 25302 net_sales, 481 buns, 221 condiments  from dual union all
          select 23 storeid , 7 week_nbr, 25302 net_sales, 481 buns, 221 condiments  from dual union all
          select 24 storeid , 1 week_nbr, 29347 net_sales, 598 buns, 238 condiments  from dual union all
          select 24 storeid , 6 week_nbr, 29347 net_sales, 598 buns, 238 condiments  from dual union all
          select 24 storeid , 7 week_nbr, 29347 net_sales, 598 buns, 238 condiments  from dual union all
          select 25 storeid , 1 week_nbr, 17637 net_sales, 360 buns, 165 condiments  from dual union all
          select 25 storeid , 6 week_nbr, 17637 net_sales, 360 buns, 165 condiments  from dual union all
          select 25 storeid , 7 week_nbr, 17637 net_sales, 360 buns, 165 condiments  from dual union all
          select 27 storeid , 1 week_nbr, 22010 net_sales, 405 buns, 172 condiments  from dual union all
          select 27 storeid , 6 week_nbr, 22010 net_sales, 405 buns, 172 condiments  from dual union all
          select 27 storeid , 7 week_nbr, 22010 net_sales, 405 buns, 172 condiments  from dual union all
          select 31 storeid , 1 week_nbr, 16836 net_sales, 345 buns, 168 condiments  from dual union all
          select 31 storeid , 6 week_nbr, 16836 net_sales, 345 buns, 168 condiments  from dual union all
          select 31 storeid , 7 week_nbr, 16836 net_sales, 345 buns, 168 condiments  from dual union all
          select 38 storeid , 1 week_nbr, 28244 net_sales, 524 buns, 247 condiments  from dual union all
          select 38 storeid , 6 week_nbr, 28244 net_sales, 524 buns, 247 condiments  from dual union all
          select 38 storeid , 7 week_nbr, 28244 net_sales, 524 buns, 247 condiments  from dual union all
          select 39 storeid , 1 week_nbr, 21011 net_sales, 407 buns, 238 condiments  from dual union all
          select 39 storeid , 6 week_nbr, 21011 net_sales, 407 buns, 238 condiments  from dual union all
          select 39 storeid , 7 week_nbr, 21011 net_sales, 407 buns, 238 condiments  from dual union all
          select 41 storeid , 1 week_nbr, 18026 net_sales, 430 buns, 179 condiments  from dual union all
          select 41 storeid , 6 week_nbr, 18026 net_sales, 430 buns, 179 condiments  from dual union all
          select 41 storeid , 7 week_nbr, 18026 net_sales, 430 buns, 179 condiments  from dual union all
          select 42 storeid , 1 week_nbr, 24821 net_sales, 466 buns, 212 condiments  from dual union all
          select 42 storeid , 6 week_nbr, 24821 net_sales, 466 buns, 212 condiments  from dual union all
          select 42 storeid , 7 week_nbr, 24821 net_sales, 466 buns, 212 condiments  from dual union all
          select 65 storeid , 1 week_nbr, 13356 net_sales, 281 buns, 136 condiments  from dual union all
          select 65 storeid , 6 week_nbr, 13356 net_sales, 281 buns, 136 condiments  from dual union all
          select 65 storeid , 7 week_nbr, 13356 net_sales, 281 buns, 136 condiments  from dual union all
          select 66 storeid , 1 week_nbr, 15421 net_sales, 337 buns, 155 condiments  from dual union all
          select 66 storeid , 6 week_nbr, 15421 net_sales, 337 buns, 155 condiments  from dual union all
          select 66 storeid , 7 week_nbr, 15421 net_sales, 337 buns, 155 condiments  from dual union all
          select 67 storeid , 1 week_nbr, 28064 net_sales, 625 buns, 283 condiments  from dual union all
          select 67 storeid , 6 week_nbr, 28064 net_sales, 625 buns, 283 condiments  from dual union all
          select 67 storeid , 7 week_nbr, 28064 net_sales, 625 buns, 283 condiments  from dual union all
          select 68 storeid , 1 week_nbr, 22875 net_sales, 493 buns, 238 condiments  from dual union all
          select 68 storeid , 6 week_nbr, 22875 net_sales, 493 buns, 238 condiments  from dual union all
          select 68 storeid , 7 week_nbr, 22875 net_sales, 493 buns, 238 condiments  from dual union all
          select 70 storeid , 1 week_nbr, 26434 net_sales, 562 buns, 248 condiments  from dual union all
          select 70 storeid , 6 week_nbr, 26434 net_sales, 562 buns, 248 condiments  from dual union all
          select 70 storeid , 7 week_nbr, 26434 net_sales, 562 buns, 248 condiments  from dual union all
          select 71 storeid , 1 week_nbr, 14259 net_sales, 297 buns, 133 condiments  from dual union all
          select 71 storeid , 6 week_nbr, 14259 net_sales, 297 buns, 133 condiments  from dual union all
          select 71 storeid , 7 week_nbr, 14259 net_sales, 297 buns, 133 condiments  from dual union all
          select 82 storeid , 1 week_nbr, 24446 net_sales, 469 buns, 210 condiments  from dual union all
          select 82 storeid , 6 week_nbr, 24446 net_sales, 469 buns, 210 condiments  from dual union all
          select 82 storeid , 7 week_nbr, 24446 net_sales, 469 buns, 210 condiments  from dual union all
          select 83 storeid , 1 week_nbr, 13959 net_sales, 280 buns, 104 condiments  from dual union all
          select 83 storeid , 6 week_nbr, 13959 net_sales, 280 buns, 104 condiments  from dual union all
          select 83 storeid , 7 week_nbr, 13959 net_sales, 280 buns, 104 condiments  from dual union all
          select 181 storeid , 1 week_nbr, 13140 net_sales, 273 buns, 136 condiments  from dual union all
          select 181 storeid , 6 week_nbr, 13140 net_sales, 273 buns, 136 condiments  from dual union all
          select 181 storeid , 7 week_nbr, 13140 net_sales, 273 buns, 136 condiments  from dual union all
          select 221 storeid , 1 week_nbr, 27347 net_sales, 546 buns, 289 condiments  from dual union all
          select 221 storeid , 6 week_nbr, 27347 net_sales, 546 buns, 289 condiments  from dual union all
          select 221 storeid , 7 week_nbr, 27347 net_sales, 546 buns, 289 condiments  from dual union all
          select 222 storeid , 1 week_nbr, 16456 net_sales, 379 buns, 148 condiments  from dual union all
          select 222 storeid , 6 week_nbr, 16456 net_sales, 379 buns, 148 condiments  from dual union all
          select 222 storeid , 7 week_nbr, 16456 net_sales, 379 buns, 148 condiments  from dual union all
          select 223 storeid , 1 week_nbr, 20611 net_sales, 439 buns, 165 condiments  from dual union all
          select 223 storeid , 6 week_nbr, 20611 net_sales, 439 buns, 165 condiments  from dual union all
          select 223 storeid , 7 week_nbr, 20611 net_sales, 439 buns, 165 condiments  from dual union all
          select 224 storeid , 1 week_nbr, 21537 net_sales, 420 buns, 173 condiments  from dual union all
          select 224 storeid , 6 week_nbr, 21537 net_sales, 420 buns, 173 condiments  from dual union all
          select 224 storeid , 7 week_nbr, 21537 net_sales, 420 buns, 173 condiments  from dual union all
          select 260 storeid , 1 week_nbr, 19329 net_sales, 380 buns, 196 condiments  from dual union all
          select 260 storeid , 6 week_nbr, 19329 net_sales, 380 buns, 196 condiments  from dual union all
          select 260 storeid , 7 week_nbr, 19329 net_sales, 380 buns, 196 condiments  from dual union all
          select 280 storeid , 1 week_nbr, 20692 net_sales, 512 buns, 202 condiments  from dual union all
          select 280 storeid , 6 week_nbr, 20692 net_sales, 512 buns, 202 condiments  from dual union all
          select 280 storeid , 7 week_nbr, 20692 net_sales, 512 buns, 202 condiments  from dual union all
          select 294 storeid , 1 week_nbr, 26522 net_sales, 481 buns, 252 condiments  from dual union all
          select 294 storeid , 6 week_nbr, 26522 net_sales, 481 buns, 252 condiments  from dual union all
          select 294 storeid , 7 week_nbr, 26522 net_sales, 481 buns, 252 condiments  from dual union all
          select 362 storeid , 1 week_nbr, 20611 net_sales, 317 buns, 221 condiments  from dual union all
          select 362 storeid , 6 week_nbr, 20611 net_sales, 317 buns, 221 condiments  from dual union all
          select 362 storeid , 7 week_nbr, 20611 net_sales, 317 buns, 221 condiments  from dual union all
          select 501 storeid , 1 week_nbr, 28337 net_sales, 518 buns, 273 condiments  from dual union all
          select 501 storeid , 6 week_nbr, 28337 net_sales, 518 buns, 273 condiments  from dual union all
          select 501 storeid , 7 week_nbr, 28337 net_sales, 518 buns, 273 condiments  from dual union all
          select 521 storeid , 1 week_nbr, 26118 net_sales, 438 buns, 257 condiments  from dual union all
          select 521 storeid , 6 week_nbr, 26118 net_sales, 438 buns, 257 condiments  from dual union all
          select 521 storeid , 7 week_nbr, 26118 net_sales, 438 buns, 257 condiments  from dual union all
          select 524 storeid , 1 week_nbr, 31929 net_sales, 582 buns, 247 condiments  from dual union all
          select 524 storeid , 6 week_nbr, 31929 net_sales, 582 buns, 247 condiments  from dual union all
          select 524 storeid , 7 week_nbr, 31929 net_sales, 582 buns, 247 condiments  from dual
    , store_data as
          select 27   storeid,  'County Gate' storename ,    '5601' storenbr ,     'R1-Roosevelt' regionname ,   'D11-Wilcox' districtname , 'VMS' companyname  from dual union all                                                                
          select 67   storeid,  'N. Jackson' storename ,    '0177' storenbr ,     'R1-Roosevelt' regionname ,   'D14-Sandus' districtname , 'VMS' companyname  from dual union all                                                                  
          select 68   storeid,  'Dyersburg' storename ,    '0277' storenbr ,     'R1-Roosevelt' regionname ,   'D14-Sandus' districtname , 'VMS' companyname  from dual union all                                                                  
          select 280   storeid,  'Poplar Ave.' storename ,    '3080' storenbr ,     'R1-Roosevelt' regionname ,   'D12-Smart' districtname , 'VMS' companyname  from dual union all                                                                   
          select 294   storeid,  'Goodman Rd' storename ,    '5702' storenbr ,     'R1-Roosevelt' regionname ,   'D12-Smart' districtname , 'VMS' companyname  from dual union all                                                                     
          select 25   storeid,  'Germantown' storename ,    '5094' storenbr ,     'R1-Roosevelt' regionname ,   'D11-Wilcox' districtname , 'VMS' companyname  from dual union all                                                              
          select 181   storeid,  'Mendehall' storename ,    '4090' storenbr ,     'R1-Roosevelt' regionname ,   'D12-Smart' districtname , 'VMS' companyname  from dual union all                                                                    
          select 31   storeid,  'Winchester' storename ,    '2684' storenbr ,     'R1-Roosevelt' regionname ,   'D11-Wilcox' districtname , 'VMS' companyname  from dual union all                                                                    
          select 41   storeid,  'Washington' storename ,    '4190' storenbr ,     'R1-Roosevelt' regionname ,   'D13-Bowser' districtname , 'VMS' companyname  from dual union all                                                                   
          select 42   storeid,  'Cordova' storename ,    '4393' storenbr ,     'R1-Roosevelt' regionname ,   'D13-Bowser' districtname , 'VMS' companyname  from dual union all                                                                       
          select 70   storeid,  'S. Jackson' storename ,    '0679' storenbr ,     'R1-Roosevelt' regionname ,   'D14-Sandus' districtname , 'VMS' companyname  from dual union all                                                                                                                                                                      
          select 221   storeid,  'Jackson' storename ,    '5500' storenbr ,     'R1-Roosevelt' regionname ,   'D14-Sandus' districtname , 'VMS' companyname  from dual union all                                                                      
          select 223   storeid,  'Highway 51' storename ,    '3485' storenbr ,     'R1-Roosevelt' regionname ,   'D14-Sandus' districtname , 'VMS' companyname  from dual union all                                                        
          select 66   storeid,  'New Summer' storename ,    '2980' storenbr ,     'R1-Roosevelt' regionname ,   'D15-Rickard' districtname , 'VMS' companyname  from dual union all                                                                    
          select 82   storeid,  'Navy Road' storename ,    '1476' storenbr ,     'R1-Roosevelt' regionname ,   'D15-Rickard' districtname , 'VMS' companyname  from dual union all                                                                   
          select 224   storeid,  'New Covington' storename ,    '5397' storenbr ,     'R1-Roosevelt' regionname ,   'D15-Rickard' districtname , 'VMS' companyname  from dual union all                                                              
          select 501   storeid,  'Kirby Quince' storename ,    '6504' storenbr ,     'R1-Roosevelt' regionname ,   'D11-Wilcox' districtname , 'VMS' companyname  from dual union all                                                               
          select 22   storeid,  'Wchstr/Good' storename ,    '2385' storenbr ,     'R1-Roosevelt' regionname ,   'D11-Wilcox' districtname , 'VMS' companyname  from dual union all                                                                  
          select 23   storeid,  'Union Ave' storename ,    '1275' storenbr ,     'R1-Roosevelt' regionname ,   'D13-Bowser' districtname , 'VMS' companyname  from dual union all                                                                 
          select 24   storeid,  'West Poplar' storename ,    '4290' storenbr ,     'R1-Roosevelt' regionname ,   'D11-Wilcox' districtname , 'VMS' companyname  from dual union all                                                                   
          select 222   storeid,  'Thomas St.' storename ,    '1977' storenbr ,     'R1-Roosevelt' regionname ,   'D15-Rickard' districtname , 'VMS' companyname  from dual union all                                                                
          select 362   storeid,  'Wolfchase' storename ,    '5802' storenbr ,     'R1-Roosevelt' regionname ,   'D13-Bowser' districtname , 'VMS' companyname  from dual union all                                                                 
          select 524   storeid,  'Houston Levee' storename ,    '6705' storenbr ,     'R1-Roosevelt' regionname ,   'D15-Rickard' districtname , 'VMS' companyname  from dual union all                                                             
          select 521   storeid,  'G-Town/I-40' storename ,    '6604' storenbr ,     'R1-Roosevelt' regionname ,   'D15-Rickard' districtname , 'VMS' companyname  from dual union all                                                               
          select 38   storeid,  'Horn Lake' storename ,    '4994' storenbr ,     'R1-Roosevelt' regionname ,   'D12-Smart' districtname , 'VMS' companyname  from dual union all                                                                    
          select 39   storeid,  'Macon/Syc' storename ,    '2885' storenbr ,     'R1-Roosevelt' regionname ,   'D13-Bowser' districtname , 'VMS' companyname  from dual union all                                                                    
          select 65   storeid,  'Poplar/Fenwick' storename ,    '2581' storenbr ,     'R1-Roosevelt' regionname ,   'D13-Bowser' districtname , 'VMS' companyname  from dual union all                                                                
          select 71   storeid,  'Humboldt' storename ,    '0785' storenbr ,     'R1-Roosevelt' regionname ,   'D14-Sandus' districtname , 'VMS' companyname  from dual union all                                                                      
          select 83   storeid,  'Mt. Moriah' storename ,    '1174' storenbr ,     'R1-Roosevelt' regionname ,   'D15-Rickard' districtname , 'VMS' companyname  from dual union all                                                                
          select 260   storeid,  'Getwell' storename ,    '1576' storenbr ,     'R1-Roosevelt' regionname ,   'D12-Smart' districtname , 'VMS' companyname  from dual
    select decode(gc,0,companyname, 'VanderbiltFoods') as companyname
    ,       decode(gr,0,regionname,decode(gc,0,companyname, 'VanderbiltFoods')) as regionname
    ,       decode(gd,0,districtname,decode(gr,0,regionname,decode(gc,0,companyname, 'VanderbiltFoods'))) as districtname
    ,       decode(gs,0,storenbr,decode(gd,0,districtname,decode(gr,0,regionname,decode(gc,0,companyname, 'VanderbiltFoods')))) as storenbr
    ,       decode(gs,0,storename,decode(gd,0,districtname,decode(gr,0,regionname,decode(gc,0,companyname, 'VanderbiltFoods')))) as storename
    ,       net_sales
    ,       buns
    ,       condiments
    from    (   select    companyname
                ,         grouping(companyname)     gc
                ,         regionname
                ,         grouping(regionname)      gr
                ,         districtname
                ,         grouping(districtname)    gd
                ,         storenbr
                ,         grouping(storenbr)        gs
                ,         max(storename) storename
                ,         sum(net_sales)            net_sales
                ,         sum(buns)                 buns
                ,         sum(condiments)           condiments
                from store_data  stdata
                inner join sample_data   sampdata on sampdata.storeid  = stdata.storeid
                group by   rollup(companyname, regionname, districtname, storenbr), week_nbr
                order by   companyname nulls first,gc desc, regionname nulls first, gr desc, districtname nulls first, gd desc,storenbr nulls first, gs desc
    /*  --==  INCOMPLETE CODE --
        --== GET TABLE OF CONTENTS In same order as first cursor
        open pc_report_data for
        select   rownum as sortcol
        ,        storenbr
        ,        storename)
        BULK COLLECT INTO pc_TOC
    END create_rpt_and_toc;I don't know sQL developer well enough to view cursor results from stored procedure
    but here is test code from debugger window
    DECLARE
      PC_REPORT_DATA sys_refcursor;
      PC_TOC sys_refcursor;
    BEGIN
      CREATE_RPT_AND_TOC(
        PC_REPORT_DATA => PC_REPORT_DATA,
        PC_TOC => PC_TOC
      -- Modify the code to output the variable
      -- DBMS_OUTPUT.PUT_LINE('PC_REPORT_DATA = ' || PC_REPORT_DATA);
      -- Modify the code to output the variable
      -- DBMS_OUTPUT.PUT_LINE('PC_TOC = ' || PC_TOC);
    END;

    I am currently doing this in the presentation layer but is a lot cleaner and easier to maintain if handled in DB
    I'd googled that suggested this was possible. I had decided on the FETCH. But I've been to avoid FETCH and LOOP
    wherever possible.
    One eample I found: I always try so much stuff, I forget where i got the idea) was:
    -- pseudoscript
    FETCH outer cursor.
        Select outer cursor
        open second cursor for select into and CLOSE Cursor. 
    LOOPI also found this.
    create or replace procedure testproc(c_test out sys_refcursor) is
        begin
          open c_test for select first_name, last_name, email from employees where rownum < 10;
       end;Here though, its a simple select from a table vs. a cursor.
    I thouht it was woth asking the question.

  • Help needed in pushing data into Table view Popup

    Hi All,
    I am trying to create a custom pop up and populate this with Reason code and descriptions. For this, i have created a popup and placed a table view on the popup. But when i am stuck how to push data into the popup from an internal table.
    Any pointers on this will be really helpful.
    Regards,
    Udaya

    Hi,
    Even I am facing the similar issue.  I have created custom component with four views for my requirement and created one view set and displaying the viewset in the pop up screen.  I also created event handler and added required coding to open the pop up screen.
    I have added event handler in BT116H_SRVO component and now the pop up is opend with the required fields but the field is not having any data the value is empty in the pop up screen.  I also binded context node details in the standard component.
    While debugging I found that the collection wrapper is empty, so the data is not populated in the pop up screen.  So kindly hlep me how to fill the collection wrapper and populate data inside the pop up screen.
    kindly let me know how to overcome this issue. 
    Thanks and Regards,
    Kannan.

  • Dynamically passing data into a running while loop from a DAQ assist. in an ouside while loop

    Hello,  I'm currently a student working on a senior project and I'm trying to do a state machine that will turn off and turn on a compressor depending on time and coprocessor failure. 
    In the run state, wich is #1 on the case structure box I placed the DAQ assist.  Which takes in data from an accelerometer.  If the accelerometer's value is above the limit four times it will end the loop or if the time runs out it will end the loop. 
    The problem I am having is that i need to run four compressors.   I was thinking about having four case structures all within the outside loop, but I can only have the DAQ assist in one location.  This means that I now have to move the DAQ assist out of the run loop or run all four compressors in the one case structure.  If i remove the DAQ assist.  I can only get it take in data once when the loop starts and never again.  I understand why, but is there a way to dynamically pass data froma  DAQ assist.  into a running loop? 
    Also on a side note, i can't find a tutorial on how to really create a state machine using Enums.  Does any one know where to find this. 
    I have attached my curent program.
    Thank you for your help,
    Ryan
    Attachments:
    TEST STAND STATE MACHINE 2-28-07.vi ‏288 KB

    in labview choose file->new... then pick standard state machine and there are instructions.
    you can create a custom control and either use an enum, text ring or menu ring.  Edit the values and then save the control and drop into your vi and you can wire this to your case structure
    - James
    Using LV 2012 on Windows 7 64 bit

  • Passing data into a variable

    Hi, 
    All I want to do is pass numerical data into a variable, and then access it later. 
    Specifically, I use the Read Vector Space Position VI to find the X and Y positions of my motors. When I press a button, I want the X and Y position at that moment to be saved, so that I can access this information later.
    I would like to do this in a subVI.
    I have read tutorials on functional global variables, but so far they have been quite confusing. Specifically I do not know how to place/use uninitialized shift registers. 
    If someone could create a simple example code, that would be extremely helpful. I am using Labview 2011.
    Thanks

    Action Engine <- must read nugget
    If you don't understand shift registers...
    3 Hour Introduction
    6 Hour Introduction
    LabVEW Basics
    Self Paced training for students
    Self Paced training beginner to advanced, SSP Required
    LabVIEW Wiki on Training
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to pass date into a sp?

    Hi,
    Could anybody know how to pass a parameter of type date into a
    sp? Below are something I tried:
    1.
    create or replace package empTest AS
         PRAGMA SERIALLY_REUSABLE;
         TYPE curType IS REF CURSOR;
         function Details (
              hd date)
              RETURN curType;
    END;
    CREATE OR REPLACE PACKAGE BODY empTest AS
         PRAGMA SERIALLY_REUSABLE;
    function Details (
              hd date)
              RETURN curType IS
              sum_cv curType;
         err_num NUMBER;
         err_msg     VARCHAR2(200);
         sql_statement VARCHAR2(3000);
    BEGIN
    DBMS_OUTPUT.PUT_LINE(hd);
         sql_statement :=' SELECT * from emp where hiredate <
    to_date(''hd'', ''Dd-Mon-YY'') ';
    DBMS_OUTPUT.PUT_LINE(sql_statement );
         OPEN sum_cv FOR sql_statement ;
         IF NOT sum_cv%ISOPEN THEN
              OPEN sum_cv FOR sql_statement;
         END IF;
         RETURN sum_cv;
    END Details ;
    END;
    RUN      EXEC      :CV := empTest.Details('10-DEC-01');
    ORA-01858: a non-numeric character was found where a numeric was
    expected
    2. sql_statement :=' SELECT * from emp where hiredate <
    to_date(hd) ';
    Run in the same way:
    ORA-00904: invalid column name
    3. sql_statement :=' SELECT * from emp where hiredate < to_date
    (''hd'') ';
    Run in the same way:
    ORA-01858: a non-numeric character was found where a numeric was
    expected
    Thanks

    Use the call syntax ...
    empTest.Details(to_date('10-DEC-01','DD-MON-RR'));
    .. or better yet ...
    empTest.Details(to_date('10-DEC-2001','DD-MON-YYYY'));
    As you are passing a date you do not need to use the to_date function in the cursor SQL statement.

  • Passing Data into Subreport

    Hello,
    I am using Crystal 10. I am wondering if it is possible to pass data from a report into a subreport for calculations.
    Thank you.

    Hi Sabian,
    You can pull sub report information and use in main report, while getting the data from sub report to main please take care of the following :
    --Your sub report should be placed above your calculations in main report. ie. after processing of your sub report only you get data into your main report.
    --While writing formulas in sub report or in main report you will have to use Whileprintingrecords; to get get data into your shared variables. Eg:
    Whileprintingrecords;
    shared numbervar x;
    x:=x+fieldvalue;
    --When you create a formula in sub report it should be plced on your sub report, use the same variable name while creating a formula in main report.
    Make sure that the shared variable which you are calling in the main report should be in the below section of the sub report. If you want to pass the sub report to the main report in the same section then insert section below the sub report
    Hope this helps
    Regards,
    Shweta

  • Insert form view data into table view

    Hi Experts,
      I have
                 --> a form view with three input fields and a button(ADD)
                 --> a table view with three columns.
    Both views in same page.
    My requirement is when a user enters the three inputs and click button (ADD) all the inputs entered should be inserted in the below table view.
    User can be able to enter multiple lines by clicking ADD again and again with different inputs.
    How to insert rows from a form view event (ADD) into table view?
    Thanks&Regards,
    karthik

    Hi
    Which 'System Action' are you using in the 'Add' button? You need to use 'Insert Row' Action. When you select this below the action you will get one box 'Apply To' there you select the table. Then save & deploy the model, you will get what you want.
    Caution - THis data will not get stored in the table permenently, once you close this model you will loose all the data.
    Regards
    Sandeep

  • Inserting data into relational views of object tables

    I hope someone could help me to solve the following problem:
    I would like to design an object-relational database in O8i. Unfortunatly the client-software (GIS) can only understand relational data (except the object type 'geometry'). So I created relational views on my object tables. But now it is not possible to insert data in those views. Do I have to create triggers on those views for inserting data ???
    Nevertheless: Updating data in views makes no problems.
    Thank you for reading this and I look foreward to hearing from you soon.
    Christian Heil

    Hi Mohammed,
    I guess following is your requirement
    List1 tile is attached to "BOList1". On button press you wanted the data to be persisted to Business object "BOList1History"
    I assume that you have created "BOLIst1History" properly by associating a write Bdoc etc etc.
    Write a method in Business object "BOList" called ZUpdateHistory. This new method should contain code for creating an instance of "BOLIST1History" and fill the property values as per your requirement. Call this method from the Button press event as follows
    anchor.bo.ZUpdateHistory
    Hope this helps
    Regards
    Ganesh Datta

Maybe you are looking for

  • Can no longer download or update from the mac app store.

    I get the error, The application could not be downloaded. The installation could not be started. However, my internet connection is fine. I tried deleting my safari, iTunes and app store caches to no effect. Any suggestions?

  • Image Processor in CS5

    Why when I'm in Bridge and use the image processor, it's not closing the files after processing in Photoshop cs5? It did about a day or so ago and now all of a sudden it wont.

  • How to get, from a remote application, list of groups & users?

    I need to get list of groups, and users in a group, and profile of a user of weblogic from a remote application. Do I need to use classes from com.bea.p13n.security.management.authentication? How?

  • Dynamic Listing without Business View

    I have made two dynamic fields in my report and i published tha same on BOXI server. There those dynamic values got create in repository and working perfectly fine. But when i tried to run the same report which is on BO server into my local crystal r

  • How to use transaction SOST & SCOT for checking Email performance ?

    How to use transaction SOST & SCOT for checking Email performance ? what exactly as CRM Functional we have to do in above transaction . Please guide me . what is significance of these transaction ? Regards, Anup Reche