Report Row Template - header

Hi
I have made a custom "Report Row Template". I have write the "header" direct in the html code. Is that a problem if i want to translate the application? Is there a way how to use the headers from the apex?
Best Regrads
Jesper Vels

Hello Jesper,
OK, I can see now what you are trying to do. Unfortunately, the only similar example I'm familiar with - http://apex.oracle.com/pls/otn/f?p=11933:108 – Is also using hard coded text for the headings.
I can show you how to get to these headings, and how to use them on your template, but I'm afraid this is not a generic solution, as I couldn't find an active substitution string for the column headers.
As there isn't any variables to hold these column names, we need to define our own. You can do that using an application items or hidden page items. Let's say I defined three hidden items on my report page: P1_HD1, P1_HD2, P1_HD3. Each item will be defined with Source Type of SQL Query, and Source Use of "Only when …". The Source Value for the first item will be as follow:
select  heading
from  FLOWS_020200.APEX_APPLICATION_PAGE_RPT_COLS
where  APPLICATION_ID=:APP_ID and
       PAGE_ID=:APP_PAGE_ID and
       DISPLAY_SEQUENCE = 1;The DISPLAY_SEQUENCE should change according to the sequence of the column.
If you choose to use an application items, you'll need to use a before header computation on your report page, with the same query, to populate the application items.
In order to use these items in the report template, we need to use the "&P1_HD1." notation. You can have something like this, for the first header in your report query:
<tr><td>&P1_HD1.: </td><td>#1#</td>   . . .Hope this helps,
Arie.

