Change source (sql) of interactive report based on column value?

I've got an Interactive report displaying 10 columns. What I'd like to do is show different columns depending on the value of the first column. All the rows in the result will have the same value in the first column.
If value in column 1 (on any row) = 'aaaa' then
display columns 1,2,3,4, 9, 10
If value in column 1 (on any row) = 'bbbb' then
display columns 1,2,3,4, 7, 8
If value in column 1 (on any row) = 'cccc' then
display columns 1,2,3,4, 5, 6
Should i somehow make the sql query dynamically change or can I use apex to dynamically hide the columns I don't want in the interactive report?
Appreciate if you could point me in the right direction...
/A

Hello Andy,
You can solve that in your SQL query:
select col1, col2, col3, col4
,   case col1
    when 'aaaa' then col9
    when 'bbbb' then col7
    when 'cccc' then col5
end newcol5
from tableYou may have to use to_char or to_number conversions when the datatypes of the col5,7 and 9 are different.
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct ;-)

Similar Messages

  • Display hperlink in report based on column values

    Hi,
    I have a requirement to make report column as hyperlink column with the condition that
    1 . If report column values is 0 then on '0' hyperlink should not display.
    2 . In other values hyperlink should display.
    Please help me to achive this.
    Thanks & Regards,
    Priya

    select decode ( col1, 0, null, '{a href="f?p=&APP_ID.:XX:'||'&SESSION.'||'::::ID:'||col1||':YES" }Go{a}' as Link, col2, col3 from table
    XX is your linked page number.
    Replace { to <
    and
    } to >

  • Conditional Display of Interactive Report Based On Different SQL Query

    Hello,
    I have two drop down list on top of my page and below that I have a interactive report.
    Based on user selection of values from drop down, interactive report should change based on different SQL queries.
    Is it possible to have different SQL queries based on values from drop down and generate interactive report based on that?
    Thanks

    I am passing my drop down value to apex_collection like the following:
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY( p_collection_name => 'IR_LIST',
    p_query => REQUEST_VIEW(:P12_VIEW));However when I change the values from the drop down, :P12_VIEW is not getting the value from drop down even though I could see value being changed in URL. I have created page process for apex_collection
    Process Point - OnLoad - Before Header
    Run Process - Once Per Session or When ResetCould someone suggest as why I cannot get the values in function when drop down is changed?
    Regards

  • Can we merge data from multiple sources in Hyperion Interactive Reporting ?

    Hi Experts,
    Can we merge data from multiple sources in Hyperion Interactive Reporting ?Example can we have a report based on DB2
    Oracle,
    Informix and Multidiemnsional Databases like DB2,MSOLAP,ESSBASE?
    Thanks,
    V

    Yes, Each have their own Query and have some common dimension for the Results Sections to be joined together in a final query.
    look in help for Creating Local Joins

  • Require assistance in Interactive Report based in APEX 3.2

    Hi All,
    Thanks in advance
    I have created editable Interactive report based on Form with report .
    once report created , I have modified query with the column named TempNetto ,Temp Brutto .. Below is the query
    select "IDSUB",
    "JAHR",
    "IDMITARBEITERLISTE",
    "EKPREIS",
    "WEBUCHUNGEN",
    (WEBuchungen*EKPreis) TempNetto , --modified
    "NETTO",
    DECODE((WEBuchungen*EKPreis),0,0,(Netto+(Netto*VerwaltungskostenZuschlag)+(WEBuchungen*InfrastrukturkostenZuschlag))) TempBrutto, --modified
    "BRUTTO"
    from "#OWNER#"."SUBS"
    I receieved the below message "You have requested to change the Interactive Report query. If you added columns to the query, they will not be displayed when the report is run. You will need to use the actions menu and either select the columns or click Reset. If you removed any columns from the query, it will disable existing filters, highlight rules, and other report settings referencing those columns. Please confirm your request. "
    I want the column started with temp should appear in report . I have checked under search bar Action menu is checked and options like Select column and Reset is checked
    Kindly provide some help
    Cheers
    Sachin

    Hi,
    When you've selected all the columns (Select Columns) you then need to save the report...not reset it. Go back and make sure all columns are on the right and then:
    - Save Report
    - As Default Report Settings
    - Apply
    Mike

  • Interactive report based on dynamic query

    Hello
    I am using Apex 4.1 and have a requirement to create an interactive report based on a dynamic query. This option is available in Classic report but in Interactive this feature is not there. Tried using collections or just a view (thought of changing the view definition during "On load", but structure of the report is already defined based on the definition of the view at design time).
    Is there any way of achieving this?
    Appreciate any help!
    Thanks
    aks

    Try looking at this: http://rakeshjsr.blogspot.com/2010/10/oracle-apex-interactive-report-based-on.html
    Thank you,
    Tony Miller
    Dallas, TX

  • Interactive Report Based On A Collection

    Hi guys
    Using Apex 3.2
    I have a classic report based on a collection, which works fine.
    I am now trying to create an interactive report based on the same query (collection), but no data is returned.
    I there anything special I need to do with an interactive report.
    Cheers
    Gus

    Go into Interactive Reports Actions Menu > Select Columns > Add all missing columns to right side and apply (Display In Report)
    OR
    Check interactive report attribute settings
    Thanks

  • Performance operations based on Column values in SQL server 2008

    Hi ,
    I have a table which consist of following columns
    ID    Formula              
    Values                 
    DisplayValue
    1                    
    a*b/100       100*12/100    
          null
    2                    
    b*c/100       
    12*4/100              
    null
    I want to perform operation based on column "Values" and save data after operations in new column Name "Display Value" .i.e I want to get the below result . Can anyone please help.
    ID    Formula              
    Values                 
    DisplayValue
    1                    
    a*b/100       100*12/100    
          12
    2                    
    b*c/100       
    12*4/100             
    0.48
    Thanks for the help.
    Regards, Priti A

    Try this,
    create table #mytable (ID int,Formula varchar(10), [Values] varchar(10), DisplayValue decimal(10,4))
    insert into #mytable values(1 ,'a*b/100','100*12/100',null)
    insert into #mytable values(2 ,'b*c/100','12*4/100',null)
    declare @rowcount int=1
    while @rowcount <= (select max(id) from #mytable)
    begin
    declare @expression nvarchar(max)
    select @expression=[values] from #mytable where id = + @rowcount
    declare @sql nvarchar(max)
    set @sql = 'select @result = ' + @expression
    declare @result decimal(10,4)
    exec sp_executesql @sql, N'@result decimal(10,4) output', @result = @result out
    update #mytable set DisplayValue= @result where id = @rowcount
    set @rowcount=@rowcount+1
    end
    select * from #mytable
    Regards, RSingh

  • What is the best way to display a Interactive Report having 20 columns

    Hi,
    I am having a Interactive Report having many columns (around 20).
    What is the best way to display that report...by default we have to scroll it horizontally to see all the columns.
    I want to avoid Horizontally Scrolling.
    Thanks,
    Deepak

    Hello Deepak,
    You mean apart from using a smaller font size or a bigger monitor?
    You can think about combining / wrapping columns (so more data in one column).
    Or hide some less important data and show that only on demand.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Change the row colors based on column values in MOSS 2007.

    Hi Team,
    I am using MOSS 2007 environment. In that I am having one SharePoint list. In that list based on column values rows colors need to change.
    Kindly help me anyone on this.
    Thanks,
    Ashok

    Hi Ashok,
    Please follow the below link:
    http://www.contentmaster.com/sharepoint-2010/conditional-formatting-of-list-views-for-sharepoint-2010-changing-the-font-colour/
    http://sharepoint.stackexchange.com/questions/7478/highlight-row-color-based-on-field-values-in-sharepoint-2010-list-view
    Best Regards,
    Brij K

  • FSG report not printing column values on same line but sequentially

    FSG report problem:
    We have defined 2 FSG reports 'Balance Sheet - Total' and 'Balance Sheet - Detail'. Both reports have 3 column values, namely the value in Euro (our Functional Currency), the value in MUR - Mauritian rupees (our reporting currency) and the rate of exchange.
    The report 'Balance Sheet - Total' displays these values for assets e.g.:-
    EURO MUR Rate of exchange
    Non-current assets
    1. Intangible assets ? ? ?
    2. Other investments ? ? ?
    (note: ? represents a certain value)
    The report 'Balance Sheet - Detail' displays values as follows :-
    Account EURO MUR Rate of exchange
    1. Property & Equipment
    A10101 Building Cost ? 0.00 0.0000
    A20105 Motor Veh Accum Dep ? 0.00 0.0000
    TOTAL ? 0.00 0.0000
    A10101 Building Cost 0.00 ? n/m
    A20105 Motor Veh Accum Dep 0.00 ? n/m
    (note: ? represents a certain value)
    What we don't understand s why the 'Balance Sheet - Detail' report repeats the display of column values in MUR FOLLOWING the display in EURO, instead of displaying column values for EURO and MUR on the same line, just like in the case for 'Balance Sheet - Total'.
    Is there anything in the definition of column set, row set or report set should I change?
    Can anybody help. Thanks.
    null

    The problem is related to defining the column set properly. It is OK with the first report and needs modification for the second. Formatting is also important so that they appear in the same line(row). The columns need to be linked to the fileds and assignment to set of books is also important as mentioned by Rajsekhar

  • Conditional where, or PL/SQL block as source for an interactive report?

    I have this situation: The main screen of my application shows a list of documents. For now, there has to be a quick "security" built in, so administrators can see all documents, but other users can only see the documents they created (login of creator is stored in the documents table). In the future we'll probably use VPD's to enforce some rules, but for now we need a quick solution.
    So i stored the administrators in a seperate table. Now i want the interactive report on the main page act as follows:
    - If an admin is logged in, it has to have this query: select field 1, field 2, field 3 from documents
    - For all other users: select field 1, field 2, field 3 from documents where creator = :app_user
    Is this possible in one interactive report? I could make two reports with the different queries and make them conditional according to who is logged in, but this gives me two interactive reports to maintain. Is it possible to use a PL/SQL block as source for the report? I tried, but I get syntax errors. Is it possible to make the where clause conditional on some way?

    Hi,
    Install Demonstration application to your workspace:
    Home>Create Application and select Demonstration Application.
    Check page 1 interactive report. That should give idea how you do it.
    Br, Jari

  • Interactive Report based on pl/sql function body

    Can an interactive report be based on a pl/sql function body returning the query sql? Or does it have to be based directly on the SQL?
    Thanks

    Hello "unknown user",
    As far is I know an Interactive Report can only be based on 'regular' SQL. If you have a Report based on a 'PL/SQL function body returning SQL' the option to migrate the report to an interactive report is not there.
    Regards,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

  • Interactive Report based on a function returning SQL query?

    Hi guys!
    I'm wondering if the IR based on a function returning SQL query will be available on the final release of APEX 4.0..I can't see this functionality in EA1 and EA2 and I think it should be there..dont you think?
    With regards,
    PsmakR

    Hi!
    You're absolutely sure you're talking about the Interactive Report region and not about the default SQL Report region ?
    With regards,
    PsmakR

  • Interactive Report based on View

    Hello!
    I've just started to rewrite my Forms applications to Apex.
    Based on an existing view I want to create an Interactive Report, but there is only the choice between 'Table' and 'SQL statement'.
    Is there a way to use the view in a direct manner ( not in a sql statement as 'select * from VIEW)?
    Regards
    Pietja

    Hello Pietja,
    In my APEX env (3.2) an IR can only be based on a SQL Query. You can use the Query Builder to select a table or view, but still it ends up with a SQL Statement.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

Maybe you are looking for

  • Unique ID's in java - interessting theoretical problem

    Hey all, I'm am trying to generate completely unique id's in java. These ID's should be provable unique within different processes and different systems. The machines IP address should not be assumed unique because, for example, two machine in a diff

  • How do i change send and recieve to my phone number

    last night i tried to download ios7 and it made me restore my phone, not it wont let me imessage from my phone number it will only let me from my email

  • HELP! installing windows 7 on imac late 2009

    Ok, I've read a hundred threads on how to install Windows 7 on a new iMac, I've talked to the Apple "experts" on the phone, and I still can't get it right. I've used Bootcamp to create my hard drive partition (200 GB). I've downloaded the drivers fro

  • Constant ringing after accepting or rejecting a ca...

    I use skype on my pc and xbox daily, but the xbox constant ringing is too much of an issue and makes me think twice before ringing someone on xbox. I haven't read in updates about it being an issue nor being fixed, is ti that rare of a problem or is

  • Creating a Coldfusion Data Source that connects to a DB on a different server

    Your assistance is appreciated.  I am attempting to create a data source on server #1 that is to connect to a database residing on Server #2.  Thus far, each attempt made results in an error that the database "is already opened exclusively by another