Use same table twice in subform

Hi,
i´ve created a form like this
subformA   -> positioned
--subformB -> flowed
table
header
body row
Everything is working fine and a I´m able to see the expected data.
But when my table includes more than 10 rows it destroys the layout of my page.
My idea:
Create a second subform with same table data and place it right beside it. And using FormCalc to show data from row 11 to end.
But only the first subform is filled. There is no data in second subform (FormCalc code is not implemented).
It seems, that I can´t use same tabele twice.
Any ideas?
Regards
Andy

Hi Andy,
Have both the subforms as flowed and page breaked, it should work.
As per as having 2 tables techically i believe its not possible.reason behind.
When you do data binding for 1st table and say multiple rows, at runtime data is iterated and displayed in the 1st table.
when it reaches to the 2nd table the pointer on the table data source is already eof i.e., last record so it will not display it again.
to acheive this on form load of the 2nd table you need to initialize and iterate through the data source again.
I have never tested this scenario but read it in some adobe fourms.
Check it and let me know, if its still not working i can design a sample form with this scenario for you.
Cheers,
Sai

Similar Messages

  • Cost of using subquery vs using same table twice in query

    Hi all,
    In a current project, I was asked by my supervisor what is the cost difference between the following two methods. First method is using a subquery to get the name field from table2. A subquery is needed because it requires the field sa_id from table1. The second method is using table2 again under a different alias to obtain table2.name. The two table2 are not self-joined. The outcome of these two queries are the same.
    Using subquery:
    select a.sa_id R1, b.other_field R2,
    (select b.name from b
    where b.b_id = a.sa_id) R3
    from table1 a, table2 b
    where ...Using same table twice (table2 under 2 different aliases)
    select a.sa_id R1, b.other_field R2, c.name R3
    from table1 a, table2 b, table2 c
    where
    c.b_id = a.sa_id,
    and ....Can anyone tell me which version is better and why? (or under what circumstances, which version is better). And what are the costs involved? Many thanks.

    pl/sql novice wrote:
    Hi all,
    In a current project, I was asked by my supervisor what is the cost difference between the following two methods. First method is using a subquery to get the name field from table2. A subquery is needed because it requires the field sa_id from table1. The second method is using table2 again under a different alias to obtain table2.name. The two table2 are not self-joined. The outcome of these two queries are the same.
    Using subquery:
    Using same table twice (table2 under 2 different aliases)
    Can anyone tell me which version is better and why? (or under what circumstances, which version is better). And what are the costs involved? Many thanks.In theory, if you use the scalar "subquery" approach, the correlated subquery needs to be executed for each row of your result set. Depending on how efficient the subquery is performed this could require significant resources, since you have that recursive SQL that needs to be executed for each row.
    The "join" approach needs to read the table only twice, may be it can even use an indexed access path. So in theory the join approach should perform better in most cases.
    Now the Oracle runtime engine (since Version 8) introduces a feature called "filter optimization" that also applies to correlated scalar subqueries. Basically it works like an in-memory hash table that caches the (hashed) input values to the (deterministic) correlated subquery and the corresponding output values. The number of entries of the hash table is fixed until 9i (256 entries) whereas in 10g it is controlled by a internal parameter that determines the size of the table (and therefore can hold different number of entries depending on the size of each element).
    If the input value of the next row corresponds to the input value of the previous row then this optimization returns immediately the corresponding output value without any further action. If the input value can be found in the hash table, the corresponding output value is returned, otherwise execute the query and keep the result combination and eventually attempt to store this new combination in the hash table, but if a hash collision occurs the combination will be discarded.
    So the effectiveness of this clever optimization largely depends on three different factors: The order of the input values (because as long as the input value doesn't change the corresponding output value will be returned immediately without any further action required), the number of distinct input values and finally the rate of hash collisions that might occur when attempting to store a combination in the in-memory hash table.
    In summary unfortunately you can't really tell how good this optimization is going to work at runtime and therefore can't be properly reflected in the execution plan.
    You need to test both approaches individually because in the optimal case the optimization of the scalar subquery will be superior to the join approach, but it could also well be the other around, depending on the factors mentioned.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Upgrading to Mountain Lion using free upgrade, download froze halfway, tried again and unable to use same code twice. Please help?

    Upgrading to Mountain Lion using free upgrade, download froze halfway, tried again and unable to use same code twice. Is there a way I can get a new code without having to submit other information (scan/photo of proof of purchase)?

    Open the App Store and navigate to the Purchases tab. You should see Mountain Lion there. You can click there to restart the download.

  • Inserting to a table using same table and master table

    [code]
    I have a table  test_master where I have stored the status of the individual claims  ; the status would be changed quarterly basis.
    I have another table test_detail which will store status chages on each quarter.The curr_status column will store the status from test_master; and  prev_status will be the curr_status for the previous  trans_id from test_detail table itself
    create table test_master( claim_id number,
                            status varchar2(10));
    insert into  test_main VALUES (100, 'L1');                
    insert into  test_main VALUES (101, 'L2');   ---- first quarter data.. it will be purged at the begining of second quarter
    insert into  test_main VALUES (102, 'L1');
    insert into  test_main VALUES (103, 'L3');
    insert into  test_main VALUES (100,  'L2');
    insert into  test_main VALUES (101,  'L2');    ---- second quarter data.. it will be purged at the begining of third quarter  
    insert into  test_main VALUES (102,  'L1');
    insert into  test_main VALUES (103,  'L4');
    insert into  test_main VALUES (100,  'L4');
    insert into  test_main VALUES (101,  'L5');    ---- third quarter data.. it will be purged at the begining of fourth quarter  
    insert into  test_main VALUES (102,  'L6');
    insert into  test_main VALUES (103,  'L7');
    create table test_detail( trans_id number,
                              claim_id number,
                              prev_status varchar(20),
                              curr_status varchar2(21
    prev_status =  curr_status of  the previous id for same claim_id s
    curr_status =  status from TEST_MASTER
    how to write an insert statement to insert records in TEST_DETAIL to have below expected data?
    id     claim_id       PREV_STATUS      CURR_STATUS
    1          100                               null               L1    ---prev_status will be null for the first run
    1          101                               null               L2
    1          102                               null               L1
    1          103                               null               L3
    2          100                               L1                L2
    2          101                               L2                L2
    2          102                               L1                L1
    2          103                               L3                L4
    3          100                               L2                L4
    3          101                               L2                L5
    3          102                               L1                L6
    3          103                               L4                L7
    [/code]
    Thanks
    -Ann

    Hi,
    Do you really need to store prev_status in test_detail?  You can always compute it on the fly, using the analytic LAG function, and you won't have to worry about re-computing it when test_detail is updated.
    If test_detail will never be updated, and performance is important, then you may want to store prev_status.  Here's one way to do that.
    When you're ready to archive the data from test_main, then run this INSERT statement:
    INSERT INTO test_detail (trans_id, claim_id,  prev_status,      curr_status)
               SELECT        &2,     m.claim_id,  d.curr_status,    m.status
               FROM             test_main    m
               LEFT OUTER JOIN  test_detail  d  ON   d.claim_id  = m.claim_id
                                                AND  d.trans_id  = &1
    Where &1 is the previous trans_id (the highest value already in test_detail), and &2 is the new trans_id (&1 + 1).
    The first time you run this, when test_detail is empty, it doesn't matter what value you use for &1; you can use 0.
    After you've confirmed that this worked, then you can start putting new data into test_main.
    I assume that test_master and test_main are the same table.

  • Using same image twice

    I want to use the same image twice, one in colour, the other black and white. But when I use the monochrome mixer, both images in the book turn to b/w. Do I have to import two separate images?

    Using the right click menu (or shortcut key) duplicate the version - using the top stack menu extract item from the stack, make it b+w, drag it to the book and viola.
    RB

  • Namedquery using same table field multiple times with the use of a label

    Hi all,
    i'm having some trouble with a namedquery. I'm trying to
    use the following namedquery in Toplink to retrive some
    data out of a database.
    select proj.id
    , proj.code
    , proj.name
    , proj.budget
    , proj.status
    , proj.startdate
    , proj.enddate
    , proj.mdr_id projleader_id
    , med_leader.name projleader
    , proj.mdr_id_valt_onder promanager_id
    , med_promanager.name promanager
    , proj.mdr_id_is_account_from accmanager_id
    , med_accmanager.name accmanager
    from uur_projecten proj
    , uur_medewerkers med_leader
    , uur_medewerkers med_promanager
    , uur_medewerkers med_accmanager
    where ( #p_name is not null or #p_search_string is not null )
    and med_leader.id = proj.mdr_id
    and ( proj.mdr_id = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_valt_onder = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_is_account_van = nvl( #p_name, proj.mdr_id ))
    and (( #p_status is not null
    and substr( proj.status, 1, 1 ) = upper( #p_status ))
    or ( #p_status is null ))
    and ( upper( proj.code ) like upper( '%' || #p_search_string || '%' )
    or upper( proj.name ) like upper( '%' || #p_search_string || '%' ))
    and med_promanager.id = proj.mdr_id_valt_onder
    and med_accmanager.id = proj.mdr_id_is_account_van
    order by decode( substr( proj.status, 1, 1 )
    , 'A', 2, 'T', 3, 'F', 4, 1 ), proj.code desc
    As you all can see the table ‘uur_medewerkers’ is been used trice to
    determine the name for the corresponding ID. I have a Java class with
    the fields for the results and created a Toplink descriptor to map
    the fields to the database fields.
    The problem is that for the 'projleader', 'promanager' and 'accmanager'
    fields the results are null. The reason is probably that Toplink doesn't
    recognize the fields because of the label for the tables.
    Is there a way to make this work?
    Greets, René

    Post Author: quafto
    CA Forum: .NET
    Your query is not too clear so I'll do my best to answer it broadly.
    You mentioned that you have a .NET web application where your users enter data on one screen and then may retrieve it on another. If the data is written in real time to a database then you can create a standard Crystal Report by adding multiple tables. The tables should be linked together using the primary and foreign keys in order to optimize the database query and give you a speedy report. Using unlinked tables is not recommended and requires the report engine to index the tables (it is quite slow).
    You also mentioned you have a "PropID" to be used in a WHERE clause. This is a great place to use a parameter in your report. This parameter can then be used in your record selection formula inside Crystal Reports. The report engine will actually create the WHERE clause for you based on the parameter value. This is helpful because it allows you to simply concentrate on your code rather than keeping track of SQL queries.
    Now, what Crystal does not do well with is uncertainty. When you design a report with X number of tables the report engine expects X number of tables to be available at processing time. You should not surprise the print engine with more or less tables because you could end up with processing errors or incorrect data. You may need to design multiple reports for specific circumstances.
    Regarding the group expert question. I'm not sure how you would/could use the group expert to group a table? A table is a collection of fields and cannot be compared to another table without a complex algorithm. The group expert is used to group and sort records based on a field in the report. Have a look at the group expert section of the help file for more information.
    Hopefully my comments have given you a few ideas.

  • Using same cell twice in one formula

    Example: (B2+B3)*(B2/B4)
    If I want to use B2 twice in the same formula, numbers does not accept the second entry of B2. Any solution to this irritating problem?

    Geert,
    If you are clicking on cells to enter them as references in an expression, you must hold down the Command (Apple) key if you want to enter (click on) the same cell a second time in the same expression. Of course you are always able to type the reference into the Formula Bar entry area as many times as you wish without any special gestures.
    Jerry

  • Using Same Photo Twice (iLife 11 Photobook)

    Hi,
    I was making a Photobook using iLife '11. I had the photos selected and used one for the cover picture. I went to use the photo again later in the book but was unable to. Has anyone else experienced this and if so, any solutions ??
    Thanks

    No - I have done it in previous versions and it works just fine
    And I just did it in '11 with no problem - how are you trying to do it and what happens?
    I picked a blank page and double clicked on it to open it and drug the cover photo form the photos sidebar to a spot on that page and now the cover and that page have the same photo on it.
    LN

  • Using same photo twice in book w/ iPhoto6

    I want to use a photo on the cover that I have used inside my book. Is there a way to do this without making a duplicate and therefore importing a copy into my Library? Seems that I saw that there was an easy way to do this at some point.

    No. You'll have to make a duplicate. That was changed in iPhoto 7.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Outer/Cartesian Join using same table

    Hi All,
    I'm needing to write a query, which is kind of like an outer join/cartesian join that essentially tags each customer in my database with a flag indicating whether they have received a particular product for a given year. There are 8 products so for each distinct customer_id in my database I want 8 records, with a 'Yes' or 'No' indicating whether they have received this product or not. Currently, for a given year, if a customer only receives 2 out of the 8 products there will be two records for that individual but I want 8 records for each individual so that each product is shown to either have been received or not received by the customer. This is the table format I'm looking for:
    CUSTOMER_ID     PRODUCT_CD     PRODUCT_RECEIVED_FLAG     YEAR
    999999999     1     Y     2010
    999999999     2     N     2010
    999999999     3     N     2010
    999999999     4     N     2010
    999999999     5     N     2010
    999999999     6     N     2010
    999999999     7     Y     2010
    999999999     8     Y     2010
    888888888     1     N     2010
    888888888     2     N     2010
    888888888     3     Y     2010
    888888888     4     Y     2010
    888888888     5     N     2010
    888888888     6     N     2010
    888888888     7     Y     2010
    888888888     8     Y     2010
    777777777     1     Y     2010
    777777777     2     Y     2010
    777777777     3     Y     2010
    777777777     4     Y     2010
    777777777     5     Y     2010
    777777777     6     Y     2010
    777777777     7     N     2010
    777777777     8     N     2010Thanks,
    Ed

    I am in good mood today ;) :
    with customer as (
                      select '999999999' customer_id from dual union all
                      select '888888888' from dual union all
                      select '777777777' from dual
          product as (
                      select level product_cd from dual connect by level <= 8
           orders as (
                      select '999999999' customer_id,1 product_cd,2010 year from dual union all
                      select '999999999',7,2010 from dual union all
                      select '999999999',8,2010 from dual union all
                      select '888888888',3,2010 from dual union all
                      select '888888888',4,2010 from dual union all
                      select '888888888',7,2010 from dual union all
                      select '888888888',8,2010 from dual union all
                      select '777777777',1,2010 from dual union all
                      select '777777777',2,2010 from dual union all
                      select '777777777',3,2010 from dual union all
                      select '777777777',4,2010 from dual union all
                      select '777777777',5,2010 from dual union all
                      select '777777777',6,2010 from dual union all
                      select '777777777',7,2010 from dual union all
                      select '777777777',8,2010 from dual
    -- end of on-the-fly data sample
    select  c.customer_id,
            p.product_cd,
            nvl2(o.product_cd,'Y','N') product_received_flag,
            y.year
      from       customer c
            cross join
                 product p
            cross join
                 select  distinct year
                   from  orders
                ) y
            left join
                orders o
              on (
                      c.customer_id = o.customer_id
                  and
                      p.product_cd = o.product_cd
                  and
                      y.year = o.year
      order by y.year,
               c.customer_id desc,
               p.product_cd
    CUSTOMER_ PRODUCT_CD P       YEAR
    999999999          1 Y       2010
    999999999          2 N       2010
    999999999          3 N       2010
    999999999          4 N       2010
    999999999          5 N       2010
    999999999          6 N       2010
    999999999          7 Y       2010
    999999999          8 Y       2010
    888888888          1 N       2010
    888888888          2 N       2010
    888888888          3 Y       2010
    CUSTOMER_ PRODUCT_CD P       YEAR
    888888888          4 Y       2010
    888888888          5 N       2010
    888888888          6 N       2010
    888888888          7 Y       2010
    888888888          8 Y       2010
    777777777          1 Y       2010
    777777777          2 Y       2010
    777777777          3 Y       2010
    777777777          4 Y       2010
    777777777          5 Y       2010
    777777777          6 Y       2010
    CUSTOMER_ PRODUCT_CD P       YEAR
    777777777          7 Y       2010
    777777777          8 Y       2010
    24 rows selected.
    SQL> SY.
    P.S. Code assumes at least one customer ordered at least one product within each year. Otherwise you will need year table.
    Edited by: Solomon Yakobson on Oct 28, 2011 2:36 PM

  • Query - Get data from the same table and field two times on a single line

    I have prepared a query showing the bill of material. At each line each component will be a new line and I want to have the description of the material at the top (the master material composed of the component ones) and also the description of the component materials on the same line. This means that I should be able to use MAKT table 2 times on a single line of the query. I have used the query tool with SQ01 and SQ02 tcodes. How can I get the the description of the material at the top and also the description of the component material on a single line?
    Thanks in advance for the answers.

    Yasar,
    Any time you wish to use a table twice in an SQ01 query, you have to create an alias.
    SQ02 > select the infoset, 'change' > go to Join definitions.
    Select 'Alias' button.  Create. Select your table name (such as MAKT) and define an alias, such as 'COMP_MAKT' for component descriptions.
    Now you can insert the Alias table into your infoset just like it was a regular table, and use standard join method to join COMP_MAKT to your component material number.
    Best regards,
    DB49

  • Problem with the sames tables in the same report

    Hi friends,
             I have a report with the same table twice. One with the original name (Company) and the second with alias (Company_A). This report wants to show a "tree" of companies. With code I get a Dataset    and I fill the report with it. This Dataset    have two tables the original and the alias table with one and two rows expletively. The data is correct is what we expect that the report will show but this not occurs. He only see the rows of the original table and if you get more than one row in it he try a Cartesian product and we see invalid results. Can I fill the report with the correct rows to show in the report? Is there any other possibility? To help I put an example:
    Fields of table Company as original table in the report: Company.
    Fields of table Company as alias table (Company_A) in the report: Company and OriginCompany.
    There is a relation between Company and Company_A through the field Company (original alias) and OriginCompany (alias table).
    The dataset    is like this:
    Table Company: one row --> Company1.
    Table Company_A: two rows --> Company1a, Company.
                                                   Company2a, Company.
    Then the report only shows the rows of the original table Company but no trace of the alias table Company_A
    If someone can help me thanks and if not also!!!
    Edited by: JuliaRomero on Jun 1, 2009 4:30 PM

    Use two connections not one when you are embedding one result set in another.
    If you are embedding one in the other also consider using a join which is faster and requires less code.

  • Selecting two different Names using the same table with same field

    Hello,
    I am trying to display several fields from different tables. Here are some of the fields that I need: The instructor needs to go after the social.
    WESL | ENGR-1101-SW1 | Hinojosa | Ashley | Social | Instructor |
    I am using a table where they have the social and I need to get both the student and the instructor. How do I select the instructor when the instructor's id is on a different table. example
    CLASS PERSON CLASS_ASSIGN
    student_id student_id: name facutly_id
    Here is the code that I have so far and it works.
    rem ----------------
    rem Filename: cer.sql
    rem Purpose: to get data from banner and put into flat file
    rem Date: August 17, 2006 4:51 P.M.
    rem Author: Robert Hernandez
    rem ---------------
    rem Notes: Need to add the Instructor - having problems
    rem using the same spriden_id.
    rem Also need to have admissions enter the grad date for
    rem several students: Procedure is working as is.
    declare
    l_output utl_file.file_type;
    grad_month varchar2(2);
    buffer varchar2(1000);
    cursor cursor1 is
    select ssrmeet_bldg_code,
    ssbsect_subj_code,
    ssbsect_crse_numb,
    ssbsect_seq_numb,
    spriden_last_name,
    spriden_first_name,
    spriden_id,
    scbcrse_title,
    ssbsect_term_code,
    sfrstcr_grde_code,
    sorhsch_graduation_date,
    decode(substr(sorhsch_graduation_date,4,3),'JAN','01',
    'FEB','02',
    'MAR','03',
    'APR','04',
    'MAY','05',
    'JUN','06',
    'JUL','07',
    'AUG','08',
    'SEP','09',
    'OCT','10',
    'NOV','11',
    'DEC','12') as grad_month,
    sorhsch_sbgi_code
    from ssbsect,ssrmeet,sfrstcr,spriden,scbcrse,sorhsch
    where rownum < 200
    and ssbsect_seq_numb like 'S%'
    and (ssrmeet_term_code = ssbsect_term_code
    and ssrmeet_crn = ssbsect_crn)
    and (ssbsect_crn = sfrstcr_crn
    and sfrstcr_pidm = spriden_pidm
    and length(spriden_id) = 9
    and substr(spriden_id,1,1) <> 'A')
    and (ssbsect_crse_numb = scbcrse_crse_numb
    and ssbsect_subj_code = scbcrse_subj_code)
    and spriden_pidm = sorhsch_pidm
    and sorhsch_graduation_date is null
    order by ssbsect_crse_numb;
    begin
    l_output := utl_file.fopen('CER','rbfpce.txt','W');
    for cur1_rec in cursor1 loop
    buffer:= cur1_rec.ssrmeet_bldg_code||'|'||
    cur1_rec.ssbsect_subj_code||'-'||
    cur1_rec.ssbsect_crse_numb||'-'||
    cur1_rec.ssbsect_seq_numb||'|'||
    cur1_rec.spriden_last_name||'|'||
    cur1_rec.spriden_first_name||'|'||
    substr(cur1_rec.spriden_id,1,3)||'-'||
    substr(cur1_rec.spriden_id,4,2)||'-'||
    substr(cur1_rec.spriden_id,6,4)||'|'||
    cur1_rec.scbcrse_title||'|'||
    cur1_rec.ssbsect_term_code||'|'||
    cur1_rec.sfrstcr_grde_code||'|'||
    '20'||SUBSTR(cur1_rec.sorhsch_graduation_date,8,2)||
    cur1_rec.grad_month||'|'||
    cur1_rec.sorhsch_sbgi_code;
    utl_file.put_line(l_output,buffer,false);
    end loop;
    utl_file.fclose(l_output);
    exception
    when no_data_found then
    utl_file.fclose(l_output);
    end;
    /

    Can you be more precise , please :
    - which table stores the people identities ? (I call this one Identity)
    - which table gives the class where the student works in (I cal l this one Claa_attendees)
    - which table gives the instructor of a class (I call this one Class)
    If your issue is that you have one table which stores Itendities , and you need to display Student identity and Instructor Identity, you have to call this table twice in your query , using table aliases . I mean :
    Select Stud_iden.name, Instr_iden.name
    From Identity Stud_iden, Identity Instr_iden, Class_attendees, Class
    Where Class.clas_id = class_attendees.class_id
    and class.instructor_id = Instr_iden.people_id
    and class_attendees.student_id = Stud_iden.people_id
    Is this what you need to do ?

  • How to use same taskFlow with inputparam twice on page

    Hi,
    I have 2 taskFlows (Task1, Task2) with imputParams and CallMethod default activity.
    Tsak1 is form, task2 is table.
    I need to use Taskflow 1 twice on same page.
    TaskFlow1(without param)-taskFlow2(get param from taskflow1)-TaskFlow1(get param from taskFlow2).
    Based on this example [http://andrejusb.blogspot.com/2010/04/communicating-between-adf-regions.html]
    If shared data control is checked - taskFlow1's refresh both like copy.
    If unchecked - region's doesn't refresh and taskFlow2 can't use inputParam like #{data.taskFlowTest_view_view3PageDef.Oid.inputValue} (because i have 2 same taskFlow with this param).
    Can I use one taskFlow for this and how?

    For the Taskflow, set the data control scope for the task flow to "isolated" change the behavior.
    Thanks,
    Navaneeth

  • Same target operator (table) twice in mapping

    Can I use the same table operator as target twice in two different places in the same mapping?

    Yes.
    Regards:
    Igor

Maybe you are looking for