Similar Messages

  • Custom report row template

    Few questions when using a custom report row template. Followup to the discussion Report Row Template: Column condition
    1. The row template allows full control how the entire row is rendered. I can see this being used when the report query returns a single row and we need to format it in a very specific way. But when the query returns multiple rows, how is the specified Row Template used? i.e the first row is "consumed" and rendered as per the template. If the same process is repeated for subsequent rows, how can we control whether successive rows are rendered across the page (left to right) or down the page (top to bottom)?
    2. When a custom row template is used to render a tabular form, the hidden columns (marked Edit=Y, Show=N on Report Attributes) are present in the markup even when they are not specified in the row template! i.e. the MRU process works. Of course, this is a good thing but I was curious to know what exactly controls this, what part of the report template controls where the hidden form elements are placed?
    3. Any number/date formatting specified declaratively on the Column Attributes page appears to be taken into account when column values are substituted in the template using #COL# notation. But all the other Column Attributes are ignored (alignment, sum, show, link, etc). Is there a way to use the Link attribute to declaratively specify the link so the value of the column #COL# as seen by the report template includes the A tag?
    Thanks

    Comments? Thanks

  • Report - row template or custom?  (pics!)

    Hi all. I have a report that is using a column report template (CURRENT).
    I would like to know what you think is the best way to change the report to look like the FUTURE picture (edited in mspaint). A row template? A custom template? A pl/sql procedure?
    CURRENT
    http://farm4.static.flickr.com/3097/2590550193_39bb7885eb_o.png
    FUTURE
    http://farm4.static.flickr.com/3043/2591385584_5d5365c0c0_o.png
    Thanks in advance for your ideas! ~Darby
    apex ver: 2.0 (don't ask!)
    db ver 10g

    OK I figured out how to create a page template, and I'm almost there! I'm pleasantly surprised at how close I am to the mockup I created earlier (FUTURE)
    STATUS
    http://farm4.static.flickr.com/3050/2591089881_55d5ca7ec3_o.png
    thanks to this example:
    http://apex.oracle.com/pls/otn/f?p=11933:9:2556840832082449::NO:::
    Now I need to figure out
    -- some formatting issues (weird borders)
    -- how to get titles while NOT getting subtotal AND total
    -- how to get total once and put it below the combined 3 regions.
    By the way this is a printer-friendly-based page, so no form load. I can not use a page with a form because we are using File\Send\Page byEmail (IE). When there is a form, Outlook shows the hidden fields.
    cool code to move a region to another spot on the page.  HELP-doesn't email
    ~Darby

  • Report Row Template: Column condition

    In a classic report using a Generic Column template, one can use the Column Condition attribute to conditionally render the column.
    But when using a named column (row template), even though the Builder allows one to specify this condition, it doesn't appear to be used.
    So how would one implement conditional column display in these templates?
    Thanks

    Hi,
    That's actually easier. See: [http://apex.oracle.com/pls/otn/f?p=267:60]
    The SQL for both reports is:
    SELECT EMPNO, ENAME, NVL(SAL,0) SAL, NVL(COMM,0) COMM
    FROM EMP
    ORDER BY EMPNOThe SAL and COMM columns have been formatted using:
    999G999G999G999G990D00For the Row Template, the Row Template 1 setting contains an empty space (you have to have something in there otherwise Apex adds back in a default row containing five cells!). The condition for this is:
    TO_NUMBER('#COMM#','999G999G999G999G990D00') < 100The template will see the data as a string, so we use the same number format to convert that string back into a number and compare this to 100. If we didn't use formatting on the numbers and we are sure that every row contained a number (hence the use of NVL()), then you could use:
    #COMM# < 100Row Template 2 contains the format for the rows that need displaying:
    &lt;tr&gt;
    &lt;td class="t18Data"&gt;#1#&lt;/td&gt;
    &lt;td class="t18Data"&gt;#2#&lt;/td&gt;
    &lt;td class="t18Data" style="text-align:right"&gt;#3#&lt;/td&gt;
    &lt;td class="t18Data" style="text-align:right"&gt;#4#&lt;/td&gt;
    &lt;/tr&gt;and is unconditional.
    The only other settings on the Row Template are the Before Rows:
    &lt;table class="t18Standard" style="border-collapse:collapse; border:1px solid black;"&gt;
    &lt;tr&gt;
      &lt;th class="t18ReportHeader"&gt;Empno&lt;/th&gt;
      &lt;th class="t18ReportHeader"&gt;Ename&lt;/th&gt;
      &lt;th class="t18ReportHeader" style="text-align:right"&gt;Sal&lt;/th&gt;
      &lt;th class="t18ReportHeader" style="text-align:right"&gt;Comm&lt;/th&gt;
    &lt;/tr&gt;and After Rows:
    &lt;/table&gt;Of course, you will note that the record counters at the bottom still show the number of records in both reports - as the SQL still outputs the same data, this doesn't change.
    Andy

  • Report Template -  NULL in Row Template Condition

    I just found a workaround, but,
    in a report template, in a Row Template # Condition, based on a PL/SQL expression, the condition always fails if/when #COLUMN_VALUE# was NULL.
    I worked around this with a NVL in the query - but, is there a better way?
    I want the column highlighted when the value is null - to point out where values need to be entered - i.e. when the record needs to be updated.
    THanks - Karen

    Ok, I have since found out that the setting to make a report template
    available in the Based on > Visualization templates is in the
    'package.xml' file for each report. The value that needs to be changed
    is <IsQueryParameterized>0</IsQueryParameterized> and change the 0 to 1.
    kmcooke1
    kmcooke1's Profile: https://forums.netiq.com/member.php?userid=5806
    View this thread: https://forums.netiq.com/showthread.php?t=49091

  • Row templates overriding column format

    We're in the process of inserting row templates into existing reports, rather than have separate row definitions for each IS, etc. When the template is inserted, column formatting is lost. We're tried reestablishing the formatting, inheriting formatting from a non-template row, etc., but nothing seems to work. Any ideas would be greatly appreciated.

    Hi,
    I've the same problem.
    In Column Heading Template I've entered:
    <td class="t16ReportHeader" id="#COLUMN_HEADER#" #ALIGNMENT#>#COLUMN_HEADER#</td> and it's working fine.
    In Row template I've entered
    <tr #HIGHLIGHT_ROW#>
    <td headers="#COLUMN_HEADER#" class="t16data" #ALIGNMENT#>#1#</td>
    <td headers="#COLUMN_HEADER#" class="t16data" #ALIGNMENT#>#2#</td>
    <td headers="#COLUMN_HEADER#" class="t16data" #ALIGNMENT#>#3#</td>
    <td headers="#COLUMN_HEADER#" class="t16data" #ALIGNMENT#>#4#</td>
    <td headers="#COLUMN_HEADER#" class="t16data" #ALIGNMENT#>#5#</td>
    </tr>Neither #ALIGNMENT# nor #COLUMN_HEADER# nor #HIGHLIGHT_ROW# is recognized and 'tranlsated' to correct value, it's just written like it is to the HTML code.
    Are there any news how to solve the problem?
    (I'm using ApEx 3.0)
    Thanks
    chrissy

  • Report Row Height and Column Width

    Hi,
    I have a cell in a report (a description column) that causes the row height to become very large (when there is a lot of text in the description). I can make the column wider on the report attributes page, but there doesn't seem to be any place to influence the maximum height of a row on a report, short of modifying the template.
    Adding style attributes (e.g. max-height:30px) to an element only affects the <span> that the element resides in, not the table cell or row.
    Displaying the column as a text area is a useful workaround. The downside is the border and scroll bars do waste a lot of screen real estate. Does there exist some other way of setting a limit on the height and/or width of a report, report column or report row?
    Oh, and another question- how do make line breaks in this forum? There's no support for <BR> or [br].

    Please reply to this thread, my customer is facing the same issue. He does not have issue with the excel and the pdf output but in the rtf output the table heght increases to accomadate the data.He want it to bevave in the same way as the pdf do.
    Regards,
    Ajay

  • Report Row With Detail (AJAX) by Carl - How to implement?

    I just had a look at Carl's example place and I'd like to implement his Report Row With Detail feature. But how, it's made up of 3 sections:
    1. a query
    2. javascript
    3. application process
    The query on which the report is based and where I want this feature is:
    select leverancier, artnr, vendorcode from plijst where productgroep = :p1_assortiment_tree or subgroep = :p1_assortiment_tree
    A break is defined on Leverancier
    I understand the query and the application process part. But where goes the Java part???
    Peter
    Message was edited by:
    Pete

    Tried to upload your example application, unfortunately it does not seem to upload properly in my APEX v2.0 environment
    Can you please confirm if your example works with APEX version 2
    and does the Javascript go in the Page Header or Region Header/ Footer area
    thankyou
    Frank

  • Report row with detail (AJAX)

    Hi,
    In Carl's report row with detail (AJAX) demo, is there any way to show all detail row by default when the page is loaded?
    http://apex.oracle.com/pls/otn/f?p=11933:13
    Thanks.
    Andy

    Hi Andy,
    In Carl's example, the "details" content seems to be from a table that has a one-to-one relationship with the main table. If this is the case, you would probably find it easier to use a "Named Column (row template)" type of report template and lay out the report as you need it rather than use Ajax
    Otherwise, I'm sure it would be possible to loop through a report and make a series of Ajax calls to retrieve the details should there be multiple records required.
    Andy

  • Report row color change based on condition

    I have follow this forum steps Re: Color Row In Report
    Column Template 1
    <td #ALIGNMENT# class="t1data" style="background-color:#ADD8E6;">#COLUMN_VALUE#</td>
    PL/SQL expression condition
    '#2#' = 'BOOKED'
    Column Template 2
    <td #ALIGNMENT# class="t2data" style="background-color:#FFE87C;">#COLUMN_VALUE#</td>
    PL/SQL expression condition
    '#2#' = 'ENTERED'
    http://img29.imageshack.us/img29/2792/apexcolor.png
    This does color change but for some rows the colors are highlighted wrong and when i mouse over the rows , it changes to wrong color.

    Hi,
    t1Data and t2Data sound like standard theme css class names.
    In my example, the colouring is done by the style attribute on the TD tag. For "normal" rows:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data"&gt;#COLUMN_VALUE#&lt;/td&gt;for highlighted rows:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data" style="background-color:red;"&gt;#COLUMN_VALUE#&lt;/td&gt;Have you defined "t1Data" and "t2Data" in STYLE tags on your page?
    Andy

  • How can I create multiple selection check boxes in a report row?

    Hello,
    I'd like to know how a multiple selection checkbox can be created in report rows. In brief, I need to create a questionnaire template and each one of the questions will have multple options checkboxes, that means that the user can select more than one of the answers.
    Should I use apex_item.checkbox ?. I have no clue here.
    Please advice.
    Thank you
    Edited by: user9982480 on Jul 23, 2012 10:58 AM

    Hi,
    This might save your effort
    http://www.apexsolution.de/questionnaire/
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Conditional Formatting for Report Rows based on page item

    Hi,
    I have a report and a page item on a page. I would like to somehow highlight any report rows where a particular column in the report (e.g. "Customer_ID") matches the page item (e.g. P2_CUSTOMER_ID).
    Any idea how to do this?
    Thanks,
    Forrest

    You can also achieve this by jquery ( Please note - I just started learning jquery , so my way of doing it may not be a good way of doing it)
    1. Download jquery from [http://www.jquery.com]
    2. In Page Header enter
      <script type="text/javascript" src="#WORKSPACE_IMAGES#jquery.js"></script>
       <script type="text/javascript">
       $(document).ready(function(){
          //t20data is the class for table cells in theme 20 .. change it as per you theme - right click view source and find it
             x = $('.t20data').length;
         //i=7 is the column index of customer id
        // i = i + 10 , 10 is the number of column
           for( i = 7 ; i < x ; i=i + 10)
                if($('.t20data').eq( i ).html() == $x('P2_CUSTOMER_ID').value)
                    // i-7 is the first cell of row and i+2 is the last cell of row 
                    for( c = i - 7 ; c <= i + 2 ; c++)
                         $('.t20data').eq( c ).css("background","red");  
    </script>[ E X A M P L E | http://apex.oracle.com/pls/otn/f?p=62171:1]
    Regards,
    Shijesh

  • Substitution String in Row Template order dependant

    Hi Folks,
    This questions is related to an earlier Complex Detail Report Layout: Can it be done? about building a complex row template (thanks for your help, Vikas!).<br><br>
    Having built the row template (Named Columns) and tested it in a separate application, I have been preparing to incorporate it into the target application. (Here's a screen shot of the work in progress.) I decided to see if I could use column aliases with the substitution strings and so added an alias to the query for the report.<br><br>
    Strange values appeared (like a "Y" for a Project Name) and initially I thought the aliases wouldn't work, so I backed the change out. However, it was now quite apparent that the substitution strings were not taking their values from the column names, as I expected. I was able to put the values in the correct place by modifying the order of the columns selected in the query.<br><br>
    Am I misunderstanding? Shouldn't the order of the columns in the select statement be irrelevant when named columns are used? <br><br>
    Since the order in the query is NOT the order displayed in the template, and I have nearly 30 fields, (many of which are dates, and I couldn't possible guess which is which if the substitution doesn't work properly), it seems important to understand how to ensure the proper values appear in the report.<br><br>
    Many thanks for your help,<br><br>
    Petie

    I take it back. This is whacked. Please take a look at the picture (http://tinypic.com/view/?pic=nygyu0)
    OK, I had a select statement:
    select ps.project_name, ps.project_manager,  ps.gts_dependant, ps.gxp_relevant from project_status ps, eprs_program p
    where
    ps.program_id = p.id and
    p.program_number = :P6_PROGRAM_NUMBERThis populated the fields #PROJECT_NAME#, #PROJECT_MANAGER#, etc. properly.
    I even switched the order around and put the ps.project_manager ahead of the ps.project_name and template still worked.
    I restored the order and checked again. All is good.
    I changed the query and added an alias like so:
    select ps.project_name as "PROJ_NAME", ps.project_manager,  ps.gts_dependant, ps.gxp_relevant from ...The report showed the substitution string "#PROJECT_NAME#" (as expected, because the column was now aliased.) So this is good.
    I went to the row template definition and changed the substitution string #PROJECT_NAME# to #PROJ_NAME# to match the query -- and the substitution strings broke again!
    The report template now behaves as described earlier; being position dependant. Now I suspect that this is a bug, and not something caused by my mucking around.
    I would greatly appreciate your thoughts on the matter and potential workaround. At this point, I will likely delete the region and try creating a new region. I would hate to loose the whole page, the top part was a lot of effort. <sigh>
    Thanks,
    Petie

  • Report With Two Heading

    Hi,
    How to create Report With Two Heading
    [http://apex.oracle.com/pls/apex/f?p=267:31:]
    thanks

    See: Re: Two level row header

  • Color report rows based on a value in that row

    I would like to Color report rows based on a value in that row.
    For examplle with the "EMP" table:
    I would like job=MANAGER to be red and job=CLERK to be green etc etc
    The other example I found only had the option of one color either the highlight or the default color.
    I am looking for a way to do multiple colors.

    Hi,
    In the row template, you can use #1#, #2#, etc to indicate where a field in the report needs to be output. This does not have to be plain text - ie, you can use it within style tags if you like.
    So, take a query like:
    SELECT EMPNO,
    ENAME,
    DEPTNO,
    DECODE(DEPTNO, 10, 'green', 20, 'red', 30, 'cyan', 'white') BG_COLOUR
    FROM EMPYou get columns 1=empno, 2=ename, 3=deptno and 4=bg_colour. In the row template, you can then do:
    Before Rows setting (sets up the table):
    &lt;table&gt;
    &lt;tr&gt;&lt;td&gt;ID&lt;/td&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Dept&lt;/td&gt;&lt;/tr&gt;After Rows setting (closes the table):
    &lt;/table&gt;Row Template 1 (used for ALL rows):
    &lt;tr style="background-color:#4#;"&gt;&lt;td&gt;#1#&lt;/td&gt;&lt;td&gt;#2#&lt;/td&gt;&lt;td&gt;#3#&lt;/td&gt;&lt;/tr&gt;Then, for every row, the colour that has been calculated using the DECODE function will be used in the style tag to colour the background for the entire row.
    How you determine the colours is up to you. I've used DECODE here, but you could use a field on the DEPT table to hold this and use this in your SQL statement.
    Andy

Maybe you are looking for