Dynamic report column groupings

I'm builing an application that has a report based upon dynamic sql. It adds four columns for each store in the chain but as I don't want to redo the program everytime we add another store I am building that query string using a loop to add each extra set of columns.
That works fine but to make the data readable I want to add columns groupings above the column headers. I can do this by adding a tag like this:
*<th class="t5ReportHeader" colspan="4"> Academy </th>*
for each store to the "Before Column Heading" section of my report template but that puts me back to modifying the app everytime we add a new store.
Is there a way to modify the report template at runtime or somehow tie it to a variable that I can change so I can generate a set of tags in my application?

Nudge

Similar Messages

  • Dynamic report columns in parameterized report

    Hi all,
    Just wanted to share some ideas... I was looking for a way to allow users to seect which columns to display in a parameterized report.
    I came across Denes Kubicek's solution on his APEX demo site (the "Pick Columns" page)... works beautifully.
    The only problem I had was that some of the report columns required joins to other tables. (up to 5 left outer joins). Could not figure out how to do this based on Denes sample solution. I then thought of creating a view, which joined all the required fields for output. I then run my report against the view... this works even better.
    I also used a shuttle instead of a multi-select list, since I have about 25 columns to pick from... I find the shuttle a lot more flexible (re-ordering of columns etc..)
    One thing I still haven't figured out yet though, is how to make the columns sortable? If I check off the sort check box on the report atttributes for the generic "col0"... I get an oracle error...
    If anyone has figured this one out, please let me know..
    Thanks to Denes for the solution...
    Stephane

    Actually, getting the error, albeit intermittently...
    Here is the SQL debug output
    select ECC_No,Opportunity_Name,Opportunity_Status from custom_report_vw where NVL(opportunity_type_id,-1) = decode(:P12_type_id,-1,NVL(opportunity_type_id,-1),:P12_type_id) and NVL(DEPARTMENT_ID,-1) = decode(:P12_dept,-1,NVL(DEPARTMENT_ID,-1),:P12_dept) and 
    NVL(max_5_effort_days,'%null%') = decode(:P12_5_EFFORT_DAYS,'%null%',NVL(max_5_effort_days,'%null%'),:P12_5_EFFORT_DAYS) and
    NVL(IN_FLIGHT,'%null%') = decode(:P12_IN_FLIGHT,'%null%',NVL(IN_FLIGHT,'%null%'),:P12_IN_FLIGHT) and NVL(CLIENT_FUNDED,'%null%') = decode(:P12_CLIENT_FUNDED,'%null%',NVL(CLIENT_FUNDED,'%null%'),:P12_CLIENT_FUNDED)  and 
    NVL(opportunity_category_id,-1) = decode(:P12_category_id,-1,NVL(opportunity_category_id,-1),:P12_category_id) 
    and NVL(priority_id,-1) = decode(:P12_priority,-1,NVL(priority_ID,-1),:P12_priority) and 
    NVL(work_type_id,-1) = decode(:P12_WORK_TYPE,-1,NVL(work_type_id,-1),:P12_WORK_TYPE)
    order by 4,1
    failed to parse SQL query:
    ORA-01785: ORDER BY item must be the number of a SELECT-list expressionFor some reason, in the order by it puts 4,1... but I only have 3 columns in my select list...
    If I choose an additional column, then the query works. I'm also confused as to why it sorts on the 1st column as well? In my report attributes, I do not specify a sort sequence, so I figure it would simply sort on the chosen column index.
    This query used was working fine yesterday with one or two columns...
    Any ideas?

  • BUG: Dynamic report column headings not working with some templates

    Using Apex 2.0, we are trying to create a vertical report with dynamic labels like &P26_REF_RECEIVED_DATE_L. based on items populated by PL/SQL.
    This seems to work fine for some templates but not for others. With a horizontal report template we get output like:
    <th class="t4ReportHeader" id="REF_RECEIVED_DATE">Received</th>
    <td  headers="Received" class="t4data">29-MAR-2007</td>But with the vertical template we get:
    <th>&P26_REF_RECEIVED_DATE_L.</th><td>29-MAR-2007</td>Also, if we use "default: vertical report, look 1" we see "&P26_REF_RECEIVED_DATE_L." in the output, but with "default: vertical report, look 2" we see "Received".
    Message was edited by:
    Tony Andrews

    have you checked that your report template has a
    valid value for the "Column Heading Template"
    property?This template has nothing in the "Column Heading Template" because it is designed to show the data in this form:
    Heading1 - Value1
    Heading2 - Value2
    Heading3 - Value3
    Hence both the heading and the data appear in the "Column Template 1" property as follows:
    <tr><th class="t3header">#COLUMN_HEADER#</th><td class="t3data">#COLUMN_VALUE#</td></tr>
    Maybe it is an Apex limitation that the #COLUMN_HEADER# value can't be accessed from this subtemplate? Yet somehow it works with "default: vertical report, look 2" (which I realise isn't a template as such).

  • Dynamic Report Column

    HI,
    I want some example where in internal table if the coulumn is filled then only it should be displayed in ALV output.
    E.g
    PERIOD    AMNT1  AMNT2  AMNT3
    2             100         200      
    3             200                            
    Now here AMNT3 is empty so it should not be displayed in my ALV output.
    And later if AMNT3 gets filled it should come.
    Thanks
    Anurodh

    Hi Anurodh Jindal ,
    One way is ...
    After Filling your internal table...
    You can write a logic like
    Check if there is any record where AMNT3 is not initial (Means it's having value...) either using LOOP or READ
    Set One Flag for FLAG_AMNT3 = 'X'.
    Now while creating fieldcat you check the above Flag...
    if FLAG_AMNT3 = 'X'.
    Append Fieldcat.
    endif.
    Repeat above logic for all the columns.. if there are limited number of columns..
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Dynamic Selection of Report Column Format

    Is it possible to dynamically set the number format on a report column? I thought it would be as easy as setting the 'Number/Date Format' to a session state variable such as &NUMBER_FORMAT. However, when I tried this the column returned the following value ##########.
    Any ideas?
    Thanks,
    David

    OK, this is a favorite hack of mine combined with Sergio's suggestion. Essentially, we select the column twice, display it with one column using Sergio's idea and sort it on another hidden and unformatted copy of the column (hope I didn't lose you yet):
    1) Add another column of the same source to the query and give it an alias:select ename,to_car(sal,'&NUMBER_FORMAT.') sal,sal sal_sort
      from emp2) Edit the report > report attributes > sal_sort column attributes. In the HTML Expression field, type #SAL#.
    3) On the report attributes page, unclick the "Show" column for sal.
    Now you are displaying the SAL column in the SAL_SORT column allowing the reporting engine to properly sort the column based on the unformatted SAL_SORT. I use this technique a lot for quarters. I'll show Q105, but it's sorting on an actual date behind the scenes.
    Happy hacking!
    Tyler

  • Fixed columns in dynamic report ( ?horizontal-break-table:1? )

    Hi
    I have a dynamic report that could strech over more than one page horozontally. I use the <?horizontal-break-table:1?> tag on my first header column to show this on every page, but I also need to show the last column on every page. That meens that I have a fixed column on each end of my dynamic report, the last one is just a signatur field so its no logic to it , but its important to show it on every page.
    Any tips on this ?
    PS.
    Sry if this is a noob question, this is not really my knowlegde area, but have to fix it anyhow :)
    Tim

    Robert,
    It sounds like you want a completely populated table regardless of the input data.  To achieve you will need to create a "dummy table" in your database, either as an actual table, or by just doing a view, it's your choice.  Here is a method for the view:
    select '2009-M01' as Dim1
    union
    select '2009-M02' as Dim1
    union
    select '2009-M12' as Dim1
    Next you'll have to introduce this to your universe as a "dummy table".  In WebI, go to Edit Query and click add query, then add Dim1 to your result objects panel.  After you run your query you can perform Merge Dimensions on Dim1 to the first dimension from your report, and voila, you'll have a fully populated table.
    Thanks,
    John

  • Dynamic Report with Hundreds of Columns in APPS -- Possible ?

    I am working on a design of building a dynamic report with up close to 1000 columns in Oracle MFG. Depending on the number of item parameters user entered, the report could have 100, 200, 500, up to 1000 columns. User wants the report exported to EXCEL to do analysis.
    Is this huge report possibly built and run in Oracle APPS? What are the major issues and limitations involved and what attentions I should give to design and build? Thanks in advance.

    Since formatting is not important, I would use pl/sql. Pl/sql is better suited for dynamic sql. With utl_file you can write the results of your dynamic query to a csv fiel for import in Excel.

  • Adding dynamic split column width to my report

    I'm trying to add a dynamic split-column-width to my report in BI Publisher. I do not have a need for a column header. I tried to add this line to my existing line of code for the cell.
    *<?split-column-width:COLUMN_DATA?>*
    C *<?split-column-width:COLUMN_DATA?>* <?for-each-group@cell:current-group();COLUMN_ORDER?> COLUMN_DATAEC
    I do not under stand the user's guide. What should be placed where to accomplish the dynamic column width and keep my current cell group?
    thank you for your time.

    In the Discoverer Plus (web version but not vieweer), go to Sheet -> Format. For each column click on Format Data and make sure Word Wrap in unchecked. Then click on Format Heading and check on Word Wrap. This will word wrap the column heading but stretch the column to maximum length of the data in the column.
    I think be default word wrap in unchecked unless otherwise specified when the workbook was created.

  • Dynamic reporting, time dependent columns

    Hello,
    We are trying to make some dynamic reports, for example with the columns: the last six months , quarter, current year, last year etc etc (a half year report). Is it possible to give in a year\period which is the "current period", so that all dynamic (time) columns are relative from this date. This because it is not known in which month the work is done (and the cubes updated) and the reports are run.
    Regards.

    If so,.....
    1)create a variable on Time Char (instead the Business Content Variable) with manual input mandatory
    2)insert an 'OFFSET'
    For example:
    a) create a variable on calmonth
    b) create a new selection in column
    __b.1) insert your KF in selection
    __b.2) insert new variable of calmonth in selection
    __b.3) change offset of variable, i.e. for six month write -6
    Hope it helps!
    C@f
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left.

  • Dynamically assign column names in reports

    I have a report that has to display the data for the years within the given date range.
    For example, for customer A I need to display order value placed in each year between the date range 01-dec-2010 till 31-dec-2014.
    From Date : 01-dec-2010 To Date :31-dec-2014
    Output should be a follows :
    Customer 2010 2011 2012 2013 2014
    A 50 40 60 100 20
    This means that if the date range is 2010 to 2015 then output will be as follows
    Customer 2010 2011 2012 2013 2014 2015
    A 50 40 60 100 20 50
    So the report column name must change accoding to the Fm/To Period range
    Please tell me the coding for dynamically changing report column names as per the parameters 'From Dt' and 'To Dt'.

    Hi,
    First and best option I will recommend is to create a MATRIX report.
    Second option if the number of columns are fixed,
    create fixed no of date ranges as parameters or placeholder columns (can be achieved even with 2 parameters start date and end date), you just need to use DATE is formula calculations cleverly.
    Now create formula columns and pass the date ranges as parameters to the respective column formulas.
    Best Regards
    Arif Khadas

  • Dynamic URL with report column not showing

    I created a URL based on a report column in select report region, however instead of seeing the URL link I see the whole text , what am i doing wrong ?
    Fee Detail
    select col1, col2,
    CASE
    WHEN DPF_CLIENT_FEE_TYPE ='THPSCL' THEN
    'Fee Detail'
    ELSE NULL END AS col3
    from table
    Thanks for your help
    Edited by: user5397822 on Dec 20, 2011 1:00 PM

    Check that the "Strip HTML" opion is not set to Yes on the Report Attributes page (Layout section).

  • Dynamic LOV based on report column

    HI,
    I've a standard report with Two columns. Column1 is standard Report Column and Column 2 is a LOV based on an SQL Query.
    Now I need to filter the LOV (add a where clause) based on the value in the column1.
    For example, consider Column1 as "country" and column2 as "state". so the in column2(LOV), user should see only the list of states belongs to the corresponding country(Column1)
    Please note that the report is based on an SQL query
    Any clue on how to do this.
    I'm using APEX4.1.
    Thanks in advance
    Prasanth

    I think you are looking for this https://forums.oracle.com/forums/search.jspa?threadID=&q=tabular+form+cascade&objID=f137&dateRange=all&userID=&numResults=15&rankBy=10001
    please search the forum before posting a question
    Thanks

  • Dynamically assign column heading to Report columns

    I need to assign values to column headings of various Report Columns of my Report region based on current value of one of my application items. How can I do it?

    Never mind, there was another post like this. Duplicate. Just in case someone is looking for the answer, here is what worked for me:
    Assume the Application item is called app_item_My_dynamic_head_col1.
    Add a page computation before the page loads to set the value of the application item based on whatever condition.
    Edit the report column.
    In place of hard coded column heading "Project Name" (that was my column heading), replace it with
    &app_item_My_dynamic_head_col1.
    The key here is the period after &app_item_My_dynamic_head_col1.
    As the page loads, the column heading will be value of the app_item_My_dynamic_head_col1 (as assigned by the computation).

  • Interactive report column filters to display differently than column values

    Greetings...
    We use images a lot in our interactive reports to provide a visual representation to a status, or something locked for update, or what-have-you. By default, when a user clicks the column heading of a column which contains images, the drop-down list that shows up displays the actual images, which is nice for the user to identify exactly which thing they want to filter on. The problem is when the user selects on of the options in the filtering drop-down, the resulting condition that is displayed under the interactive report search bar is the HTML code of the image. I'd like something else to display there because showing the user the HTML code is atrocious.
    I didn't think what I want is possible, but then I came across the Page Locks page within ApEx (page 4000:291 in ApEx 4.0.1) which displays a list of all the pages of an application and whether they are locked or not. It also allows you to bulk lock or bulk unlock a bunch of pages. That page uses an interactive report with a column called "Status" which contains images that represent whether the page is locked or not. When you click the "Status" column heading to filter, instead of seeing the images of an open and closed lock, you see the words "Page Locked" and "Page Unlocked." And even better... when you select on of them, the condition that is displayed to the user is very user-friendly.
    Can someone tell me how this is done so I can replicate it in my own apps?
    Shane.

    Why not create the IR using the text you require e.g. 'Lock', 'Unlock' and then use JQuery to replace the text in the report with the image you want. All the filters should then show the plain text and the report will display the image. e.g.
    http://apex.oracle.com/pls/apex/f?p=46801:1
    Here's what I did:
    Firstly make sure the IR has a region template.
    Then create a Dynamic Action with the following attributes:
    1. Advanced
    2. Event: After Refresh
    3. Selection Type: Region
    4. Region: [select the IR Region]
    5. Action: Execute JS Code
    6. Fire on page load: [checked]
    7. Code:
    $('td [headers="TEST"]').each(function(index) {
      if ($(this).text() == 'Lock') {
        $(this).empty().html('<img src="/i/htmldb/icons/locked_small.gif" alt="Lock" />');
      else {
        $(this).empty().html('<img src="/i/htmldb/icons/unlocked_small.gif" alt="Unlock" />');
    });Where TEST is the column name.
    That's it, this may also be of interest:
    http://simonhunt.blogspot.com/2011/10/adjusting-interactive-report-column.html
    I hope it helps
    Shunt

  • Cannot edit a field that is "Standard Report Column" when new row added

    Hi everyone,
    I have created a master-detail form from the wizard and within the detail report region source I have used apex_item.xxx API
    example;
    select C1, C2,
    CASE when C2 ='N' then
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'ENABLED', 'NO',null,null, 'f03_#ROWNUM#')
    else
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'DISABLED', 'NO',null,null, 'f03_#ROWNUM#')
    END C3
    from table;
    All columns C1,C2,C3 are defined as "Standard Report Columns".
    The results allows the column C3 field to be enabled or disabled for input depending on a condition.
    The problem is when you hit the default button "Add Row" to add a new row. The row is non-editable and is populated with null values.
    What I want is to allow input when a new row is inserted into the multi-row detail form.
    Can any one help?
    Is there a way to change the Display As field for the new row columns to "text field" from "standard report column" dynamically?

    I think you will need to use the old way of adding rows instead of the new one. I remember having headaches trying to get it working.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

Maybe you are looking for

  • IPod touch attempted software upgrade now won't work

    Purchased used iPod touch 8gig USB connect to iTunes on my g4. Gave me a software update choice which I accepted, then after several attempts will no longer show in iTunes and keeps the USB to iTunes logo only on iPod. Any fix? I know the local apple

  • How to download a SOAP attachment using pl/sql

    Gurus, I have a custom pl sql application that is web services based. The custom pl sql application invokes the external web services and updates Oracle Field Service application. One of the new requirements is to get the signatures from SOAP Attachm

  • Distribution of users using CUA

    Hello, I have two systems SAP. I want to set Up Central User Administration. One system will be defined as the central system and the other as a child system. My question is: Is it possible with this setting to create users in the child system? I nee

  • Auto answer on iPhone

    I spend a lot of time on my motorbike as part of my job and really need to be able to set my iPhone to auto-answer - how do I do this?

  • Application showing up in wrong space in spaces application

    I am using spaces. I have stickies set up to always show in space 3. For some reason when I restart my mac, it always shows up in space 1. I change it back to space 3 and then it shows in space 3. Then when I shutdown and restart it shows back up in