How to Hide Column

Hello,
How can I hide columns within an AdvancedTable programmatically? Ex. All columns shall be shown if the value of my dept is "Dept1" while only Column1 to 2 shall be shown if my dept is "Dept2"? Pls advise. thanks

As Kumar rightly pointed out, you need to refer the Dev guide for this. Refer the section on Partial Page Rendering.
To summarize you would have the Rendered Property on the columns like this
${oa.<VoName>.<VOAttributeName>}
Based on the conditions you would set the attribute value(which is boolean) to true or false and accordingly either the column with show or hide. The VOName is the name of the Partial View Object you create for the purpose. Do let us know if you have difficulty in understanding PPR.
Regards
Sumit

Similar Messages

  • How to hide column of DataGrid

    I am making a web part in which I am using System.Web.UI.WebControls.DataGrid control.
    It's AutoGenerateColumns property is set to TRUE.
    I am trying to hide a column at run time. I have written the following code on this controls ItemCreated event but it only works if I e.Item.Cells[0] and it doesn't work for any other value for e.g. e.Item.Cells[1] and e.Item.Cells[6].
    There are 9 columns in my DataGrid control.
    Code
    protected void grd1_ItemCreated(object sender, DataGridItemEventArgs e)
    { e.Item.Cells[0].Visible = false; //works fine
    e.Item.Cells[1].Visible = false; //gives error e.Item.Cells[2].Visible = false; //gives error
    Error
    Specified argument was out of the range of valid values.
    Parameter name: index
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    How to hide a particular column?

    Hi Frank,
    You can try something similar to the below in 'RowCreated' event Instead
    protected void gridView_RowCreated(object sender, GridViewRowEventArgs e)
    e.Row.Cells[1].visible =false;
    OR I would say hiding column is not something that is to be done at row level, so you can hide columns outside any of the grid view event after binding.
    e.g.
    gridview1.columns[1].visible=false;
    I am using DataGrid control in which there is no RowCreated event.
    I have tried second approach but it also doesn't work.

  • How to hide column in BEx Analyzer

    Hi gurus
    In my report I have to show 5 columns depending on a condition.
    Is it feasible?
    Regards

    Hi,
        You can use VBA Macro to execute Code to hide the columns based on the condition.
    This is in 3.5
    Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
               'Check you condition
               If <condition> Then
                       'This will hide Column 3 on Sheet1 where the Query is.
                       ThisWorkbook.Sheets("Sheet1").Columns(3).Hidden = True
               End If              
    End Sub

  • How to hide columns in the output table in webdynpro based on input

    Hi Experts,
       I have 2 inputs and 1 input is optional.If both inputs are given proper table output is displayed,but if only 1 input is given a column is empty in the output table  so i want to hide this column dynamically at runtime based on my inputs.And i want to hide some empty rows also at runtime based on inputs.
    Can anyone help me out to solve this.
    Thanks in advance.
    Regards,
    Anita.

    Hi Anitha,
    What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
    Any how i am giving solution in this way.
    If both inputs are given proper table output is displayed
    Write your below logic in the WDDOMODIFYVIEW )
    Here i am assuming that you already have a table element in the view.
    Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
    but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
    You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
    data:lr_table type ref to cl_wd_table,
           lr_column type ref to L_WD_TABLE_COLUMN.
    lr_table ?= view->get_element( 'TABLE1' ).
    CALL METHOD LR_TABLE->REMOVE_COLUMN
        EXPORTING
          ID          = 'TABLE1_color'
         INDEX      =
        RECEIVING
          THE_COLUMN = lr_column.
    i want to hide some empty rows also at runtime based on inputs.
    Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
    delete itab from wa where key1= "12" and key2="abd".
    Now bind the internal table to context node.
    LO_ND_hcm->BIND_TABLE(
          NEW_ITEMS            = it_final
          SET_INITIAL_ELEMENTS = ABAP_TRUE ).

  • How to hide columns that are getting added dynamically to UI Element 'Table

    In SRM 7.0 while displaying a RFx, click on "responses and awards" button.
    In the response comparision tab once the user selects response number and clicks on "compare all responses".
    Item details table is displayed with fields item number,internal number,item description,........,Price etc.
    Requirement is  to hide the price column from the table.
    The UI element type is 'Table'.
    But the catch is there is no column price visible at layout design level.
    This field is getting added dynamically at run time.
    When i right click and see the 'more field help' at the front end i get the field id as 'GRP_1_COL_3_TXTV'.
    lo_table ?= view->get_element( id = 'ITEMS_TABLE' ).
    lo_column = lo_table->get_column( id = 'GRP_1_COL_3_TXTV').
    ASSERT lo_column IS NOT INITIAL.
    lo_column->set_visible( EXPORTING value = '01' ).
    I had written the above code in the pre-exit of WDDOMODIFYVIEW.
    But i am getting dump as assertion failed.it says no column by name 'GRP_1_COL_3_TXTV'.
    Please help me inhow to hide fields or buttons getting generated dynmically.
    Regards,
    Venkat Raghavan.

    Hi Anitha,
    What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
    Any how i am giving solution in this way.
    If both inputs are given proper table output is displayed
    Write your below logic in the WDDOMODIFYVIEW )
    Here i am assuming that you already have a table element in the view.
    Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
    but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
    You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
    data:lr_table type ref to cl_wd_table,
           lr_column type ref to L_WD_TABLE_COLUMN.
    lr_table ?= view->get_element( 'TABLE1' ).
    CALL METHOD LR_TABLE->REMOVE_COLUMN
        EXPORTING
          ID          = 'TABLE1_color'
         INDEX      =
        RECEIVING
          THE_COLUMN = lr_column.
    i want to hide some empty rows also at runtime based on inputs.
    Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
    delete itab from wa where key1= "12" and key2="abd".
    Now bind the internal table to context node.
    LO_ND_hcm->BIND_TABLE(
          NEW_ITEMS            = it_final
          SET_INITIAL_ELEMENTS = ABAP_TRUE ).

  • How to make XML element used in RTF PRIVATE/PUBLIC ? I know how to hide columns in RTF, but dont know how to generate the xml in below way. Please help.

    Hi
    I am following below link to hide/show my columns dynamically. See "Column Formatting"
    http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187.pdf
    As per doc, element can be made private/public.
    <items type="PUBLIC">
    <item>
      <name>Plasma TV</name>
      <quantity>10</quantity>
      <price>4000</price>
    </item>
    <item>
    And same can be used to hide the column using condition
    <?if@column:/items/@type="PUBLIC"?>
    MY QUESTION IS HOW TO DO THIS IN MY XML BELOW?
    Below is part of my XML code which I am using in Data Definition for RTF.
    <group name="GH3" source="QH3">
    <element name="COLUMN_HEAD3" value="COLUMN_NAME" />
    </group>
    <group name="GH4" source="QH4">
    <element name="COLUMN_HEAD4" value="COLUMN_NAME" />
    </group>
    I am getting output like this.
    <LIST_GH3>
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4>
    <GH4>
    <COLUMN_HEAD4>XYZ</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    In order to use logic as per oracle document I want output like this.
    <LIST_GH3 type="PUBLIC">
    <GH3>
    <COLUMN_HEAD3>REBILL_TO_OTHER_BUSINESS_UNIT</COLUMN_HEAD3>
    </GH3>
    </LIST_GH3>
    <LIST_GH4 type="PRIVATE">
    <GH4>
    <COLUMN_HEAD4>BLANK</COLUMN_HEAD4>
    </GH4>
    </LIST_GH4>
    What changes I need to make in my XML code to get the runtime output as above? Please help. Where do i need to make changes in the above xml? Group name? Element name?
    I am planning to use below condition in RTF template to hide the column,  but dont know how to set the type of column as PRIVATE/PUBLIC in the XML output used to populate data in the RTF at runtime.
    <?if@column:/BTSPIEXP/LIST_GH3/@type=”PUBLIC”?>COLUMN_HEAD3<?end if?>
    Regards,
    Swapnil K.

    Hi,
    Issue has been resolved. I used the value of the element to determine to display it or not.
    Regards,
    Swapnil K.

  • How to hide columns in each page of SSRS report for grouped tablix

    Hello all,
    I have a requirement like when SSRS report (used row grouping)is exported to EXCEL
    1)  Each report page should be exported to a separate excel sheet
    2) Each sheet will have different columns (that is some columns will hide in sheet2, sheet3...)
    3) Eg: If a country report is there with details like country name, country code, currency code. Now each country details should export to separate excel sheet and sheet 1 should show Country Name and Country code; Sheet2 should show: Country Code, Currency
    Code; Sheet3 should show: Country Name, Country Code, Currency Code.
    I am done with point#1 above: Each report page should be exported to a separate excel sheet. Can some one help on point#2:Each sheet will have different columns (that is some columns will hide in sheet2, sheet3...)
    Thanks,
    Paandey : Dont forget to mark it as Answered if found useful

    Hi paandey,
    According to your description, there are three columns named country name, country code, currency code in the report. When export the report to excel, you want to show Country Name and Country code in sheet1, Country Code and Currency Code in sheet2, and
    show all of the three columns in sheet3.
    In Reporting Services, we couldn’t achieve your goal by setting visibility of columns in one tablix. As a workaround, we can use three tablix in the report, then add page break to the tablix. For detail information, please refer to the following steps:
     1. Since you have created a tablix with three column, copy and paste it to the report twice.
     2. Right-click column handle of Currency code in tablix1, click Column Visibility.
     3. Check Show or hide based on an expression, click (fx) button, then type the expression:
    =(Globals!RenderFormat.Name = “EXCELOPENXML”)
     4. Right-click column handle of Country name in tablix2, set its visibility like step3 above.
     5. Select and right-click tablix2, click Tablix Properties.
     6. In General pane, in Page Break Options section, check Add a page break before check box.
     7. Click Visibility in left pane, check Show or hide based on an expression, click (fx) button, then type the expression:
    =(Globals!RenderFormat.Name <> “EXCELOPENXML”)
     8. Select and right-click tablix3, add page break to it like step6 above.
     9. Set its visibility like step7 above.
    The following screenshot is for your reference:
    For more information, please refer to the following document:
    http://blogs.msdn.com/b/robertbruckner/archive/2010/05/16/report-design-naming-excel-worksheets.aspx
    If you have any more questions, please feel free to ask.
    Best Regards,
    Wendy Fu

  • How to hide columns in ALV? (via cl_salv_table)

    Dear forumers,
    Is there a way for me to hide a few columns (or data fields) from being displayed in the ALV table, using the cl_salv_table method?
    FORM display_data_alv .
      TRY.
          CALL METHOD cl_salv_table=>factory
            IMPORTING
              r_salv_table = o_table
            CHANGING
              t_table      = i_ro_assets.
        CATCH cx_salv_msg.
      ENDTRY.
      o_functions = o_table->get_functions( ).
      o_functions->set_all( abap_true ).
      o_columns = o_table->get_columns( ).
      o_columns->set_optimize( abap_true ).
      PERFORM set_columns.
      o_events = o_table->get_event( ).
      CREATE OBJECT o_handle_events.
      SET HANDLER o_handle_events->on_double_click FOR o_events.
      o_table->display( ).
    ENDFORM.                    " DISPLAY_DATA_ALV
    FORM set_columns .
      TRY.
          o_column ?= o_columns->get_column( 'BUKRS' ).
          o_column->set_long_text( text-008 ).
        CATCH cx_salv_not_found.
      ENDTRY.
      TRY.
          o_column ?= o_columns->get_column( 'ANLN1' ).
          o_column->set_long_text( text-009 ).
        CATCH cx_salv_not_found.
      ENDTRY.
    ENDFORM.                    " SET_COLUMNS
    I have also tried to exclude some columns from the subroutine SET_COLUMNS, but they are still showing in the resulting ALV table. What can I do here next?
    Appreciate any help here.
    Thanks very much.

    You can use the method SET_COLUMN_TECHNICAL of the class CL_SALV_COLUMN  to hide the Column.
    data:
      ir_columns type ref to cl_salv_columns_table,
      lr_column type ref to cl_salv_column.
      try.
          lr_column = ir_columns->get_column( 'MANDT' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
    Check the report SALV_DEMO_TABLE_COLUMNS to know more about the Column processing in SALV model.
    Regards,
    Naimesh Patel

  • How to hide column link URL on status bar?

    Apex 4.1
    I have IR wit one column link target to URL, and it uses
    javascript:my_function(#COLUMN_VALUE#)as URL, that is, calls some function and passes the value of that column to the function;
    everything works fine;
    but when I place a cursor over the link, bottom line of IE9 browser (is it called a 'status bar'?) clearly shows:
    'javascript:my_function(<actual value>)'
    Is there any way to prevent it from showing function name and parameter value?
    I tried
    onmouseover="window.status='';"but it does not work

    Don't name the function in your link and hide the code in a dynamic action. See this example:
    http://apex.oracle.com/pls/apex/f?p=31517:296
    and the empno column which is a link. Explanation further down.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to hide columns in SSRS Reports

    I have allocation list which has various columns and weekly allocation text columns like Week1Allocation,Week2Allocation,Week3Allocation ……Week51Allocation.
    I generating a report in which I am showing resource and there allocation in below form
    Resource Name Week1Allocation,Week2Allocation,Week3Allocation ……Week51Allocation
    Xyz                                      
    40                         
    40                         
    43                                        
    11
    While creating report I drag and drop Week Columns in value field and resource name in Row field.
    My requirement is to show Week column starting from current week and next 3 week, How can I achieve this in SRRS or What should I do to get the reports in desired form, What could be the best possible
     design (List design ) for scenario. Please suggest.

    Hi Alok,
    In your scenario, if we want to show Week column starting from current week to next 3 week, we should use expressions to control the 51 columns visibility. This is not a sensible method.
    Generally, we always use one column contains Week1Allocation, Week2Allocation, Week3Allocation ……Week51Allocation values, other than create 51 columns. So I suggest we can modify the dataset to use one column (Week) contains those weeks and other column
    (Allocation) contains the corresponding values, then we can drop Week column under Resource_name in Row groups and drop Allocation column in Values field. Then use the expression below to control the Allocation column visibility:
    =iif(Fields!Week.Value=datepart("ww",today) or Fields!Week.Value =(datepart("ww",today)+1) or Fields!Week.Value =(datepart("ww",today)+2),false,true)
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to Hide Columns Based on Condition

    Hi All,
    i have an SSRS Report with below four columns.
    Product_Name , Year , Credit_Amount , Debt_Amount
    I want to hide the Credit_Amount Column if that column all values are Zero.
    In the same way needs to hide Debt_Amount Column if that column all values are Zero.
    Thanks in advance.
    bala krishna

    Step 1- Right click on your required Column here in below example: I wanted to hide
    Name column
    and select Column Visibility
    Step 2- From the
     Column Visibility window , select Show or hide based on an expression and
    then click on fx button as shown in below screenshot
    Step 3- Write Your expression in expression windows as below
    =IIF(Fields!Credit_Amount.Value = 0, True, False)
    Repeat step 1 to Step 3  for Debt_Amount column .
    Sandip Pani http://SQLCommitted.com

  • How to hide one column in PIVOT(in Union )

    Hi experts
    I have one problem regarding my Pivot report.
    I have to calculate MTD an YTD in my single report so i have calculated MTD in one criteria (UNION) YTD in second criteria.
    In my MTD i have to show 4 column: A B C D
    and in YTD I have to show only 3 column : A B C
    So how to hide column D in YTD.
    Thanks in advance
    Regards
    Frnds

    Hi John
    I have done :
    1. when i do cast as null to my D column in second report. I am getting error
    (Union for non compatible)
    2. so i done the cast in first report also..
    3. Done the union all
    4.and done the HIDE for column D in Result Column..
    But still i am seeing it in my report in YTD...
    So please help me its very urgent for me..

  • Expression to Hide Column

    Hello everyone...I am using web application.Can anybody tell me how to hide column if data is not present in it in RDLC table using nchar type of data.I have used expression for it but its not working As column is hided but  if I insert some
    value in that column then it should display value but it is not displaying,it hides column.

    Hi Sayali,
    Is the issue same as raised in below thread? Try out the fix provided by Wendy Fu and also other expressions provided in there.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/76bba7ad-e6a0-4b7b-b17d-885494439446/column-visibility-issue-in-ssrs2012?forum=sqlreportingservices
    -Vaibhav Chaudhari

  • How to hide Actions Column in Table

    Hi All,
    I have a simple requirement: I am showing a table (items)
    - the "Actions" column (Column with Buttons to Edit and Delete a particualr row) must not be show -> no changes to the table are allowed (I need to hide/ disable this column)
    How can I hide this column od the table?
    I have found out that the field is called thtmlb_oca and that htere is a getter method get-thtmlb_oca. However, the method does not contain coding and I do not know how to HIDE this field/ column...
    Please help me here..
    Thanks, Johannes

    Hi Johannes,
    To remove the column completely,
    you need to comment this line in the method GET_TABLE_LINE_SAMPLE of the Table View Context node class.
    TYPES: BEGIN OF line,
    *  thtmlb_oca  type  crm_thtmlb_one_click_action.
      INCLUDE TYPE xxxx.
      TYPES:  END OF line.
    Disabling can be controlled in the method GET_OCA_T_TABLE of the same class by putting code to delete the button.
    LOOP AT  rt_actions ASSIGNING <fs_actions>.
          <fs_actions>-active  = abap_false.
        ENDLOOP.
    Regards,
    Masood Imrani S.

  • How to hide some column filter operators in Interactive Report

    Hi,
    I have an APEX 4.2 application what includes Interactive Report page.
    Is there possibilty to hide or disable some filter operators in column filter?
    But I don't want to disable all filter functionality for end users.
    For example how to hide/disable operator "matches regular expression".
    Some filter operators are too complicated for end users.
    I have searhced but not found solution.
    regards,
    Erkki

    erkkik wrote:
    I have an APEX 4.2 application what includes Interactive Report page.
    Is there possibilty to hide or disable some filter operators in column filter?
    But I don't want to disable all filter functionality for end users.
    For example how to hide/disable operator "matches regular expression".
    Some filter operators are too complicated for end users.
    I wouldn't really recommend this. Users will quickly recognise what works for them and avoid options that they do not currently understand. However, over time—through training or advice from more experienced users—they may come to understand and use all of the available features. Blocking access (especially in a non-standard way) to options that users may eventually need is likely to result in unnecessary development work now and at some (possibly inconvenient) time in the future.
    That said, this really isn't difficult to implement using CSS. Use your browser web inspector to identify which filter types are to be blocked, using the value attribute of the filter Operator select list in the generated IR HTML. For example, in APEX 5.0 a filter operator select list looks like:
    <select id="R70597672218719366505_STRING_OPT" class="a-IRR-operator" data-column-type="STRING" title="Operator" name="p_ignore_10" size="1">
      <option value="=">=</option>
      <option value="!=">!=</option>
      <option value="is null">is null</option>
      <option value="is not null">is not null</option>
      <option value="like">like</option>
      <option value="not like">not like</option>
      <option value="in">in</option>
      <option value="not in">not in</option>
      <option value="contains">contains</option>
      <option value="does not contain">does not contain</option>
      <option value="regexp_like">matches regular expression</option>
    </select>
    The "matches regular expression" option has the value regexp_like, so the required CSS rule using the IR operator select list class and an attribute selector on the option value is:
    .a-IRR-operator option[value="regexp_like"] {
      display: none;
    Additional selectors for other filter types can be added to this rule as required, for example:
    .a-IRR-operator option[value="regexp_like"],
    .a-IRR-operator option[value="is not null"] {
      display: none;
    to eliminate the "is not null" filter.
    To implement this for all IRs in your application, create a custom CSS style sheet containing the rule, upload it to your workspace, and reference it in all of the page templates used for IR pages.
    This is not a 100% foolproof solution. CSS is not an appropriate way to implement security restrictions. A web-savvy user could use their web inspector to disable the CSS rule and access the blocked filter(s). However there is little risk here as (1) it appears that your users will lack the required expertise; and (2) doing so will only allow them to further filter data they already have access to.

Maybe you are looking for

  • Install Lion on an external drive?

    I have read the discussions on making a bootable backup of Lion on external hard drive or a USB drive. I am not clear on whether I can purchase Lion from the App Store and have it download on an external drive so that my Macbook with 10.6.8 will rema

  • Business Intelligence Suite Enterprise Edition with  Ebs?

    Hi all, how can set Business Intelligence Suite Enterprise Edition working with Ebs with ODBC (Windows platform XP) regards Gordan

  • Modelling based on 2 cubes data

    Hi All I have a Cube C1 with S-Material and S-User  populated with S-Revenue. Similarly I have cube C2 with P-Material, P-User populated with P-Revenue. S-user and P-user are referenced by 0Customer, so essentially it is same master data. S-Mat = P-M

  • Software Feedback-b​ased PWM Motor Control

    Hi all, I'm trying to design a software based feedback controlled motor using the USB 6009 (which does not have hardware pwm capability).  I will be actively detecting the rotational speed of the motor and adjusting the software PWM in response, so t

  • Pass on lot size" function not supported in costing runs

    hi when i am doing cost estimate through ck40n i am getting following error. Pass on lot size" function not supported in costing runs Message no. CK463 Diagnosis You have selected costing variant PPC1 for the costing run. The Pass on lot size indicat