5 Replies Latest reply: May 3, 2013 2:09 AM by fac586 RSS

    Hiding field in a column (report layout)

    r12appsuser
      below is my requirement.

      I have a page based on report template (classic sql report updatable) . One of the column is a text input. this text field should only be enabled to enter values for certain records based on the values of other field value in the record. I am able to either disable entire column or enable entire column but could not disable for specific rows. example

      col1 col2 co3
      r1 a x input text filed=enable ( if col1=a)
      r2 b x input text filed=diable/do not display ( if col1 <> a)
      r3 b x input text filed=diable/do not display ( if col1 <> a)
        • 1. Re: Hiding field in a column (report layout)
          scott.wesley
          You will need to render the column as 'standard report column', sourced in your SQL via apex_item.text()
          http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CACEEEJE
          Those that are not displayed should use apex_item.hidden

          Add the condition in your SQL column for each row using a CASE statement.

          Scott
          • 2. Re: Hiding field in a column (report layout)
            r12appsuser
            Hi Scott -- i followed your instructions..but

            When I do this I am getting the html printed instead of text box

            <input type="text" name="f10" size="20" maxlength="2000" value="" />

            below is my select for the last column

            CASE WHEN asset_number ='XXENGINE'
            then APEX_ITEM.TEXT(10,null)
            ELSE APEX_ITEM.TEXT( p_idx=>10,p_attributes=>'disabled')
            END meter_field


            Do i have to do any thing in the report properties ? I thought this should return as text box instead its printing the html tags in the last column cell
            • 3. Re: Hiding field in a column (report layout)
              fac586
              anakkala wrote:
              Hi Scott -- i followed your instructions..but

              When I do this I am getting the html printed instead of text box

              <input type="text" name="f10" size="20" maxlength="2000" value="" />

              below is my select for the last column

              CASE WHEN asset_number ='XXENGINE'
              then APEX_ITEM.TEXT(10,null)
              ELSE APEX_ITEM.TEXT( p_idx=>10,p_attributes=>'disabled')
              END meter_field


              Do i have to do any thing in the report properties ? I thought this should return as text box instead its printing the html tags in the last column cell
              Set the Display Text As report column attribute to Standard Report Column rather than the default Display as Text (escape special characters).
              • 4. Re: Hiding field in a column (report layout)
                r12appsuser
                yes it worked.. thanks!
                • 5. Re: Hiding field in a column (report layout)
                  fac586
                  anakkala wrote:
                  yes it worked.. thanks!
                  If this problem is solved, please close the thread, marking it as answered so it doesn't appear as an open thread on the forum. Same goes for any of your other questions that are now resolved:

                  Handle: anakkala
                  Status Level: Newbie
                  Registered: Jul 16, 2010
                  Total Posts: 24
                  Total Questions: 17 (16 unresolved)