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

Similar Messages

  • Hide column based on condition on other column in table

    hi,
    am using BIP 10.1.3.2 to generate reports.In the template i need to hide one column based on condition on other.am using SQL query as my data source type.can anybody help me ?

    Use <?if:?> condition in the RTF, but its mainly for the rows not column. You can work around this by handeling in backend. Or take two separate tables, one with the column which you want to hide and another table without that column and before calling that table use IF condition.
    Regards,
    Amit D
    Persistent Systems Ltd.

  • Hide column based on prompt

    Hi Gurus,
    Can i hide column based on Prompt value?
    My requirement is
    I have report is showing Daily/Weekly/Monthly data based on prompt value ( Prompt selected values are Daily/Weekly/Monthly)
    If user select daily then report will display data every day. if user select Weekly then report will display Every week data ( Week start from Monday).
    I have one more columns as Day name to display day of the week for daily report. its working fine.
    but i want hide day name column when i run report for weekly.
    How can i hide column based on Prompt value. is it possible in OBIEE 10.3
    really appreciated for your help

    Here's simpler approach. Use column selectors.
    1) The first column in your column selector will be where you put your Daily/Weekly/Monthly choices.
    2) In the second column, put your Day column. Add another column, doesn't matter what. I'll explain later. In the caption for this column, put in something like "Select to Hide Day column."
    3) Click "OK" and put your column selector in your Compound Layout.
    4) Now, select the other column in place of the Day column.
    5) Now go to the criteria tab. The "second choice" column should now be there in place of the original first column. Dummy out this column and click on the "Hide" checkbox in the column properties. Change the name to "No column."
    6) Now go back to Results. The user now has two choices for the Day column, either the original column (the Day column) or the "No column" choice. When the "No column" choice is selected, the column disappears from the report. Users can make the selection whenever they choose Weekly as their choice.

  • 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

  • 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

  • Hide column based on parameter value

    Hi All,
    I have requirement where i need to hide one column based on my input parameter value.per example
    if my parameter say DISPLAY is Yes then i need to hide the column AMOUNT..
    how to achieve this... Please help.
    Thanks
    Bharat

    Hi Bharat,
    You can do it following the steps explained in the documentation :
    http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187/T421739T481157.htm#4535373
    regards
    Jorge
    p.s. If this answers your question then please grant the points and close the thread

  • 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.

  • Refresh Cell Value Of Column Based On Condition

    Hi Experts,
    I m working on UI5 grid.
    This my grid:
    My requirement is:
    On change of "Actual Value ", if value is in between UL and LL then "Sub Test" column should be refreshed with image(ex.green ! mark)
    Till Now i achieved upto comarision in columns:
    But now i stucked with ,how to refresh image in "Sub Test" column based on valued entered in "Actual Value" column.
    Request your ideas.
    Regards,
    Neha

    You can also use CalcFields to bind to your data if you don't want the Icon column to be part of you model.
    Documentation/AdvancedTopics/DataBinding/CalcFields – SAPUI5 Wiki (TIP CORE User Interface)
    I've modified Dennis' example slightly to use a CalcField, notice the paths are defined to create a composite binding, the data is the automatically passed to the formatter function.
    http://jsbin.com/poren/1/edit
    Regards,
    Jason

  • How to disable Buttons based on condition.

    Hi
    Need your help to disable button based on condition.
    Please refer the application:
    http://apex.oracle.com/pls/otn/f?p=34797:5:110582943383419::NO:::
    login credentials:
    workspace: vsanthanam
    user: vijay
    pswd: apex_demo
    In the above application, i have 2 buttons in page 5, (Report1 and Report2)
    Where i have to disable button based on the following conditon:
    i) USER whoever has Admin value 'Y' in my table can access the button.
    for this i've written a Button Condition : Type (EXISTS)
    select 1 from apex_extra_values where rtrim(lower(empname)) like decode((select Admin from apex_extra_values
    where rtrim(lower(empname))=rtrim(lower(V('APP_USER')))),'Y',rtrim(lower(V('APP_USER'))))
    note: i have empname same as my APEx user name. with Admin access 'Y'.
    By using this code i can able to hide the button for users who has no Admin access.
    But my requirement is : i have to show the button even if the user is not Admin, but to grey out (disable the button - no action)
    I tried using javascript function:
    function disableButton(pThis)
    pThis.disabled=true;
    But either of this (exists condtion or JAvascript function) works in my case and not both.
    Any pointer on this would be highlt appreciated.
    Thanks
    Vijay

    Couple of things:
    1. I would never use v('APP_ITEM') but :APP_ITEM - it is faster and there is no need to use this function within an application
    2. The way you are doing this check is not the best approach. You should create an authorization schema and run this once per session. Whatever this authorization is returning as a result you can check using the following Function returning boolean:
    IF apex_util.public_check_authorization ('MY_AUTH') THEN RETURN TRUE; ELSE RETURN FALSE; END IF;
    See this example on authorization issues:
    http://apex.oracle.com/pls/otn/f?p=31517:148
    3. As far as disabling a button is concerned I think I explained the options. I also have an example on that here:
    http://apex.oracle.com/pls/otn/f?p=31517:143
    whereby it is not disabling but hiding a button.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Hide columns based on Authorization

    Experts,
       In a report i would like to hide few columns based on the authorization, only few users should be able to see
       these columns but rest of the users should be able to view the report but not these columns. these columns
       should either not visible on the report or display ****** for the data of these columns.
       I tried to create authorization object in RSECADMIN but the problem is if a user doesn't have this
       authorization he cannot even view the report it display the message "No Authorization".
       any suggestions/help is greatly appreciated.
    Thanks.

    Hi Geni,
    You have two choice.
    1. Override the column value to **** using virtual characteristics code
    Assign a role to users who has authorization to see the columns
    In Virtual charachteristics code,  read table AGR_USERS table based on the sy-uname
    If the role that is assigned for the columns is found do nothing, else overwrite it with ****
    2. Create a User exit variable, in the variable code read the authorization of the user like above
    If the role found assign 1 else assign 0.
    Create a formula in the columns area and  multiply your column value with the user exit variable value.
    Suppress zero columns using the query properties.
    Good luck,
    Vijay

  • How to skip page1 based on condition

    Hi Experts,
    I have one issue in adobe form,in that form two master pages there.  If the invoice no having only one line item in this case the first page should be hide that means the one line item should be displaying in second page. in this case should be visible only the second page need to display.
    If any one aware of this please help me.
    Now i am able to display the line item in second page but first page still visible(I need not to display page one how to hide using java script).

    Is this issue resolved ?
    Close the thread with correct and helpful answers.
    How to close a discussion and why
    Regards
    Sandy

  • 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? Suppress Crosstab Total column, based on condition, Please help!

    Hi All,
    Please give an advice on the following:
    My problem I have an item stock and value by depo by region report, with the following structure:
    http://img29.imageshack.us/img29/5289/ctab.jpg
    Row 1 is Items
    Column 1 is region, has six values (value 1->6), but its grouped in specified order like: value 1, value 2, other (all other values as one, with the name of "other")
    Column2 is depo.
    I need to hide the sum next to depo (highlited whit thin red on the pic), but only where column 1 (region)  is "other".
    i tried useing suppress, and conditional highlighting (its acceptable if the column is made blank by useing white as text color)
    if GridRowColumnValue("Region") = "other"
    Region is set for the Column1 grouping as alias in Crosstab expert.
    I usualy get the error: "This is not a name for a grid group for the field being formated."
    or if it's no error in it, it simply stays on the form.
    What am I missing? Is it even possible to do this?
    Thank you, for all of your help in advance.
    Regards,
    Daniel
    Edited by: Daniel Omaisz Takacs on Sep 14, 2010 2:49 PM

    The only way to suppress a "column" is to not pull that data.
    You can turn the column header white as well - highlight with
    if CurrentFieldValue="your value" then white else black
    or
    CurrentFieldValue="your value"   // conditional suppression

  • How to hide ribbon based on thebelow conditions?

    I have two types of user in the site(portal and partner)
    I want to hide ribbon for partner users and show ribbon for portal user.
    How it can be achievd through code?
    I have been applied below changes to my custom master page.
    <div id="s4-ribbonrow" display:none>
    and
    <Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddAndCustomizePages">
     <script type="text/javascript" runat="server">
              if (window.location.href.indexOf("/partner/") > -1) {          
                document.getElementById("s4-ribbonrow").style.display = "none";       
    </script>    
    </Sharepoint:SPSecurityTrimmedControl>
    But its give below error.
    "parse eror.
    code bolcks are not allowed in this file."
    Why the code blocked script test iin masterpage?
    Could you please help why i am getting this type of error?

    Place this in the web.config file of the web application within the <PageParserPath> header.
    <PageParserPath VirtualPath="/BI/Pages/ppssample.aspx"
    CompilationMode="Always" AllowServerSideScript="true" />
    IISReset /noforce

  • 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 ).

Maybe you are looking for