How to (un)hide report columns based on checkboxes?

Hello,
I have a simple report that selects 4 columns from a table.
I would like to create 2 check boxes (at the report level, not at the row level) corresponding to 2 of the 4 report columns: When they are checked, the corresponding columns are visible. When they are unchecked, the corresponding columns are NOT visible.
Two questions:
1.
This would require submitting the page automatically upon (un)checking either check box. How do I do that?
2.
I have attempted to use the Conditional Display properties of the report columns with hard coded values, but they don't seem to work whether the Show property of the columns is on or off. Any idea why and how to get around it? (I am using 3.2. Could this be a bug that has been fixed in 4?)
Thanks!
Gabor

Hi,
I can not find post where I have explain how sample works.But here it goes:
You need load jQuery in page template or page HTML header if you are not using Apex 4.
Create new blank page. In my case new page id is 70.
Create HTML region to new page called Columns. Use wizard defaults
Create hidden item Px_REPORT_REGION_NAME. Use wizard defaults.
In my case hidden item name is P70_REPORT_REGION_NAME .
Create computation before header for hidden item. Computation Type "Static Assigment".
In computation write name you like use to your report. My case I did write "Employee report".
Create SQL Report. In region title place your hidden item like
&P70_REPORT_REGION_NAME.In my case I did use query
SELECT *
FROM empCreate check box. In my case it is called P70_SHOW_HIDE.
Use from LOV query
SELECT heading,
  display_sequence
