6 Replies Latest reply on May 7, 2012 12:07 PM by 635644

    Tabular form problem

      Hi All,

      For our customer we want to create an tabular form so everyone can booked his hours in our database.

      The tabular form looks like:
      Activity     Mo     Th     We     Th     Fr     Sa     Su
      Example     1     3     8     1     5          
      Example2     3     5     0     7     2          

      An booked hour can have a different hour type.

      Now we want to create for every hour type an totals row under the last availalable row. It should like this:
      Activity     Mo     Th     We     Th     Fr     Sa     Su
      Example     1     3     8     1     5     3     
      Example2     3     5     0     7     2 4

      Total 1     1     3     8     1     5     3     
      Total 2     3     5     0     7     2          4

      The default totals row, of the tabular form, I cannot use because I have to show multiple total rows.

      I also tried to create an new region with the totals. Then I've got 2 problems.
      The first problem is the lay-out. I would like to show the totals exactly under the day value. When I use an default report (with standard report columns) then it's highly impossible to do this (and if I try it in Firefox and in IE then it will not look the same). When I use text fields instead of standard report columns then the lay-out is perfect but then my tabular will not work anymore (Problem 2).

      It seems that if I create a new region with textfield (also if I disable them) that the name of the field (F01, F02 etc.) could be the same as the name of the textfields in the tabular form. If never read where I can change this name.

      Have somebody a solution for this problem?

      I'm using Oracle 11G with APEX version 4.1

      Thanx in advance!
        • 1. Re: Tabular form problem

          Can you please put this on apex.oracle.com so that someone can have a look and see?

          • 2. Re: Tabular form problem

            I've created an example on http://apex.oracle.com/pls/apex/f?p=27034:1

            What you can see here is one tabular form and one report. If you look at the name of the items in the report than you'll see that these are exactly the same as the name of the items in the tabluar form. And you can see that the tabular form is not working anymore

            If I use the 'normal' report columns then it's hihgly impossible to get the totals straight under the corresponding day (as you can see on report 3).

            I also tried to create page items (these items has a different name as the tabular form) and to put them in the right position with   but this is a quick and dirty solution and it's not working in IE8.

            Thanx for your help!

            Edited by: Hamertje16 on May 7, 2012 11:41 AM
            • 3. Re: Tabular form problem
              You have this problem because you created the lower (Totals) report as a report and then made the columns enterable (Text field).

              As a consequence, the Tabular Form as well as Totals Report have columns with names f01, f02, etc. This is why the tabular form has failed.

              What you should do is change the query of the Totals report as use APEX_ITEM API in it to create your fields. And while doing so use numbers beyond 12 in the APEX_ITEM parameter p_idx. That is because you are using upto f12 in the Tabular form.

              1 person found this helpful
              • 4. Re: Tabular form problem
                Hi Prabodh ,

                Thanx for your reply. That was the trick I missed :). The name of the items are now not corresponding anymore with the items of the tabular form.

                Unfortenally, when I tried to submit he gaves me the answer Sorry!The page requested was not found. When I disabled the report than it works fine...

                Any idea how I can fix this? Is there a possible way to exclude these items from processing the data?
                • 5. Re: Tabular form problem
                  As stated in my earlier post, use the APEX_ITEM.TEXT API as described here http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_item.htm#CHDDCHAF.

                  Be sure that you use p_idx values greater than 12.

                  Once you do that the standard AppyMRU will not process the f13 onwards. You will have to process f13 onwards using your custom MRU, and in your MRU you use APEX_APPLICATION.G_F13 onwards.
                   -- DO YOUR INSERTS/UPDATES HERE
                  END LOOP;
                  • 6. Re: Tabular form problem

                    My problem was that I've numbered the columns with a value above the 50. Now I used number 13..20 and now it works.