Dynamic Column Name on Interactive Report

Hi all,
Is it possible to assign a SQL result to a Column name on an interactive report?
I have been able to do this on a standard SQL Report though the use of page items but have not had much luck with interactive reports.
Any help is appeciated.
Thanks,
Dan

could you please explain step 4 a bit more?
as with the standard report, i just created an item with SQL query with a corresponding computation with same SQL query and that works great.
i tried the same method with interactive and it did not work.
in step 4 it mentions creating a process to populate the items.
how is this done?
Thanks,
Dan

Similar Messages

  • Creating Dynamic Column Headings in Interactive Reports

    Hi,
    any ideas how I can alter the name of a column in an interactive report.?
    I have columns whose usage is defined by the end user and consequently want to have their own meaningful column header displayed whenever this column is referenced.
    I can get column headers to change in standard reports by using PL/Sql to return the column headers. In Forms, I use shortcuts (these don't seem to work for reports, I wish they did) but I'm at a loss on how to achieve this with IR's.
    Thanks
    Mike

    I wrote a script(application process) that updated the table that holds column name. I changed the display name, not the column name. I cant remember the actual table, but i found it by looking at the code that create the "APEX Application Page Ir Col" View.
    I dont know if this is best practice, but it works for me.
    Edited by: Adrian3000 on Dec 26, 2008 9:38 AM

  • Dynamic Column Heading on Interactive Report

    I have my column headings for my table columns stored in the database. I want the Interactive Report to use these heading (instead of static headings). Is there a way to have the columns set from the database(with a function/procedure)?

    you can replace the column headings with &PAGE_ITEM.
    obviously one page item per column header
    then use the database to populate the items with your column headings.
    craig
    [http://www.oracleapplicationexpress.com]

  • Link column from an interactive report to insert a row in a tabular form

    Hi, I need your help, i'm new on APEX and i really need to make a "link column" from an "interactive report" to insert a row into a "tabular form".
    I mean that when you click the "link column" instantly create a new row in the Tabular form with the information of the linked row on the interactive report. Its something like that.
    I really appreciate your help.
    Ricardo Capuz

    Hi Ricardo,
    You can use the following code as per your requirement (this is just an example),
    (In this case IR report is in Page#1 and Tabular form is in Page#2),
    On Page#1, Create a hidden item (i.e 'P1_ID')
    IR Report query as like the below,
    select empno,
    ename,
    job,
    mgr,
    hiredate,
    sal,
    comm,
    deptno,
    empno "copy"
    from empUse the below JS code in Page HTML Header section,
    function f_insert_row(pSub)
        $s('P1_ID',pSub);
        doSubmit('ADD');
    Edit  Report Attribute -> copy column -> Under Column Link
    Link Text: Select your column name (i.e. #EMPNO#)
    Target: URL
    URL: javascript:f_insert_row(#EMPNO#);
    Then create a process to insert like below,
    BEGIN
    insert into emp_test (select * from emp where empno=:P1_ID);
    END;Process condition as * Request=Expression1* in Expression1 as 'ADD'.
    At last, create a branch to Page#2, Check 'include process success message' and with the same condition as * Request=Expression1* in Expression1 as 'ADD'.
    Thanks,
    Lakshmi

  • Problem with column groups on Interactive Report

    Hi
    I am hoping that someone can help with this problem.
    I am attempting to control both the grouping and ordering within each group of fields in the single row view of an interactive report. Creating column groups appears to be OK at first (sequence, name and description) but if I then attempt to edit the group, the sequence box appears to be empty even though it was filled with a unique number at the time of creating the group.
    In addition, any changes to the order of the fields within the group made using the shuttle box at the bottom of the screen don't seem to be saved even to the Apply Changes button is pressed.
    Anybody know what is happening here and can anyone suggest how to control both the order of the groups and ordering within each group?
    Thanks in anticipation
    Martin

    Moun wrote:
    I am dealing with many interactive projects in my application. Sometimes I have to add a column to the interactive report. When I do so, the column doesn't appear in the interactive report...On the page I have to click on "Actions" then go to "Selected columns" and then display it ! the problem is when I logout and login again
    the column desappear again and I have to do samething again and again...Is there a way to set it appear by defaul always ???After adding new columns to an existing IR, you need to select them for display as a developer, and save the new report as the Primary Default.

  • Form with dynamic Column Names

    Hello,
    I am using "Form with report on table" and I would like to make use of dynamic column names labels that are derived from another table (sql). I am stuck on how to do this, any advice?

    Hi FourEyes;
    Try using this.
    Select Col1, Col2, Col3
    into :P1_Field1, :P1_Field2, :P1_Field3
    from Your_Table
    Where (your conditions);

  • Referencing columns in an interactive report

    I need to link an interactive master report in APEX to a interactive detailed report. Both reports have a common column name (PCN). To create a link from the master report to the detailed report, we must specify a "Name" in the column link section for the column in the master report. My question is: how does one reference a column in an interactive report so an entry can be provided in the "Name" box in the column link section?
    I developed a solution by creating a text item (P1_PCN) in the detailed report and using P1_PCN as the "Name". I then modified the source for the detailed report to be: select . . . where pcn = :p1_pcn. However, what would we do if the user community wants the functionality to click on a variety of column values in the master report, e.g. filter the detailed report by a value of PCN or STHN or UIC or etc? I rather think this could be done but it would be very cludgy.
    Thanks

    Basically, you are doing it the right way.
    If you are sure that there are no overlapping column values, you can modify the query of the detail report to something like
    select . . .
    where (pcn = :p1_pcn
      or   sthn = :p1_pcn
      or   uic = :p1_pcn
    )

  • Problem adding column in an interactive report

    Hi all
    I am dealing with many interactive projects in my application. Sometimes I have to add a column to the interactive report. When I do so, the column doesn't appear in the interactive report...On the page I have to click on "Actions" then go to "Selected columns" and then display it ! the problem is when I logout and login again
    the column desappear again and I have to do samething again and again...Is there a way to set it appear by defaul always ???
    THank you

    Moun wrote:
    I am dealing with many interactive projects in my application. Sometimes I have to add a column to the interactive report. When I do so, the column doesn't appear in the interactive report...On the page I have to click on "Actions" then go to "Selected columns" and then display it ! the problem is when I logout and login again
    the column desappear again and I have to do samething again and again...Is there a way to set it appear by defaul always ???After adding new columns to an existing IR, you need to select them for display as a developer, and save the new report as the Primary Default.

  • How to change recordset bahaviour to accept dynamic column names in the where clause

    Hi
    im using php-mysql and i make a recordset and i want to make the column names in the where clause to be dynamic like
    "select id,name from mytable where $tablename-$myvar";
    but when i do this my i break the recordset and it disappear
    and when i use variables from advanced recordset it only dynamic for the value of the column not for the column name
    and when i write the column name to dynamic as above by hand it truns a red exclamation mark on the server behaviour panel
    so i think the only way is to change the recordset behaviour is it? if so How to make it accept dynamic column names?
    thanks in advance.

    As bregent has already explained to you, customizing the recordset code will result in Dreamweaver no longer recognizing the server behavior. This isn't a problem, but it does mean that you need to lay out your dynamic text with the Bindings panel before making any changes. Once you have changed the recordset code, the Bindings panel will no longer recognize the recordset fields.
    Using a variable to choose a column name is quite simple, but you need to take some security measures to ensure that the value passed through the query string isn't attempting SQL injection. An effective way of doing this is to create an array of acceptable column names, and check that the value matches.
    // create array of acceptable values
    $valid = array('column_name1', 'column_name2', 'column_name3');
    // if the query string contains an acceptable column name, use it
    if (isset($_GET['colname']) && in_array($_GET['colname'], $valid)) {
      $col = $GET['colname'];
    } else {
      // set a default value if the submitted one was invalid
      $col = 'column_name1'
    You can then use $col directly in the SQL query.

  • Saving result from sp_executesql into a variable and using dynamic column name - getting error "Error converting data type varchar to numeric"

    Im getting an error when running a procedure that includes this code.
    I need to select from a dynamic column name and save the result in a variable, but seem to be having trouble with the values being fed to sp_executesql
    DECLARE @retval AS DECIMAL(12,2)
    DECLARE @MonthVal VARCHAR(20), @SpreadKeyVal INT
    DECLARE @sqlcmd AS NVARCHAR(150)
    DECLARE @paramdef NVARCHAR(150)
    SET @MonthVal = 'Month' + CAST(@MonthNumber AS VARCHAR(2) );
    SET @SpreadKeyVal = @SpreadKey; --CAST(@SpreadKey AS VARCHAR(10) );
    SET @sqlcmd = N' SELECT @retvalout = @MonthVal FROM dbo.CourseSpread WHERE CourseSpreadId = @SpreadKeyVal';
    SET @paramdef = N'@MonthVal VARCHAR(20), @SpreadKeyVal INT, @retvalout DECIMAL(12,2) OUTPUT'
    --default
    SET @retval = 0.0;
    EXECUTE sys.sp_executesql @sqlcmd,@paramdef, @MonthVal = 'Month4',@SpreadKeyVal = 1, @retvalout = @retval OUTPUT;
    SELECT @retval
    DECLARE @return_value DECIMAL(12,2)
    EXEC @return_value = [dbo].[GetSpreadValueByMonthNumber]
    @SpreadKey = 1,
    @MonthNumber = 4
    SELECT 'Return Value' = @return_value
    Msg 8114, Level 16, State 5, Line 1
    Error converting data type varchar to numeric.

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    >> I need to select from a dynamic column name and save the result in a variable, but seem to be having trouble with the values being fed to sp_executesql <<
    This is so very, very wrong! A column is an attribute of an entity. The idea that you are so screwed up that you have no idea if you want
    the shoe size, the phone number or something else at run time of this entity. 
    In Software Engineering we have a principle called cohesion that says a model should do one and only one task, have one and only one entry point, and one and only one exit point. 
    Hey, on a scale from 1 to 10, what color is your favorite letter of the alphabet? Yes, your mindset is that level of sillyity and absurdity. 
    Do you know that SQL is a declarative language? This family of languages does not use local variables! 
    Now think about “month_val” and what it means. A month is a temporal unit of measurement, so this is as silly as saying “liter_val” in your code. Why did you use “sp_” on a procedure? It has special meaning in T-SQL.  
    Think about how silly this is: 
     SET @month_val = 'Month' + CAST(@month_nbr AS VARCHAR(2));
    We do not do display formatting in a query. This is a violation of at the tiered architecture principle. We have a presentation layer. But more than that, the INTERVAL temporal data type is a {year-month} and never just a month. This is fundamental. 
    We need to see the DDL so we can re-write this mess. Want to fix it or not?
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Best way to style a column in an interactive report?

    Since I'd rather not do it directly in the SQL used to populate the report, can someone suggest a clean way to style all cells of a given column from an interactive report? Perhaps all cells of interest can be addressed through jquey using the "headers" attribute they share?

    Oh, and I'd also like to make the vertical separations between cells aparent if possible....Please try this one:
    .apexir_WORKSHEET_DATA TD {border-style:ridge;border-color:#98bf21;
    border-width:3px;}For more details please visit:
    http://www.w3schools.com/css/css_border.asp
    Regards,
    Fateh
    If you believe that my answer was helpful or correct, then please mark it as helpful or correct..

  • Custom Column freezing in interactive reports

    Hi,
    Can anyone help me regarding column freezing in interactive reports?
    I want to keep few of the column of my IR fixed that is not scrollable(horizontally),selection of column to be freezed should also be there.
    Along with it i also want a horizontall scrollbar to appear for scrolling the report.
    Thanks,

    Hi Vish,
    I was informed by SAP few months back that Interactive Reports can not be enhanced with custom fields. I don't see any documentation regarding this.
    You may want to check with SAP also.
    Regards,
    Paparao Undavali

  • Dynamic column name sql?

    I need to do a select statement using dynamic column names. Can it be done WITHOUT building a string to execute the sql?
    In other words, I want to use a variable name in the SELECT part of a statement.
    Thanks

    Properly done, there shouldn't be a great difference in the performance of static and dynamic SQL. Of course, dynamic SQL is a whole lot more complicated to get right. It's also rather at odds with your requirement that column names get passed in dynamically-- if you don't know what columns you're going to select at compile time, you can't use static SQL.
    That said, there are a handful of tricks around using Oracle's built-in XML processing functionality to simulate dynamic SQL. This is almost certainly less efficient than doing dynamic SQL in your case, and a whole lot more complicated, but it's technically not dynamic SQL.
    The proper response, though, is almost certainly to either
    1) figure out how to design the application so that column names need not be passed in at runtime or
    2) use dynamic SQL.
    If at all possible, option 1 is generally preferable. While there are situations where dynamic SQL is necessary, those tend to be rather rare.
    Justin

  • Colour code a column in an interactive report

    Hi
    Could anybody tell me how to colour code a column in an interactive report please.
    I am using apex version 3.1.
    Thanks in advance

    When your IR is displayed, go to the Actions Menu, choose "Highlight" and enter the condition when which row or field should be highlighted.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • How to wrap a Column (Increase/Decrease column width) in Interactive Report

    Hi,
    I have a Interactive Report and I want to wrap the column values.
    Also want to increase/decrease width of the columns..
    I have 2 columns say.. Description and List
      List  - aaaaaaa, bbbbbbb, hhhhhhh, nnnnnnn, 222222, 55555555, 77777777, ..... // list of values are seperated by ,
             // 1. want to wrap the values ..I mean to decrease the width       
      Descriptiopn - sdgssdjkllkkkkkkkk  // -- here I want to increase the width of column
                     dgdggdfgdfgdgg
                     dfgdfgdfdfggfdg
                     dgdgdgdgdgdf2ndly for the List Column, can I put the sepearte values in each Line (values are seperated by , here) - ROW will only one.
    For each ROW, I want to display List column as shown below.
          List  - aaaaaaa
            bbbbbbb
            hhhhhhh
            nnnnnnn
            222222
    IS this possible in Interactive Report??
    Thanks,
    Deepak
    Edited by: Deepak_J on Feb 23, 2010 4:14 PM

    Actually, I want to increase/decrease the column width in Interactive Report.
    As shown the in the example of Description field...it's coming in 4-5 lines.
    I want to increase the width of Description column..so that it should come only in 2 lines..
    thanks,
    deepak
    Edited by: Deepak_J on Feb 23, 2010 4:32 PM

Maybe you are looking for

  • How can I use two different page orientations in the same document?

    I am trying to have both portrait and landscape page orientations in the same document.  Pages doesn't seem to like this.  Is there a way?

  • How do I import a CD in itunes 12?

    I cant't figure out how to import a CD in itunes 12?  I read online that you open itunes, then put in the CD, but when I do nothing pops up asking me to import it.  How do I get it to import if the import window doesn't pop up when a CD is inserted?

  • [Solved] Locales missing

    Hi, I'm having a problem with my Arch installation. Last time I tried to boot it it got stuck on the console login (X wouldn't start). After a lot of debugging it appeared something was wrong with the kernel. I reinstalled it and the laptop booted fi

  • Image as drop target for drag and drop

    was wondering how I can make an image to be a drop target using the dnd api. so far from what i've seen it takes only java components to be target, so if anyone has any ideas it will be great. thanks

  • Mail Not Accepting Email Pop Password

    Hi,         I've been trying to set up a new email address for a wordpress site I've sarted. Unfortunately the MacMail app won't accept the password. I've double checked all incoming/outgoing servers etc and all is correct. Perhaps there is a problem