FROM APEX_APPLICATION_PAGE_RPT_COLS
WHERE application_id = :APP_ID
AND page_id          = :APP_PAGE_ID
AND column_is_hidden = 'No'
AND region_name        = '&'||'P70_REPORT_REGION_NAME'||'.' -- Change P70_REPORT_REGION_NAME to your hidden item name
ORDER BY 2Place to report region footer
<script type="text/javascript">
function hideCol(pThis){
   var lRepId = '#report_data_#REGION_ID#';
   var lCol   = pThis.value;
   if(pThis.checked){
     $(lRepId + ' td:nth-child(' + lCol + ')').show();
     $(lRepId + ' th:nth-child(' + lCol + ')').show();
   }else{
     $(lRepId + ' th:nth-child(' + lCol + ')').hide();
     $(lRepId + ' td:nth-child(' + lCol + ')').hide();
</script>Edit checkbox item and place to HTML Form Element Attributes
CHECKED onclick="hideCol(this);"Your report template most inner table tag must have id attribute
id="report_data_#REGION_ID#"Then you have result like this
https://apex.oracle.com/pls/otn/f?p=40323:70
Regards,
Jari
Edited by: jarola on Oct 27, 2010 11:13 PM
Note about Apex 4 and jQuery added

Similar Messages

  • How to hide table column based on country molga value

    Hi Experts,
    I am doing some enhancement in ess application. I want to hide table column based on country code i.e. Molga value.
    I want to hide coulm for only Japan country reset of them i need to be show those coulmn.
    Could you please provide me a sample code.
    Regards
    Chakri

    Hi Chakri,
    Your setting the table value that time you will get the Country Code.
    1.Create the attribute like Country_Column_Visible Data Type bind the com.sap.ide.webdynpro.uielementdefinitions.Visibility this value  you need to bind the table country column.
    2.In Table You need to check the country code Japan is available you need follow this below sample code.
    for(int i=0;i<tablesize;i++)
         tablesithValue=wdContext.nodeTable().getTablenode(i);
         if(null != tablesithValue.getcountrycode)
         if(tablesithValue.getcountrycode.equalsIgnoreCase("Japan"))
              wdContext.currentxxxxElement.setCountry_Column_Visible(WDVisibility.NONE);
         }else
              wdContext.currentxxxxElement.setCountry_Column_Visible(WDVisibility.VISIBLE);
    Use the above code you condition it will work.I hope it will help you.
    BR,
    Durga

  • Dispaly or Hide a column based on Prompt Value

    Hi All,
    How can I Display or Hide a Column based on Prompt Value selected?
    On my dashboard I have a Report/Request and a Dashboard Prompt.
    Dashboard Prompt has three values, say: *'A', 'B' and 'C'*.
    And my report/request has three columns named *'Field1', 'Field2'* and Field3'.
    What I am trying to achieve is that whenever user selects prompt values as *'A' or 'B'* all the three fields on my report named *'Field1', 'Field2' and Field3'* should be displayed, however whenever user selects prompt values as *'C'* only fields named *'Field1' and 'Field2'* should be displayed.
    Thanks,
    Deepak

    Hi Bhavna,
    I tried using View Selector, however I am not able to achieve the required functionality with that.
    I created a Request with 3 columns in it, then I switched to criteria and added another table to that. The new table automatically got the similar 3 columns used in the first report. Now when I tried to delete one of those columns from the new report, it also got deleted from the first report.
    All the views are dependent, changes made to one are reflected in other.
    Can't figure it out, where am I going wrong?
    Thanks,
    Deepak

  • How to use one report column into the another report in obiee

    How to use one report column into the another report in obiee

    i dont want to use column as a filter for another report it should be report column for another report
    Thanks,
    Vivek

  • How to create new calculated column based on filtered columns?

    Dear All,
    I'm using Oracle Analysis.
    I have two column, each one have different formula.
    My Formula based on filter.
    Column1
    FILTER("DW"."SUM_PLAN_MONTH_AMOUNT" USING ("DW"."PLAN_YEAR" BETWEEN YEAR(DATE'@{P_BEGIN_DATE}') and YEAR(DATE'@{P_END_DATE}')))Column2
    FILTER("PAYMENTS"."SUM_PAY_AMOUNT" / 1000 USING ("PAYMENTS"."PAY_DATE_PAID" BETWEEN DATE'@{P_BEGIN_DATE}' AND DATE'@{P_END_DATE}'))How to add new calculated column based on those two column?
    For example:
    Column1 | Column2 | NewColumn
    5 | 10 | 10 / 5 * 100
    7 | 12 | 12 / 7 * 100
    Regards,
    Eba
    Edited by: Erdenebayar on Apr 19, 2012 1:42 PM
    Edited by: Erdenebayar on Apr 19, 2012 3:37 PM

    Hello MK,
    I have a tried following formula. It is working, but result is not filtered.
    I filtered "PAYMENTS"."SUM_PAY_AMOUNT" and "DW"."SUM_PLAN_MONTH_AMOUNT" columns.
    "PAYMENTS"."SUM_PAY_AMOUNT" / "DW"."SUM_PLAN_MONTH_AMOUNT" * 100Can you share me some tutorial?
    BR,
    Eba
    Edited by: Erdenebayar on Apr 19, 2012 3:43 PM
    Edited by: Erdenebayar on Apr 19, 2012 3:43 PM
    Edited by: Erdenebayar on Apr 19, 2012 3:43 PM

  • How can i hide table columns or rows in pages

    I can do it in numbers, but how can i hide a column or down in pages?

    Slim it down to nothing?
    Peter

  • How can we hide Report Total in Grouping report

    Hi
    I have used the APEX grouping functionality to display the Total by group on a particular Column.
    How can Hide report total value.
    Example:
    GL
    Company Location      Cost Center      Period      Value
    30      000           000           Jan-07      4,182,826.00
    30      101           000           Jan-07      11,943,060.00
    30      102           000           Jan-07      14,238,137.00
    30      103           000           Jan-07      19,057.00
    30      104           000           Jan-07      2,595,799.00
    30      105           000           Jan-07      165,943.00
    30      106           000           Jan-07      741,256.00
    40      000           000           Jan-07      1,058,768.00
    40      101           000           Jan-07      201,323.00
    40      102           000           Jan-07      20,795,876.00
    40      103           000           Jan-07      10,131,660.00
    40      106           000           Jan-07      5,474.00
    Source Total:                     66,079,179.00
    Inventory
    Company Location      Cost Center      Period      Value
    30      000           000           Jan-07      4,156,905.00
    30      101           000           Jan-07      11,943,062.00
    30      102           000           Jan-07      14,238,037.00
    30      103           000           Jan-07      19,057.00
    30      104           000           Jan-07      2,595,799.00
    30      105           000           Jan-07      165,943.00
    30      106           000           Jan-07      741,257.00
    40      000           000           Jan-07      1,016,777.00
    40      101           000           Jan-07      203,659.00
    40      102           000           Jan-07      20,779,260.00
    40      103           000           Jan-07      10,075,212.00
    40      106           000           Jan-07      5,474.00
    Source Total:                     65,940,442.00
    Report Total :                     132,019,621.00
    How can Hide "Report Total" label and its corresponding value.
    Regards
    Kiran Akkiraju

    Hello Kiran,
    Please check if the following can help you - Re: Break formatting and number format of SUM value
    Regards,
    Arie.

  • Hide entire column based on presentation variable?

    Has anyone ever tried to do this? If user selects all records from prompt i want to display analysts assigned to those records. If user selects specific analyst i don't want to display analyst column. I know i can null out or show analyst based on presentation variable but what about hide entire column?
    If this is not possible has anyone tried to use conditional formatting to hide entire column?

    Try this:
    0) Create a dashboard prompt on "analysts" and check the "All Choices" checkbox. Set the prompt to a presentation variable.
    1) Create a small report with two columns, one column will be your analyst column, the other will be a column which houses MAX(RCOUNT(1)) in the Edit Column formula window (what you get when you press the fx button). Put another filter on the analyst column set to the presentation variable with one of the analysts as the default.
    2) Put a filter on the the MAX(RCOUNT(1)) column "greater than 1"
    3) Create two copies of your actual report, one which has the analyst column, one without.
    4) Now in your dashboard you will need three sections, one for your prompt, one for the "with column" report and one for the "without column" report.
    5) In the Section Properties of the "with column" report, click on "Guided Navigation" and navigate to the small report you created in step one. Set this section to display "if request returns rows." Don't forget the filter on this report set to the presentation variable.
    6) In the Section Properties of the "without column" report, click on "Guided Navigation" and navigate to the small report you created in step one. Set this section to display "if request returns nothing." This report will not need a filter on the analyst prompt, because by definition it will display all analysts.
    Now when "all choices" is selected on the prompt, the second report displays in the dashboard, and when a single analyst is selected, then the first report will display with the analyst column.

  • How do i hide a tablix based on 3 conditions

    I have a tablix that I need to set the visibility to hide if  the following any of the following conditions are true
    1 Field accountName = TESTAccount
    2 Field InvoiceType = 1
    3 Field TFiles = 0
    Dont ask me .. i dont know

    Hi Pete,
    Per my understanding that you want to hide an tablix based on three different values from three different columns, right?
    Could you please help to provide more details information to help us more effective to provide an solution:
    If the three values of the three columns are in the same number of rows of in different row or the tablix just have one row?
    Did the three fields in the tablix you want to conditional hide or in a different Tablix
    It is better you give us some snapshot of the report in both design and preview mode and some sample data.
    Please find the details information below about some possible situation i assumed:
    You can modify the query to get the rownumber to add in the report, then use expression as below:
    =IIF(
    MAX(IIF(Fields!ROWNUMBER.Value =1,Fields!AccountName.Value,Nothing))="TESTAccount"
    or MAX(IIF(Fields!ROWNUMBER.Value =2,Fields!InvoiceType.Value,Nothing))=1
    or  MAX(IIF(Fields!ROWNUMBER.Value =3,Fields!TFiles.Value,Nothing))=0 ,true,false)
    If the three values in different columns and different rows, you can create three hide parameters (AccountName,InvoiceType,TFiles)for each fields and find the correct index (begin with 0)to put in the parameter to get the correct value(TESTAccount,1,0):
    for example:
    Parameters!AccountName.Value(0)="TESTAccount"
    Parameters!InvoiceType.Value(1)=1
    Parameters!TFiles.Value(2)=0
    Using below expression to hide the tablix:
    =IIF(Parameters!AccountName.Value(0)="TESTAccount" or Parameters!InvoiceType.Value(1)=1 or Parameters!TFiles.Value(2)=0, true, false)
    Note: make sure the order of the value in the parameter dropdown list is the same as that in the report.
    If the three values are in the same row of different column, you can reference to similar thread below:
    Change Column Header / Column Background
    color based on a value in a specific row in the same column
    You can use the expression:
    =IIF(First(Fields!AccountName.Value, "DataSet2")="TESTAccount" or First(Fields!InvoiceType.Value, "DataSet2")=1 or First(Fields!TFiles.Value, "DataSet2")=0, true, false)
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to Print the Report Column headers on each page of any report

    Can someone offer assistance on how I can go about achieving the ability to show and print the Report Column headers on each page of any report using the Print Attributes of APEX 3.0? These reports will be printed using Excel and Word.
    I read a thread with a similar request but the answer seems vague for my level of understanding.
    I am connected to a print server and using BI Publisher.
    Thanks,
    Ric

    Hello Ric,
    >> These reports will be printed using Excel and Word.
    I'm not sure I understand what you are trying to do. You are using a very powerful tool – BI Publisher – why do you need Excel or Word for printing? Is there a special need only Excel or Word can provide?
    One of the major advantages of using BI Publisher is that it's taking care of all these tedious tasks like reasonable page breaking, headers and footers, and also table headers.
    Regards,
    Arie.

  • How to refresh a report column value alone.

    Hi All,
    If we have a static report and for one of the columns of report, if I need to give a feature to click on it and a popup appears and there is a checkbox to select values on that popup page and finally after making changes and I press on apply changes, It should close the popup window and then come and change the value of that column alone in original report instead of refreshing the whole page.
    The column of the report is of type "Standard Report Column".
    How can I achieve this functionality?
    Thanks & Regards,
    Vikas
    Edited by: Vikas Krishna on Sep 29, 2009 9:47 PM

    Vikas,
    I slightly modified on of my older examples and you will find everything here:
    http://apex.oracle.com/pls/otn/f?p=31517:241
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • How can i hide a column using personalization?

    Hi,
    Please help me how can i hide a one column in oracle forms using personalization?
    Thanks

    Hi,
    When you login to My Oracle Support website, enter "458786.1" or "468657.1" in the search box, and you should get the documents.
    Or, use the direct links below to access those documents.
    How To Do Forms Personalization (Doc ID 468657.1)
    https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=468657.1
    RCVRCERC: When Using Personalization to Remove a Column Receive Error FRM-41017: Cannot set UPDATE ALLOWED (Doc ID 458786.1)
    https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=458786.1
    Regards,
    Hussein

  • How to insert into date column based on other columns?

    Hi
    I have four columns in a table called game named as
    R_Day - Type - Number
    R_Month - Type - Number
    R_Year - Type - Number
    R_Date - Type - Date
    I have around 1000 records and i want to fill R_Date column based on the data in the R_Day,R_Month,R_Year.
    How to write a query to fill the R_Date column based on other three columns.
    Thanks
    srinivas

    select
    to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
    dt from (select 23 R_Day,07 R_Month,2007 R_Year from
    dual);
    Hi,
    Update <Table Name> set R_Date=select
    to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
    from <Table Name>
    Regds.
    Nirmal
    SQL>  select * from test;
         R_DAY    R_MONTH     R_YEAR R_DATE
             1          1       2007
            21         11       2007
    SQL> update test
      2  set r_date = select to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
      3  from test;
    set r_date = select to_date(R_Day||'-'||R_Month||'-'||R_Year,'DD-MM-YYYY')
    ERROR at line 2:
    ORA-00936: missing expression
    SQL> update test
      2  set r_date = to_date(r_day||'-'||r_month||'-'||r_year,'dd-mm-yyyy');
    2 rows updated.
    SQL> select * from test;
         R_DAY    R_MONTH     R_YEAR R_DATE
             1          1       2007 01-JAN-07
            21         11       2007 21-NOV-07
    NB:Please test before posting..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do i hide a column in table interface class

    Hi,
    I need to hide a column in Abap table interface class. When i tried to hide from web item properties it didn't work so i am thinking to hide first column in the table interface class
    Thanks,
    mala

    In the WebApplication Designer start Tools -> View Definition -> Based on a Query. Choose your query, change layout to your requirements and save the view. Now just use the view in your webtemplate.
    Pls assign points if answer is useful
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/37289">vitaliy</a>

  • Urgent - Report Column based on LOV - Value not found in LOV

    Hi All,
    Recently, we have upgraded to HTMLDB 2.0 from HTMLDB 1.5.
    I have a SQL report. One of the columns is based upon LOV - Display as Text (Based on LOV, does not save state).
    For the "Ids" of the report, it should display the corresponding "Names" from the LOV.
    But, for the cases, where no record exist in LOV for some Id, then it is directly showing the Id instead of "-" (which i have specified in Display Null Text) in the report column attributes.
    Before upgrade, it was working fine.
    Any idea where is the issue.
    Please help.
    Thanks in advance,
    Monika

    Hi,
    Can anybody help me in sorting out this issue please.
    For your reference, i have made a test case on
    http://apex.oracle.com/pls/otn/f?p=20451:4:3519837362944582:::::
    Here, there are 2 tables
    1. MY_EMP_COUNTRY(emoid, empname, cntry_id)
    2. MY_COUNTRY_LOOKUP(id, name,active)
    LOV is created on table 2
    select name d, id r
    from my_country_lookup
    where active = 'Y'
    And, on the page a SQL report is created
    select empname, cntry_id
    from my_emp_country
    where, cntry_id is based upon the LOV.
    Since, in lookup table, cntry_id = 4 is set inactive, it is not picked up by the LOV and hence on the report instead of showing the NULL text it is showing the cntry_id (4).
    The attributes of report column cntry id -
    Named LOV = CNTRY_LOV
    Display Null = YES
    NULL text = -
    Display Extra Value = YES
    Am I missing anything.
    thanks,
    Monika

Maybe you are looking for